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

fix(ci): create one layer artifact per region & merge #2095

Conversation

dreamorosi
Copy link
Contributor

Description of your changes

This PR slightly modifies the implementation of the CI workflows that handle the Lambda layer publishing and subsequent documentation updates.

Whenever we publish a new Lambda layer version we need to update the ARNs in the documentation. This is done via a combination of CFN outputs, CDK output file, and GitHub artifacts.

Since the layer publishing happens for multiple AWS Regions in parallel, the Layer ARN for each region gets added to a text file that should be uploaded as GitHub artifact. Prior to this PR the artifacts were overwriting each others and ultimately we were looking at one ARN only.

This PR restores the upload of multiple GitHub artifacts by appending the ${{ matrix.region }} variable to the artifact name. Additionally, the PR also modifies how the artifacts are consumed by adding the merge-multiple: true setting to the step that downloads the Layer artifacts so that all the Layer ARNs are actually considered when updating the docs.

Related issues, RFCs

Issue number: closes #2042

Checklist

  • My changes meet the tenets criteria
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in areas that should be flagged with a TODO, or hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my change is effective and works
  • The PR title follows the conventional commit semantics

Breaking change checklist

Is it a breaking change?: NO

  • I have documented the migration process
  • I have added, implemented necessary warnings (if it can live side by side)

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.

@dreamorosi dreamorosi self-assigned this Feb 20, 2024
@dreamorosi dreamorosi requested a review from a team as a code owner February 20, 2024 09:20
@dreamorosi dreamorosi linked an issue Feb 20, 2024 that may be closed by this pull request
2 tasks
@boring-cyborg boring-cyborg bot added the automation This item relates to automation label Feb 20, 2024
@pull-request-size pull-request-size bot added the size/XS PR between 0-9 LOC label Feb 20, 2024
@heitorlessa
Copy link
Contributor

looking

@heitorlessa heitorlessa changed the title chore(ci): restore layer arn artifact uploads fix(ci): create one layer artifact per region & merge Feb 20, 2024
@github-actions github-actions bot added the bug Something isn't working label Feb 20, 2024
@pull-request-size pull-request-size bot added size/S PR between 10-29 LOC and removed size/XS PR between 0-9 LOC labels Feb 20, 2024
Copy link
Contributor

@heitorlessa heitorlessa left a comment

Choose a reason for hiding this comment

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

in case you want to sync the write vs append behavior too (until we have a central Actions repo working for everyone cc @sthulb)

https://github.com/aws-powertools/powertools-lambda-python/pull/3808/files#diff-7db154ab3eff504c26f7051342050425c8c2b49d04c41cec688feadfb1781a56R196

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@sthulb sthulb merged commit 343cb6d into main Feb 20, 2024
13 checks passed
@sthulb sthulb deleted the 2042-maintenance-refactor-artifact-name-strategy-for-parallel-uploads branch February 20, 2024 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation This item relates to automation bug Something isn't working size/S PR between 10-29 LOC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maintenance: Refactor artifact name strategy for parallel uploads
3 participants