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: Fixed opposite refresh_alias behavior in modules/alias #372

Conversation

micksatana
Copy link
Contributor

@micksatana micksatana commented Nov 2, 2022

Description

ignore_changes = [function_version] lifecycle should be in the no_refresh resource. This PR will solve #281

Fixes #281

Motivation and Context

Its behavior is currently opposite. refresh_alias = true should refresh new version to the alias.

Breaking Changes

If anyone uses opposite refresh_alias = false as a workaround to refresh version, one needs to update to true and vice versa.

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
    • Note: existing Python example, not working in case a developer use pyenv so I update to Node.js example instead
    • provisioned_concurrent_executions in the example was 1 after run the second apply it will failed not allowed to be lower than 10. This is unrelated to alias example. So removed from the example.

Screenshot 2565-11-02 at 23 59 24

  • I have tested and validated these changes using one or more of the provided examples/* projects
    • terraform init, plan then apply
    • Update ../fixtures/nodejs14.x-app1/index.js
    • terraform apply

Screenshot 2565-11-02 at 23 50 58

Screenshot 2565-11-02 at 23 54 22

- [x] I have executed `pre-commit run -a` on my pull request

@micksatana micksatana changed the title fix: Opposite refresh_alias behavior. Close #281 fix: Opposite refresh_alias behavior Nov 3, 2022
@antonbabenko antonbabenko changed the title fix: Opposite refresh_alias behavior fix: Fixed opposite refresh_alias behavior in modules/alias Nov 7, 2022
Copy link
Member

@antonbabenko antonbabenko left a comment

Choose a reason for hiding this comment

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

Good catch, but please revert unnecessary changes in the example.

examples/alias/main.tf Outdated Show resolved Hide resolved
@micksatana micksatana force-pushed the fix/opposite-refresh-alias-behavior branch from 6add895 to aa6a6aa Compare November 11, 2022 15:52
@antonbabenko antonbabenko merged commit f7b2a3a into terraform-aws-modules:master Nov 11, 2022
antonbabenko pushed a commit that referenced this pull request Nov 11, 2022
### [4.7.1](v4.7.0...v4.7.1) (2022-11-11)

### Bug Fixes

* Fixed opposite refresh_alias behavior in modules/alias ([#372](#372)) ([f7b2a3a](f7b2a3a))
@antonbabenko
Copy link
Member

This PR is included in version 4.7.1 🎉

@ryandeivert
Copy link

hi all -- while I greatly appreciate this fix (it's confused me for a long time), I'm concern that it has semi-silently landed in a patch fix. IMO, this is a breaking change, and even using the least egregious upgrade pattern (~> syntax) here would even adopted this breaking change.

I'm curious if there is a way to limit releasing breaking changes to (at a minimum) the minor version releases, even when it is a known-bug fix. unfortunately, this caused numerous functions to unexpectedly stop publishing, and I bet it is also affecting many many others without them noticing 😞

@jguttman94
Copy link

jguttman94 commented Nov 30, 2022

agreed! I suspect that this issue (#383) is a result of this change.

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lambda Alias no_refresh and with_refresh are backwards
4 participants