-
Notifications
You must be signed in to change notification settings - Fork 74
PDP-518: Changing the workspace permissions #1783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PDP-518: Changing the workspace permissions #1783
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds calls to updateWorkspacePermissions()
in multiple pipeline post
blocks to ensure workspace permissions are updated before tearing down Docker containers.
- Inserts
updateWorkspacePermissions()
beforetearDownDocker()
in each pipeline stage’spost
block.
@@ -180,6 +180,7 @@ pipeline{ | |||
} | |||
post { | |||
always { | |||
updateWorkspacePermissions() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Repeated calls to updateWorkspacePermissions()
across multiple pipeline post
blocks introduce duplication. Consider extracting this into a shared function or leveraging a declarative pipeline global post
section to DRY up the configuration.
updateWorkspacePermissions() |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like good advice - tearDownDocker is called in 5 places, and in each place, updateWorkspacePermissions needs to be called as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'll be creating another shared library for docker cleanup as well. I've separated these two to use this function for non-docker environments as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We run our stages in parallel on different nodes, global post stage will clean up only on the last node.
@@ -180,6 +180,7 @@ pipeline{ | |||
} | |||
post { | |||
always { | |||
updateWorkspacePermissions() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like good advice - tearDownDocker is called in 5 places, and in each place, updateWorkspacePermissions needs to be called as well.
So we can incorporate your pull request, please share the following:
java -version
)