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): lambda layer workflow release version and conditionals #1316

Merged
merged 23 commits into from
Jul 19, 2022
Merged

fix(ci): lambda layer workflow release version and conditionals #1316

merged 23 commits into from
Jul 19, 2022

Conversation

am29d
Copy link
Contributor

@am29d am29d commented Jul 19, 2022

Issue number:

Summary

In this PR we fix few issues with layers we have discovered in last release.

First, we need to make sure to keep the old layer versions, something I have missed during the migration.

Second, there is a case when the release upstream workflow can fail but it will still trigger the layer deployment because the condition is set to complete, and it can be success or failure. Thus, we need a job conditional to proceed only upon success OR a dispatch event.

Changes

  • set removal policy of the layer to RETAIN so we can keep the old layer versions
  • add if block so we can trigger the workflow manually as well

User experience

Please share what the user experience looks like before and after this change

Checklist

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

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.

heitorlessa and others added 21 commits July 4, 2022 13:44
* chore: add layer project

* reduce to 1 region for dev

* chore: shorter name for the workflow

* fix ignore markdown lint for now

* fix: more f strings

* ignore mdlint

* add reusable workflow for both beta and prod

* Update layer/layer/canary/app.py

Co-authored-by: Heitor Lessa <heitor.lessa@hotmail.com>

* Update layer/layer/canary/app.py

Co-authored-by: Heitor Lessa <heitor.lessa@hotmail.com>

* readme review

* rephrase canary stack ssm parameter usage

* add default RELEASE_TAG_VERSION assignment based on the input (release or manual trigger)

* add reference to layer docs

* wording

* move version trackign arn to canary stack

* remove outdated npm caching, add release tag resolution for manual workflow trigger

* review: fix layer name and remove dependencies from reusable workflow

* remove debug statement, add default working dir

* pin versions and hashes for requirements with pip-compile

* rename reusable workflow

* pass artefact name to the reusable workflow to prevent potential future conflicts

Co-authored-by: Heitor Lessa <heitor.lessa@hotmail.com>
@boring-cyborg boring-cyborg bot added the github-actions Pull requests that update Github_actions code label Jul 19, 2022
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 19, 2022
@github-actions github-actions bot added the internal Maintenance changes label Jul 19, 2022
@am29d am29d marked this pull request as ready for review July 19, 2022 11:53
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.

looks great! Suggested a job conditional instead of dummy jobs, but I might be missing something

.github/workflows/publish_layer.yml Outdated Show resolved Hide resolved
layer/layer/layer_stack.py Show resolved Hide resolved
@heitorlessa heitorlessa changed the title chore(ci): fix layer workflow fix(ci): lambda layer release pipeline release version and conditionals Jul 19, 2022
@heitorlessa heitorlessa changed the title fix(ci): lambda layer release pipeline release version and conditionals fix(ci): lambda layer workflow release version and conditionals Jul 19, 2022
@github-actions github-actions bot added the bug Something isn't working label Jul 19, 2022
am29d and others added 2 commits July 19, 2022 14:44
Co-authored-by: Heitor Lessa <heitor.lessa@hotmail.com>
@am29d am29d requested a review from heitorlessa July 19, 2022 12:48
@heitorlessa heitorlessa merged commit 24d7b5f into aws-powertools:develop Jul 19, 2022
heitorlessa added a commit to heitorlessa/aws-lambda-powertools-python that referenced this pull request Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working github-actions Pull requests that update Github_actions code internal Maintenance changes size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants