Skip to content

fix(s3deploy): empty sources leads to deployment error#37786

Merged
mergify[bot] merged 3 commits intomainfrom
otaviom/empty-sources
May 7, 2026
Merged

fix(s3deploy): empty sources leads to deployment error#37786
mergify[bot] merged 3 commits intomainfrom
otaviom/empty-sources

Conversation

@otaviomacedo
Copy link
Copy Markdown
Contributor

In the refactor that converted some Lazy calls to the Box API, a case was missed for BucketDeployment: when the sources property is empty. It should generate a custom resource with empty arrays as properties as well. Instead it's generating undefined (resulting in the property not being present in the resource).

Offending source:

this.sources = Box.fromArray(
  props.sources.map((source: ISource) => source.bind(this, { handlerRole: this.handlerRole })),
  { omitEmpty: true },
);

Change it to omitEmpty: false.

Fixes #37784.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions Bot added bug This issue is a bug. p2 labels May 7, 2026
@aws-cdk-automation aws-cdk-automation requested a review from a team May 7, 2026 08:13
@mergify mergify Bot added the contribution/core This is a PR that came from AWS. label May 7, 2026
@mergify mergify Bot temporarily deployed to automation May 7, 2026 08:13 Inactive
@mergify mergify Bot temporarily deployed to automation May 7, 2026 08:13 Inactive
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

⚠️ This pull request description does not follow the correct template structure.

PRs without a linked issue will receive lower priority for review and merging. Please update the description to follow the PR template and include a line like Closes #123 in the Issue section. If no existing issue matches your change, create one first.

Copy link
Copy Markdown
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

(This review is outdated)

@kumvprat kumvprat added the pr-linter/exempt-integ-test The PR linter will not require integ test changes label May 7, 2026
@aws-cdk-automation aws-cdk-automation dismissed their stale review May 7, 2026 08:31

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@otaviomacedo otaviomacedo added the pr/do-not-merge This PR should not be merged at this time. label May 7, 2026
@otaviomacedo otaviomacedo removed the pr/do-not-merge This PR should not be merged at this time. label May 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

⚠️ Experimental Feature: This security report is currently in experimental phase. Results may include false positives and the rules are being actively refined.
This security report is NOT a review blocker. Please try merge from main to avoid findings unrelated to the PR.
To suppress a specific rule, see Suppressing Rules.


TestsPassed ✅SkippedFailed
Security Guardian Results48 ran48 passed
TestResult
No test annotations available

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

⚠️ Experimental Feature: This security report is currently in experimental phase. Results may include false positives and the rules are being actively refined.
This security report is NOT a review blocker. Please try merge from main to avoid findings unrelated to the PR.
To suppress a specific rule, see Suppressing Rules.


TestsPassed ✅SkippedFailed
Security Guardian Results with resolved templates48 ran48 passed
TestResult
No test annotations available

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 7, 2026

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 7, 2026

Merge Queue Status

  • Entered queue2026-05-07 09:43 UTC · Rule: default-squash
  • Checks started · in-place
  • 🚫 Left the queue2026-05-07 10:13 UTC · at 80a2877bb63572a40aba13a0d23c01942ece9756

This pull request spent 29 minutes 51 seconds in the queue, including 29 minutes 29 seconds running CI.

Required conditions to merge

Reason

Pull request #37786 has been dequeued

The pull request could not be merged. This could be related to an activated branch protection or ruleset rule that prevents us from merging. Required status check "validate-pr" is queued.

Hint

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.
If you do update this pull request, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

@mergify mergify Bot temporarily deployed to automation May 7, 2026 09:44 Inactive
@mergify mergify Bot temporarily deployed to automation May 7, 2026 09:44 Inactive
@kumvprat kumvprat removed the pr-linter/exempt-integ-test The PR linter will not require integ test changes label May 7, 2026
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 7, 2026

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 7, 2026

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@kumvprat
Copy link
Copy Markdown
Contributor

kumvprat commented May 7, 2026

@Mergifyio queue

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 7, 2026

Merge Queue Status

  • Entered queue2026-05-07 11:16 UTC · Rule: default-squash
  • Checks skipped · PR is already up-to-date
  • Merged2026-05-07 11:16 UTC · at 80a2877bb63572a40aba13a0d23c01942ece9756 · squash

This pull request spent 19 seconds in the queue, including 3 seconds running CI.

Required conditions to merge

@mergify mergify Bot merged commit d28ad30 into main May 7, 2026
33 of 34 checks passed
@mergify mergify Bot deleted the otaviom/empty-sources branch May 7, 2026 11:16
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug This issue is a bug. contribution/core This is a PR that came from AWS. p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[aws-s3-deployment] BucketDeployment with empty sources fails at deploy: "missing request resource property 'SourceBucketNames'" (regression in 2.252.0)

3 participants