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

docs(homepage): Change installation to CDK v2 #4351

Merged

Conversation

keithrozario
Copy link

@keithrozario keithrozario commented May 17, 2024

Issue number: #4353

Summary

Updated the docs/homepage to reflect CDK v2 instead of CDK v1.

Changes

Changed the docs/homepage. Installation steps are now for CDK v2 instead CDK v1. The original docs had a CDK v1 implementation which would fail if the user used CDK v2 with an ImportError. Also tidied up the environment to use Aws.Region. This drops in Ref: AWS::Region in the cloudformation stack and should work across all regions.

User experience

No user experience changes.

Checklist

If your change doesn't seem to apply, please leave them unchecked.

Is this a breaking change? No. **RFC issue number**:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

image

@keithrozario keithrozario requested a review from a team as a code owner May 17, 2024 08:45
@boring-cyborg boring-cyborg bot added the documentation Improvements or additions to documentation label May 17, 2024
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 17, 2024
Copy link

boring-cyborg bot commented May 17, 2024

Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need.
In the meantime, check out the #python channel on our Powertools for AWS Lambda Discord: Invite link

@heitorlessa
Copy link
Contributor

Hey Keith thanks a lot for this quality improvement 👌 -- could you also open up a docs issue as we require for PRs?

@keithrozario
Copy link
Author

Thanks @heitorlessa. Done.

#4353

@leandrodamascena leandrodamascena linked an issue May 17, 2024 that may be closed by this pull request
1 task
Copy link
Contributor

@leandrodamascena leandrodamascena left a comment

Choose a reason for hiding this comment

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

Hello @keithrozario, thank you for bringing this to our attention.
We have linter, type checking and others to try to keep our documentation as real as possible, the reason we don't get this error is because the code is inline in the md file. I'm thinking about moving this file to the examples folder and including it in md, so that our CI can observe it. Could you do this please? If you don't have time now, I can do and approve/merge this PR today.

@keithrozario
Copy link
Author

Thanks @leandrodamascena I can certainly do that -- but perhaps not today :).

But I'm also thinking there's a trade-off.

For example, this snippet doesn't include the code, or handler props because it focuses on the most important piece, the layers prop of the function. Including details to make this 'workable' might distract from what we're actually trying to communicate in the docs.

Thoughts?

@leandrodamascena
Copy link
Contributor

For example, this snippet doesn't include the code, or handler props because it focuses on the most important piece, the layers prop of the function. Including details to make this 'workable' might distract from what we're actually trying to communicate in the docs.

Yes, really good points to worry about. But I think we have a solution:

1 – We can highlight lines to show what is most important in that example
2 - We can add a tip button to help the customer understand what that line means

image

Wjhat do you think about?

@keithrozario
Copy link
Author

Makes sense. I'll work on that soon :)

@pull-request-size pull-request-size bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 20, 2024
@keithrozario
Copy link
Author

I was performing the change today, I thought it would be best to move all code snippets to the examples folder. I thought this would make it more consistent, and we would be able to lint/check these files more accurately in the future.

I also noticed the SAR example was using CDK v1, and upgraded that to CDK v2 as well.

It does introduce a bunch of new example files -- but the index.md now looks a lots more cleaner and consistent just referencing those code blocks rather than including them in-line (in my view at least :))

@boring-cyborg boring-cyborg bot added the internal Maintenance changes label May 21, 2024
@github-actions github-actions bot removed the internal Maintenance changes label May 21, 2024
Copy link

sonarqubecloud bot commented May 21, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
2 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@leandrodamascena
Copy link
Contributor

Hey @keithrozario! Fantastic changes, and we're now able to identify inconsistencies more effectively since we're running linter/formatter on those files. I made some minor adjustments, and it's now ready for merging 🚀

@leandrodamascena leandrodamascena self-requested a review May 21, 2024 10:10
@leandrodamascena leandrodamascena merged commit fc376f9 into aws-powertools:develop May 21, 2024
4 checks passed
Copy link

boring-cyborg bot commented May 21, 2024

Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs: Change installation from CDK v1 to CDK v2
3 participants