Skip to content
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

cleanup build directory fix #17

Merged
merged 1 commit into from
Feb 14, 2022

Conversation

jduimovich
Copy link
Contributor

This PR is intended to fix the cleanup task deleting subPaths: of a still running pipelinerun.

The issues found

  1. a single marker was used so if two of these runs execute concurrently one instance will delete the markers of another and those directories will be removed even if live. Using unique markers will prevent this.
  2. new PVs since the beginning of the cleanup will not contain a marker and would be deleted. This is handled by only processing the list of pvs you already marked and any one ones will have to wait until a future purge.

The script now

  • uses unique marker per run
  • avoid race condition when new pvs arrive in middle of run by only using the same pv paths in both passes
    also, the references to old versions (like v0.1.3) have been replaced in doc as vX.Y.Z so we don't need to update every time
  • fix reference in doc to hard coded versions as they are stale
    The version reference is also in the tests, we can use a "test" tag (./dev.sh test) which will update the images in your repo and can be tested with a fixed name
  • updated tests to use single "test" tag for now

@Michkov @AndrienkoAleksandr - FYI - fix for subPaths were deleted while Pruns are active

- use unique marker per run
- avoid race condition when new pvs arrive in middle of run.
- fix reference in doc to hard coded versions as they are stale
- updated tests to use single "test" tag for now
@Michkov
Copy link
Contributor

Michkov commented Feb 14, 2022

To point 2) in description (new PVs since the beginning of the cleanup will not contain a marker and would be deleted.) -> that's not true, directories with marker are deleted, so if the marker is missing then the folder is ignored.

I do not think that this is fixing the issue, but it's improvement.

@jduimovich jduimovich merged commit aab8f13 into konflux-ci:main Feb 14, 2022
@jduimovich jduimovich deleted the cleanup-tasks-fix branch December 4, 2023 14:00
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.

2 participants