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

update aws-sdk to sso session supported version #13619

Merged
merged 5 commits into from Aug 10, 2023

Conversation

TheFynx
Copy link
Contributor

@TheFynx TheFynx commented Jul 28, 2023

Description

Allows for the use of sso-session backed AWS Profiles

  • Log out of cloud
~/.pulumi-dev/bin/pulumi logout
Logged out of https://app.pulumi.com
  • Try to log in with awssdk=v2 with sso-session profile, existing error
~/.pulumi-dev/bin/pulumi login 's3://state-bucket?region=us-east-1&awssdk=v2&profile=AwsProfile'
error: problem logging in: unable to open bucket s3://state-bucket?region=us-east-1&awssdk=v2&profile=AwsProfile: open bucket s3://state-bucket?region=us-east-1&awssdk=v2&profile=AwsProfile: profile "AwsProfile" is configured to use SSO but is missing required configuration: sso_region, sso_start_url
  • Try to log in with awssdk=v3 with sso-session profile, success
~/.pulumi-dev/bin/pulumi login 's3://state-bucket?region=us-east-1&awssdk=v3&profile=AwsProfile'
Logged in to levi-framework as levi (s3://state-bucket?region=us-east-1&awssdk=v3&profile=AwsProfile)

Fixes #13142

Checklist

  • I have run make tidy to update any new dependencies
  • I have run make lint to verify my code passes the lint check
    • I have formatted my code using gofumpt
  • I have added tests that prove my fix is effective or that my feature works
    • Notes: Unsure if tests are needed to do a package update
  • I have run make changelog and committed the changelog/pending/<file> documenting my change
  • Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version

@github-actions
Copy link

PR is now waiting for a maintainer to take action.

Note for the maintainer: Commands available:

  • /run-acceptance-tests - used to test run the acceptance tests for the project
  • /run-codegen - used to test the Pull Request against downstream codegen
  • /run-docs-gen - used to test the Pull Request against documentation generation

@pulumi-bot
Copy link
Contributor

pulumi-bot commented Jul 28, 2023

Changelog

[uncommitted] (2023-08-06)

Miscellaneous

  • [sdk/go] Updates aws-sdk-go to 1.44.298 to enable support for sso-session link AWS profiles

@lukehoban
Copy link
Member

lukehoban commented Aug 5, 2023

/run-acceptance-tests
Please view the results of the acceptance tests Here

@lukehoban lukehoban requested a review from justinvp August 5, 2023 21:53
Copy link
Member

@lukehoban lukehoban 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 the PR.

I believe the config changes are unrelated and unneeded for this PR? They also seem to be causing test failures per https://github.com/pulumi/pulumi/actions/runs/5772945578/job/15648531383#step:34:734.

Would love to separate those out so we can merge the dependency update.

@@ -29,29 +29,21 @@ func failf(format string, a ...interface{}) {
panic(fmt.Errorf(format, a...))
}

func require(ctx *pulumi.Context, key string, secret bool, use, insteadOf string) string {
func require(ctx *pulumi.Context, key, use, insteadOf string) string {
Copy link
Member

Choose a reason for hiding this comment

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

These changes seem unrelated? Should they be backed out of this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have no idea how that got changed. I followed the contributing docs and that showed up changed after running the make commands. I included it since it said it was autogenerated. I can revert it to what's in the master branch

@github-actions
Copy link

github-actions bot commented Aug 6, 2023

PR is now waiting for a maintainer to take action.

Note for the maintainer: Commands available:

  • /run-acceptance-tests - used to test run the acceptance tests for the project
  • /run-codegen - used to test the Pull Request against downstream codegen
  • /run-docs-gen - used to test the Pull Request against documentation generation

@github-actions
Copy link

github-actions bot commented Aug 6, 2023

PR is now waiting for a maintainer to take action.

Note for the maintainer: Commands available:

  • /run-acceptance-tests - used to test run the acceptance tests for the project
  • /run-codegen - used to test the Pull Request against downstream codegen
  • /run-docs-gen - used to test the Pull Request against documentation generation

@lukehoban
Copy link
Member

lukehoban commented Aug 6, 2023

/run-acceptance-tests
Please view the results of the acceptance tests Here

Copy link
Member

@Frassle Frassle left a comment

Choose a reason for hiding this comment

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

Update looks fine to me and tests seem happy.

bors merge

bors bot added a commit that referenced this pull request Aug 7, 2023
13619: update aws-sdk to sso session supported version r=Frassle a=TheFynx

<!--- 
Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation.
-->

# Description

Allows for the use of sso-session backed AWS Profiles

- Log out of cloud
 ```bash
❯ ~/.pulumi-dev/bin/pulumi logout
Logged out of https://app.pulumi.com
```

- Try to log in with awssdk=v2 with sso-session profile, existing error
 ```bash
❯ ~/.pulumi-dev/bin/pulumi login 's3://state-bucket?region=us-east-1&awssdk=v2&profile=AwsProfile'
error: problem logging in: unable to open bucket s3://state-bucket?region=us-east-1&awssdk=v2&profile=AwsProfile: open bucket s3://state-bucket?region=us-east-1&awssdk=v2&profile=AwsProfile: profile "AwsProfile" is configured to use SSO but is missing required configuration: sso_region, sso_start_url
```

- Try to log in with awssdk=v3 with sso-session profile, success
 ```bash
❯ ~/.pulumi-dev/bin/pulumi login 's3://state-bucket?region=us-east-1&awssdk=v3&profile=AwsProfile'
Logged in to levi-framework as levi (s3://state-bucket?region=us-east-1&awssdk=v3&profile=AwsProfile)
```

Fixes #13142

## Checklist

- [x] I have run `make tidy` to update any new dependencies
- [x] I have run `make lint` to verify my code passes the lint check
  - [x] I have formatted my code using `gofumpt`

<!--- Please provide details if the checkbox below is to be left unchecked. -->
- [ ] I have added tests that prove my fix is effective or that my feature works
	- Notes: Unsure if tests are needed to do a package update 
<!--- 
User-facing changes require a CHANGELOG entry.
-->
- [x] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the Pulumi Cloud,
then the service should honor older versions of the CLI where this change would not exist.
You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version
  <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. -->


Co-authored-by: Levi Smith <levithegeek@gmail.com>
Co-authored-by: Levi Smith <levi@fynx.me>
@bors
Copy link
Contributor

bors bot commented Aug 7, 2023

Build failed:

@TheFynx
Copy link
Contributor Author

TheFynx commented Aug 10, 2023

@Frassle what exactly failed here? It's not overly clear.

@Frassle
Copy link
Member

Frassle commented Aug 10, 2023

Hmm not sure doesn't show anything as failed, lets hope something transient and try again

bors retry

bors bot added a commit that referenced this pull request Aug 10, 2023
13619: update aws-sdk to sso session supported version r=Frassle a=TheFynx

<!--- 
Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation.
-->

# Description

Allows for the use of sso-session backed AWS Profiles

- Log out of cloud
 ```bash
❯ ~/.pulumi-dev/bin/pulumi logout
Logged out of https://app.pulumi.com
```

- Try to log in with awssdk=v2 with sso-session profile, existing error
 ```bash
❯ ~/.pulumi-dev/bin/pulumi login 's3://state-bucket?region=us-east-1&awssdk=v2&profile=AwsProfile'
error: problem logging in: unable to open bucket s3://state-bucket?region=us-east-1&awssdk=v2&profile=AwsProfile: open bucket s3://state-bucket?region=us-east-1&awssdk=v2&profile=AwsProfile: profile "AwsProfile" is configured to use SSO but is missing required configuration: sso_region, sso_start_url
```

- Try to log in with awssdk=v3 with sso-session profile, success
 ```bash
❯ ~/.pulumi-dev/bin/pulumi login 's3://state-bucket?region=us-east-1&awssdk=v3&profile=AwsProfile'
Logged in to levi-framework as levi (s3://state-bucket?region=us-east-1&awssdk=v3&profile=AwsProfile)
```

Fixes #13142

## Checklist

- [x] I have run `make tidy` to update any new dependencies
- [x] I have run `make lint` to verify my code passes the lint check
  - [x] I have formatted my code using `gofumpt`

<!--- Please provide details if the checkbox below is to be left unchecked. -->
- [ ] I have added tests that prove my fix is effective or that my feature works
	- Notes: Unsure if tests are needed to do a package update 
<!--- 
User-facing changes require a CHANGELOG entry.
-->
- [x] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the Pulumi Cloud,
then the service should honor older versions of the CLI where this change would not exist.
You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version
  <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. -->


Co-authored-by: Levi Smith <levithegeek@gmail.com>
Co-authored-by: Levi Smith <levi@fynx.me>
@bors
Copy link
Contributor

bors bot commented Aug 10, 2023

Build failed:

@Frassle
Copy link
Member

Frassle commented Aug 10, 2023

bors retry

bors bot added a commit that referenced this pull request Aug 10, 2023
13619: update aws-sdk to sso session supported version r=Frassle a=TheFynx

<!--- 
Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation.
-->

# Description

Allows for the use of sso-session backed AWS Profiles

- Log out of cloud
 ```bash
❯ ~/.pulumi-dev/bin/pulumi logout
Logged out of https://app.pulumi.com
```

- Try to log in with awssdk=v2 with sso-session profile, existing error
 ```bash
❯ ~/.pulumi-dev/bin/pulumi login 's3://state-bucket?region=us-east-1&awssdk=v2&profile=AwsProfile'
error: problem logging in: unable to open bucket s3://state-bucket?region=us-east-1&awssdk=v2&profile=AwsProfile: open bucket s3://state-bucket?region=us-east-1&awssdk=v2&profile=AwsProfile: profile "AwsProfile" is configured to use SSO but is missing required configuration: sso_region, sso_start_url
```

- Try to log in with awssdk=v3 with sso-session profile, success
 ```bash
❯ ~/.pulumi-dev/bin/pulumi login 's3://state-bucket?region=us-east-1&awssdk=v3&profile=AwsProfile'
Logged in to levi-framework as levi (s3://state-bucket?region=us-east-1&awssdk=v3&profile=AwsProfile)
```

Fixes #13142

## Checklist

- [x] I have run `make tidy` to update any new dependencies
- [x] I have run `make lint` to verify my code passes the lint check
  - [x] I have formatted my code using `gofumpt`

<!--- Please provide details if the checkbox below is to be left unchecked. -->
- [ ] I have added tests that prove my fix is effective or that my feature works
	- Notes: Unsure if tests are needed to do a package update 
<!--- 
User-facing changes require a CHANGELOG entry.
-->
- [x] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the Pulumi Cloud,
then the service should honor older versions of the CLI where this change would not exist.
You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version
  <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. -->


Co-authored-by: Levi Smith <levithegeek@gmail.com>
Co-authored-by: Levi Smith <levi@fynx.me>
@bors
Copy link
Contributor

bors bot commented Aug 10, 2023

Build failed:

@Frassle
Copy link
Member

Frassle commented Aug 10, 2023

hmm ok bors seems really unhappy with this change. I'll see if anyone's got any ideas what's up, worst case we can try recreating this PR from one of our accounts and see if that behaves any better (can keep you tagged on the commit as author).

@TheFynx
Copy link
Contributor Author

TheFynx commented Aug 10, 2023

No worries, I'll just be happy if it gets merged in/updated one way or another.

@Frassle
Copy link
Member

Frassle commented Aug 10, 2023

Looks like there may have been some github issues earlier, I'll give this another try

bors retry

@bors
Copy link
Contributor

bors bot commented Aug 10, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

  • bors-ok

@bors bors bot merged commit cb914ec into pulumi:master Aug 10, 2023
11 of 12 checks passed
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.

AWS session-based SSO does not work with s3 backend
4 participants