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

Filecache sdk upgrade #756

Merged

Conversation

micahhausler
Copy link
Member

What this PR does / why we need it:
Update filecache to use AWS SDK Go V2 with wrappers

This changes updates filecache's internal types to use the AWS SDK Go v2's types, while preserving the external interface used by /pkg/token.This will simplify the future project-wide change for AWS SDK Go v2.

Depends on #755 to be merged first

Which issue(s) this PR fixes

First change toward #736

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Aug 29, 2024
@micahhausler micahhausler force-pushed the filecache-sdk-upgrade branch from 69ff02d to f4ca661 Compare August 29, 2024 19:52
This changes updates filecache's internal types to use the AWS SDK Go
v2's types, while preserving the external interface used by /pkg/token.
This will simplify the future project-wide change for AWS SDK Go v2.

Signed-off-by: Micah Hausler <[email protected]>
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 6, 2024
options.ClusterID,
profile,
options.AssumeRoleARN,
filecache.V1CredentialToV2Provider(sess.Config.Credentials)); err == nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

for my education: is the filecache intended to be v1 format until some future time?
reason for asking: at a future point(or in this PR) invalidate the filecache and use v2 format directly?

Copy link
Contributor

Choose a reason for hiding this comment

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

Talked to Micah offline. The change as is is backward compatible. We can invalidate the cache if v1 creds are found in a later tag. The change will be backward incompatible because rollback will not work when filecache is sdkv2 creds.

SessionToken: val.SessionToken,
Source: val.ProviderName,
CanExpire: false,
// Don't have account ID
Copy link
Contributor

Choose a reason for hiding this comment

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

for my recollection: does the struct not have accountId? or having account ID breaks any usecase?

Copy link
Member Author

Choose a reason for hiding this comment

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

The v1 struct does not have an account ID, v2 does. It won't break anything to not include it

@jyotimahapatra
Copy link
Contributor

/lgtm

/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 6, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jyotimahapatra, micahhausler

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [jyotimahapatra,micahhausler]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 90beff7 into kubernetes-sigs:master Sep 6, 2024
8 checks passed
@micahhausler micahhausler deleted the filecache-sdk-upgrade branch September 9, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants