Skip to content

docs: correct publish input default to false in README#72

Open
JamBalaya56562 wants to merge 1 commit intoaws-actions:mainfrom
JamBalaya56562:pr72
Open

docs: correct publish input default to false in README#72
JamBalaya56562 wants to merge 1 commit intoaws-actions:mainfrom
JamBalaya56562:pr72

Conversation

@JamBalaya56562
Copy link
Copy Markdown
Contributor

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 #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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant