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

file-adapters - Removed unnecessary required fields for S3Adapter #2967

Merged
merged 9 commits into from
May 20, 2020
Merged

file-adapters - Removed unnecessary required fields for S3Adapter #2967

merged 9 commits into from
May 20, 2020

Conversation

intmainvoid
Copy link
Contributor

This PR implements the proposed solution for issue #2965 where an error was thrown if alternative AWS SDK authentication methods were used

@changeset-bot
Copy link

changeset-bot bot commented May 14, 2020

🦋 Changeset is good to go

Latest commit: be17452

We got this.

This PR includes changesets to release 6 packages
Name Type
@keystonejs/file-adapters Major
@keystonejs/demo-project-blog Patch
@keystonejs/demo-project-meetup Patch
@keystonejs/cypress-project-basic Patch
@keystonejs/cypress-project-client-validation Patch
@keystonejs/cypress-project-social-login Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Vultraz
Copy link
Contributor

Vultraz commented May 14, 2020

You'll need to add a changeset describing this change too.

@intmainvoid intmainvoid changed the title file-adapaters - Removed unnecessary required fields for S3Adapter file-adapters - Removed unnecessary required fields for S3Adapter May 14, 2020
'@keystonejs/file-adapters': major
---

Removed unnecessary required fields for S3Adapter
Copy link
Contributor

Choose a reason for hiding this comment

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

Moved accessKeyId, secretAccessKey and region to s3Options and renamed secretAccessKey to s3.

Previously:

const fileAdapter = new S3Adapter({
  bucket: 'bucket-name',
  accessKeyId: 'ACCESS_KEY_ID',
  secretAccessKey: 'SECRET_ACCESS_KEY',
  region: 'us-west-2',
});

now:

const fileAdapter = new S3Adapter({
  bucket: 'bucket-name',
  s3Options: {
    accessKeyId: 'ACCESS_KEY_ID',
    s3: 'SECRET_ACCESS_KEY',
    region: 'us-west-2',
  }
});

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A couple of things:

1/ The renaming of that property from secretAccessKey to s3 was an error in the docs. Fix forthcoming.

2/ Not sure about the accuracy of your description. These weren't "moved" anywhere. It's just that we stopped accepting them on the constructor. It was always possible (as it is after this change) to supply these properties via the s3Options parameter.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need to language lawyer the changeset too much, I think the examples do must of the heavy lifting to clarify exactly what has changed and what changes a developer would need to make in order to upgrade to the new package.

If we can make that update (or something sufficiently similar) then I'm happy to give this a ✅ and get it shipped 🚀

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cool. I've made all the changes I think need to be done. Anything else specific we're waiting for?

Copy link
Contributor

Choose a reason for hiding this comment

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

Just need to update the changeset to include the info from Mike's comment then we're good to go.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep. I think this commit takes care of that. Have I missed something?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep, the changeset file (.changeset/long-bags-itch.md) needs to contain the text that Mike suggested in this comment thread (or something similar). This is the text that will get put into the CHANGELOG file, and is the thing that developers will refer to when upgrading this major package version, so it's important that it clearly explains the before and after of this version change so that they can successfully this package.

Copy link
Contributor

@timleslie timleslie left a comment

Choose a reason for hiding this comment

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

.

Copy link
Contributor

@timleslie timleslie left a comment

Choose a reason for hiding this comment

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

This looks good now 👍 As one last thing before I merge could I get you to update your branch to master so that it can run against CI and once that goes green I'll merge the PR. Thanks!

@timleslie timleslie merged commit 614164c into keystonejs:master May 20, 2020
This was referenced May 20, 2020
@thekevinbrown thekevinbrown deleted the file-adapater-remove-s3-required-params branch May 20, 2020 04:12
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