-
Notifications
You must be signed in to change notification settings - Fork 617
fix: enable default default prefix for source archive upload #3432
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
base: main
Are you sure you want to change the base?
fix: enable default default prefix for source archive upload #3432
Conversation
📝 WalkthroughWalkthroughThis update introduces a new optional attribute, Changes
Sequence Diagram(s)sequenceDiagram
participant SS as StorageSettings
SS ->> SS: __post_init__()
alt default_storage_provider is set
SS -->> SS: Set default_storage_protocol = "{default_storage_provider}://"
else
SS -->> SS: default_storage_protocol remains None
end
sequenceDiagram
participant W as Workflow
W ->> W: upload_sources(prefix)
alt prefix is falsy or equals default_storage_protocol
W -->> W: Set prefix = "s3://snakemake-workflow-sources/"
else
W -->> W: Append trailing slash to prefix
end
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms (30)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
| self.remote_job_local_storage_prefix = self.local_storage_prefix | ||
|
|
||
| if self.default_storage_provider: | ||
| self.default_storage_protocol = f"{self.default_storage_provider}://" |
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 is dangerous. The name of the provider is not always a valid schema name. We should rather extend the storage provider base class to return the desired schema name via a new abstract method.
| prefix = self.storage_settings.default_storage_prefix | ||
| if prefix: | ||
| if not prefix or prefix == self.storage_settings.default_storage_protocol: | ||
| prefix = "s3://snakemake-workflow-sources/" |
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.
s3:// as a default? Is that intentional?
|
yes I will mark as draft and continue to think about a more robust implementation |
|
This PR was marked as stale because it has been open for 6 months with no activity. |
resolves snakemake/snakemake-executor-plugin-aws-batch#19
QC
docs/) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake).Summary by CodeRabbit
Summary by CodeRabbit
New Features
Refactor