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

scylla-manager: make --scylla-manager-package option more robust #464

Merged
merged 2 commits into from
Jul 9, 2023

Conversation

fruch
Copy link
Contributor

@fruch fruch commented Jun 1, 2023

  • now it would first try to download from s3 via boto api (faster)
  • local tar.gz file of manager can be used (no need to have it on s3/http)
  • hash to identify the specific version now based on ETag and not on the url path itself.

Fixes: #463

Testing

ccmlib/utils/download.py Outdated Show resolved Hide resolved
ccmlib/utils/download.py Outdated Show resolved Hide resolved
@@ -143,10 +144,15 @@ def download_version_from_s3(url: str, target_path: str, verbose=False):
try:
metadata = s3_client.head_object(Bucket=bucket_name, Key=download_path)
except botocore.client.ClientError as ex:
if 'Not Found' in str(ex):
error_message = ex.response['Error']['Message']
Copy link
Contributor

Choose a reason for hiding this comment

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

could you please revisit my previous comment, and review the document. for a sample of how the error is examined, see https://github.com/aws/aws-cli/blob/855cd0ddb3c7fd47cab02a390281f29cc9bc744c/awscli/customizations/s3uploader.py#L123-L127

i think the "Message" field is supposed to be consumed by human being, not to be checked by an application.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the code was 404, which is Not Found
and 403 which is Forbidden.

from my POV it the same, and less clear or readable

fruch added 2 commits July 9, 2023 15:32
* now it would first try to download from s3 via boto api (faster)
* local tar.gz file of manager can be used (no need to have it on s3/http)
* hash to identify the specific version now based on ETag and
  not on the url path itself.

Fixes: scylladb#463
on case of old artifacts which aren't configured to be publicly available
on s3 (Forbidden), we should fallback to download via the
http proxy (downloads.scylladb.com)
@fruch fruch merged commit 37c8899 into scylladb:next Jul 9, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SCYLLA_MANAGER_PACKAGE can only be URL
3 participants