Shell Agent Fails to Delete Protected Files in Job Workspace (OD-1908)
Desmond Duval opened 2 years ago

I'm using OneDev for a project that involves building Raspberry Pi OS, and I keep hitting issues in the build agent where the cleanup process errors with a "Failed to Delete File" message.

I'm running the build on a remote shell agent. I know that one of the files that it error'd on requires sudo to delete after a build, when doing so manually. my workaround for now is to delete the folders containing protected files in an "Execute a command" step before cleanup begins. I will confirm the efficacy of my workaround after my current build completes, and will update this ticket.

I'm realizing now that the agent is running in console mode, so maybe if it were run as a service it'd have the permissions it needs? I wasn't sure whether this was intended behavior or not, so I wanted to submit a ticket just in case. I couldn't find documentation or discussion about best practices for builds involving weird permissions to their file trees, so maybe this was a new edge case.

  • Robin Shen commented 2 years ago

    Deleting with a separate command step is a good idea. As long as agent is not running as root (regardness console mode or service mode) it can not delete files without permissions.

  • Desmond Duval changed state to 'Closed' 2 years ago
    Previous Value Current Value
    Open
    Closed
  • Desmond Duval commented 2 years ago

    Seems like works as intended, thanks for your help!

issue 1/1
Type
Question
Priority
Normal
Assignee
Labels
No labels
Issue Votes (0)
Watchers (2)
Reference
OD-1908
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover