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

Fix the cleanup of local secret file #5061

Merged
merged 8 commits into from
Jun 17, 2024
Merged

Conversation

pditommaso
Copy link
Member

This PR fixes the cleanup of secret files created by the local provider

Copy link

netlify bot commented Jun 13, 2024

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 014b442
🔍 Latest deploy log https://app.netlify.com/sites/nextflow-docs-staging/deploys/667050cd3592ec00081e5b13

Copy link
Member

@marcodelapierre marcodelapierre left a comment

Choose a reason for hiding this comment

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

I have added deleteOnExit() also for when the path is preexisting.
This makes the behaviour retroactive, for tmp files with matching hash.

What do you think?

@pditommaso
Copy link
Member Author

Umm, not sure anymore it should be deleted 😄

@marcodelapierre
Copy link
Member

Why are you not convinced?
I mean, fair enough from my perspective, mostly curious. The source of truth should be store.json anyway.

If not deleted, I expect the impact on users still to be quite limited: the only ones experiencing inconsistencies would be those using a literal $ symbol in the secret. And the workaround for them is simply a one-off manual deletion of those temporary files.

@pditommaso
Copy link
Member Author

The point that file could be deleted during a by a run while a concurrent execution is running.

I think the temp file is removed, then the file name should be unique i.e. using a random uuid

@marcodelapierre
Copy link
Member

marcodelapierre commented Jun 17, 2024

See now - added a random UUID to the filename.
I did not use the session uniqueID, as it seemed an overshooting to expose the session object all the way to this class.

(oops closed by accident - reopened!)

pditommaso and others added 7 commits June 17, 2024 17:03
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Signed-off-by: Dr Marco Claudio De La Pierre <marco.delapierre@gmail.com>
Signed-off-by: Dr Marco Claudio De La Pierre <marco.delapierre@gmail.com>
Signed-off-by: Dr Marco Claudio De La Pierre <marco.delapierre@gmail.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Signed-off-by: Dr Marco Claudio De La Pierre <marco.delapierre@gmail.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Signed-off-by: Dr Marco Claudio De La Pierre <marco.delapierre@gmail.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Signed-off-by: Dr Marco Claudio De La Pierre <marco.delapierre@gmail.com>
Signed-off-by: Dr Marco Claudio De La Pierre <marco.delapierre@gmail.com>
Signed-off-by: Dr Marco Claudio De La Pierre <marco.delapierre@gmail.com>
@pditommaso
Copy link
Member Author

Ouch got messed with unrelated commits

@marcodelapierre
Copy link
Member

unrelated commits should be fine now, see changelog

@marcodelapierre
Copy link
Member

(still showing extra commits in commit list, as I rebased to sign off one commit)

@pditommaso pditommaso merged commit e28537c into master Jun 17, 2024
19 of 21 checks passed
@pditommaso pditommaso deleted the fix-local-secret-cleanup branch June 17, 2024 15:55
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