Skip to content

add --ignore-env to exec#1368

Open
synfinatic wants to merge 11 commits into
v2.3.0-devfrom
ignore-env
Open

add --ignore-env to exec#1368
synfinatic wants to merge 11 commits into
v2.3.0-devfrom
ignore-env

Conversation

@synfinatic
Copy link
Copy Markdown
Owner

Fixes: #1095

synfinatic and others added 10 commits May 16, 2026 15:49
Apparently some AWS SSO instances throw an API error if the client
tries to register using both device_code and authorization_code.

This change forces the client to always register one or the other +
refresh_token support. Existing clients which have support for all 3
will be re-registed with 2.

Fixes: #1359
Support device_code or authorization_code, not both
Bumps [DavidAnson/markdownlint-cli2-action](https://github.com/davidanson/markdownlint-cli2-action) from 20 to 23.
- [Release notes](https://github.com/davidanson/markdownlint-cli2-action/releases)
- [Commits](DavidAnson/markdownlint-cli2-action@v20...v23)

---
updated-dependencies:
- dependency-name: DavidAnson/markdownlint-cli2-action
  dependency-version: '23'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [tarides/changelog-check-action](https://github.com/tarides/changelog-check-action) from 2 to 3.
- [Release notes](https://github.com/tarides/changelog-check-action/releases)
- [Commits](tarides/changelog-check-action@v2...v3)

---
updated-dependencies:
- dependency-name: tarides/changelog-check-action
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…rides/changelog-check-action-3

Bump tarides/changelog-check-action from 2 to 3
…vidAnson/markdownlint-cli2-action-23

Bump DavidAnson/markdownlint-cli2-action from 20 to 23
Copilot AI review requested due to automatic review settings May 19, 2026 04:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an aws-sso exec flag intended to support nested executions where the parent process sets AWS credential environment variables (e.g., helm invoking kubectl exec auth plugins), addressing issue #1095.

Changes:

  • Add --ignore-env (-i) flag to aws-sso exec to bypass the existing AWS env conflict check.
  • Update CHANGELOG.md to document the new flag.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

File Description
cmd/aws-sso/exec_cmd.go Adds an IgnoreEnv option and skips checkAwsEnvironment() when set.
CHANGELOG.md Adds an Unreleased entry mentioning exec --ignore-env.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cmd/aws-sso/exec_cmd.go
Comment on lines +54 to +58
if !ctx.Cli.Exec.IgnoreEnv {
err := checkAwsEnvironment()
if err != nil {
log.Fatal("Unable to continue", "error", err.Error())
}
Comment thread CHANGELOG.md
Comment on lines +6 to +9
### New Features

* Add aws-sso exec --ignore-env flag to allow overriding AWS_ env variables #1095

@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

❌ Patch coverage is 75.86207% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.52%. Comparing base (8936ded) to head (838d6b7).

Files with missing lines Patch % Lines
internal/sso/auth/awssso_auth.go 65.00% 6 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff               @@
##           v2.3.0-dev    #1368      +/-   ##
==============================================
+ Coverage       88.50%   88.52%   +0.02%     
==============================================
  Files              54       54              
  Lines            3643     3649       +6     
==============================================
+ Hits             3224     3230       +6     
  Misses            289      289              
  Partials          130      130              
Flag Coverage Δ
unittests 88.52% <75.87%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
internal/storage/storage.go 94.88% <100.00%> (-0.12%) ⬇️
internal/sso/auth/awssso_auth.go 89.12% <65.00%> (+0.37%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8936ded...838d6b7. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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