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

Fixing bug - to take region from input while making AWS connection #8149

Merged
merged 4 commits into from Aug 30, 2023

Conversation

ArvinthC3000
Copy link
Collaborator

@ArvinthC3000 ArvinthC3000 commented Aug 23, 2023

🔩 Description: What code changed, and why?

When the user is configuring S3 as a backup in AWS, the verify command fails for S3-backup-check in the pre-deployment flow with the following error in the screenshot.

Screenshot 2023-08-22 at 7 29 45 PM

Reason:
While creating a new session in AWS the region is not taken. So the session created is not proper and unable to connect to the bucket, as it takes us-east-1 as the default region and the user bucket is in the ap-south-1 region.

Other issue:

  • AWS-SDK expects the endpoint URL to be in the following pattern https://s3.REGION.amazonaws.com. For https://s3.amazonaws.com , it consider it as the bucket is in us-east-1 (default region)

To fix this, the endpoint URL is programmatically changed to the https://s3.REGION.amazonaws.com pattern which is only applicable to the AWS S3 bucket endpoint URL.

⛓️ Related Resources

Jira ticket: https://chefio.atlassian.net/browse/CHEF-5820

👍 Definition of Done

👟 How to Build and Test the Change

✅ Checklist

All PRs must tick these:

With occasional exceptions, all PRs from Progress employees must tick these:

  • Is the code clear? (complicated code or lots of comments--subdivide and use well-named methods, meaningful variable names, etc.)
  • Consistency checked? (user notifications, user prompts, visual patterns, code patterns, variable names)
  • Repeated code blocks eliminated? (adapt and reuse existing components, blocks, functions, etc.)
  • Spelling, grammar, typos checked? (at a minimum use make spell in any component directory)
  • Code well-formatted? (indents, line breaks, etc. improve rather than hinder readability)

All PRs from Progress employees should tick these if appropriate:

  • Tests added/updated? (all new code needs new tests)
  • Docs added/updated? (all customer-facing changes)

Please add a note next to any checkbox above if you are NOT ticking it.

📷 Screenshots, if applicable

AWS:

image

On-Prem:

AWS s3:
Screenshot 2023-08-23 at 8 37 55 PM
Screenshot 2023-08-23 at 8 37 26 PM

MinIO:
Screenshot 2023-08-23 at 8 36 42 PM
Screenshot 2023-08-23 at 8 36 14 PM

@netlify
Copy link

netlify bot commented Aug 23, 2023

Deploy Preview for chef-automate ready!

Name Link
🔨 Latest commit 8108a30
🔍 Latest deploy log https://app.netlify.com/sites/chef-automate/deploys/64eeeff56114f200089712b5
😎 Deploy Preview https://deploy-preview-8149--chef-automate.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Signed-off-by: Arvinth C <arvinth.chandrasekaran@progress.com>
Signed-off-by: Arvinth C <arvinth.chandrasekaran@progress.com>
Signed-off-by: Arvinth C <arvinth.chandrasekaran@progress.com>
Signed-off-by: Arvinth C <arvinth.chandrasekaran@progress.com>
@sonarqube-for-infrastructure-prod

@punitmundra punitmundra merged commit 6d871ef into main Aug 30, 2023
6 of 8 checks passed
@punitmundra punitmundra deleted the ar/verify-s3-fix branch August 30, 2023 11:28
@ArvinthC3000 ArvinthC3000 self-assigned this Sep 4, 2023
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.

None yet

4 participants