Skip to content

refactor: remove duplicate code and fix indentation #8011

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

Merged
merged 4 commits into from
May 9, 2025

Conversation

sriram-mv
Copy link
Contributor

  • Set the right indentation across package, deploy, package/deploy --resolve-s3 & deploy --guided
  • Set the right indentation on Skipping upload to S3.

Which issue(s) does this change fix?

No explicit issue against this.

Why is this change necessary?

The indentation was not aligned.

BEFORE:
Screenshot 2025-05-07 at 12 01 21 PM

AFTER:
Screenshot 2025-05-07 at 12 01 29 PM

How does it address the issue?

  • More consistent UX and pleasing to the eye.

What side effects does this change have?

  • Should be none, these are UX changes.

Mandatory Checklist

PRs will only be reviewed after checklist is complete

  • Add input/output type hints to new functions/methods
  • Write design document if needed (Do I need to write a design document?)
  • Write/update unit tests
  • Write/update integration tests
  • Write/update functional tests if needed
  • make pr passes
  • make update-reproducible-reqs if dependencies were changed
  • Write documentation

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sriram-mv sriram-mv requested a review from a team as a code owner May 7, 2025 19:08
@github-actions github-actions bot added area/package sam package command area/deploy sam deploy command pr/external stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels May 7, 2025
"""
message = f"\n\tManaged S3 bucket: {s3_bucket}"
click.secho(message, bold=bold)
click.echo("\tA different default S3 bucket can be set in samconfig.toml")
Copy link
Contributor

@vicheey vicheey May 8, 2025

Choose a reason for hiding this comment

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

I think this is an opportunity to improve on the message as well.

Suggested change
click.echo("\tA different default S3 bucket can be set in samconfig.toml")
click.echo("\tTo use a specify bucket, specify `resolve_s3 = false` and `s3_bucket= <bucket arn>`")

Then we can remove the condition in line 57 and 58. We can consolidate these to one message.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can definitely improve on the messaging and removing branching overall.

sriram-mv added 4 commits May 9, 2025 12:40
* Set the right indentation across `package`, `deploy`,
  `package/deploy --resolve-s3` & `deploy --guided`
* Set the right indentation on `Skipping upload` to S3.
@vicheey vicheey requested a review from seshubaws May 9, 2025 20:39
Copy link
Member

@roger-zhangg roger-zhangg left a comment

Choose a reason for hiding this comment

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

Thanks for contributing!

@vicheey vicheey added this pull request to the merge queue May 9, 2025
Merged via the queue into aws:develop with commit 0cc1aea May 9, 2025
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/deploy sam deploy command area/package sam package command pr/external stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants