Skip to content

Issue 329 - Improve checks against deletion of high-level directories in CBS cleanup#330

Merged
dennis-behm merged 7 commits into
IBM:mainfrom
lauren-li:feature/improve-cleanup-checks
Jul 14, 2025
Merged

Issue 329 - Improve checks against deletion of high-level directories in CBS cleanup#330
dennis-behm merged 7 commits into
IBM:mainfrom
lauren-li:feature/improve-cleanup-checks

Conversation

@lauren-li
Copy link
Copy Markdown
Contributor

Add the following checks against pipeline deletion of high-level directories in Common Back-end Scripts deleteWorkspace.sh:

  • -P option
  • working directory path length check

Resolves #329

Signed-off-by: LAURENL <45975633+lauren-li@users.noreply.github.com>
@lauren-li lauren-li force-pushed the feature/improve-cleanup-checks branch from 6fa05e7 to 522a8ad Compare June 8, 2025 14:22
Signed-off-by: Lauren Li <45975633+lauren-li@users.noreply.github.com>
@lauren-li lauren-li force-pushed the feature/improve-cleanup-checks branch from 973c371 to ed31178 Compare June 11, 2025 21:26
Signed-off-by: Lauren Li <45975633+lauren-li@users.noreply.github.com>
Signed-off-by: Lauren Li <45975633+lauren-li@users.noreply.github.com>
Signed-off-by: Lauren Li <45975633+lauren-li@users.noreply.github.com>
Signed-off-by: Lauren Li <45975633+lauren-li@users.noreply.github.com>
Copy link
Copy Markdown
Member

@M-DLB M-DLB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I though we also wanted to check that the working dir is a subfolder of the location pointed by $PIPELINE_WORKSPACE.
Would it be possible to implement this check as well? Thank you!

Comment thread Templates/Common-Backend-Scripts/deleteWorkspace.sh Outdated
Comment thread Templates/Common-Backend-Scripts/deleteWorkspace.sh Outdated
Signed-off-by: Lauren Li <45975633+lauren-li@users.noreply.github.com>
@lauren-li
Copy link
Copy Markdown
Contributor Author

@M-DLB After discussing with @dennis-behm, we were thinking to handle the check that the CBS workspace is a child folder of the buildRootDirectory by dropping support for specifying absolute paths via the --workspace option, which Dennis says was primarily used for testing purposes earlier.

Because the removal of the capability to specify absolute paths via the --workspace option would involve changes beyond the Cleanup step to other functions in the pipeline (e.g. wdDeployPackageDir, getLogDir, and getApplicationDir, in addition to getWorkDirectory), we felt it it should be addressed all together via its own issue (#336) and PR, while keeping this PR (#330) scoped to adding checks for the Cleanup step. Would you agree with this approach?

@M-DLB
Copy link
Copy Markdown
Member

M-DLB commented Jul 10, 2025

Dropping the support for absolute paths will make our CI/CD pipeline templates for GitLab fail. Maybe other pipelines will be impacted too. This has to be thought carefully!

@dennis-behm dennis-behm self-requested a review July 14, 2025 10:55
Copy link
Copy Markdown
Member

@dennis-behm dennis-behm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates to safeguard the deletions of the build workspace

@dennis-behm dennis-behm merged commit 51b81f0 into IBM:main Jul 14, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve checks against deletion of high-level directories in CBS cleanup

3 participants