docs: correct publish input default to false in README#72
Open
JamBalaya56562 wants to merge 1 commit intoaws-actions:mainfrom
Open
docs: correct publish input default to false in README#72JamBalaya56562 wants to merge 1 commit intoaws-actions:mainfrom
JamBalaya56562 wants to merge 1 commit intoaws-actions:mainfrom
Conversation
The README's input table claims `publish` defaults to `true`, but the
actual default in both this action and the underlying AWS Lambda API
is `false`:
- action.yml has no `default:` for the `publish` input, so an unset
input is undefined.
- validations.js initializes `publish` to false and falls back to
false on any parse error.
- index.js only adds `Publish` to CreateFunction / UpdateFunctionCode
when `publish !== undefined`, so omitting the input means AWS uses
its own default.
- The AWS Lambda CreateFunction API treats `Publish` as an optional
Boolean that is not required; the documented behavior is that you
must set it to true to publish, and omitting it does not publish.
https://docs.aws.amazon.com/lambda/latest/api/API_CreateFunction.html
Issue aws-actions#58 reports this discrepancy and offers two options: change the
docs, or change the default behavior. Changing the default to true
(as attempted in PR aws-actions#63) would be a breaking change for every
existing user — every deploy would suddenly publish a new version,
and the action's behavior would diverge from the AWS API default.
The maintainer pushback on aws-actions#63 points to this as well.
This change takes the docs-only path: align the documentation with
the actual (and AWS-standard) behavior. No code change.
Refs aws-actions#58, aws-actions#63.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The README's input table claims
publishdefaults totrue, but theactual default in both this action and the underlying AWS Lambda API
is
false:default:for thepublishinput, so an unsetinput is undefined.
publishto false and falls back tofalse on any parse error.
Publishto CreateFunction / UpdateFunctionCodewhen
publish !== undefined, so omitting the input means AWS usesits own default.
Publishas an optionalBoolean that is not required; the documented behavior is that you
must set it to true to publish, and omitting it does not publish.
https://docs.aws.amazon.com/lambda/latest/api/API_CreateFunction.html
Issue #58 reports this discrepancy and offers two options: change the
docs, or change the default behavior. Changing the default to true
(as attempted in PR #63) would be a breaking change for every
existing user — every deploy would suddenly publish a new version,
and the action's behavior would diverge from the AWS API default.
The maintainer pushback on #63 points to this as well.
This change takes the docs-only path: align the documentation with
the actual (and AWS-standard) behavior. No code change.
Refs #58, #63.