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

(cli): allow asset publishing (or at least the asset generation) to run in sequence #22179

Closed
1 of 2 tasks
huyphan opened this issue Sep 21, 2022 · 5 comments
Closed
1 of 2 tasks
Assignees
Labels
feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. package/tools Related to AWS CDK Tools or CLI

Comments

@huyphan
Copy link
Contributor

huyphan commented Sep 21, 2022

Describe the feature

Currently, the CDK CLI always publishes assets in parallel. I would like to be able to change this behaviour via a command line parameter so that they run in sequence. This behaviour is actually configurable via the publishInParallel prop of the AssetPublishing class

readonly publishInParallel?: boolean;

but when it is used, the value is hard-coded to true

Use Case

In our CDK packages, assets are configured to be generated during publishing step using the source.executable property. Example of a manifest file:

{
  "version": "20.0.0",
  "files": {
    "<artifact-name>": {
      "source": {
        "executable": ['some', 'internal', 'command']
      },
      "destinations": {
        "<s3-bucket>": {
          "bucketName": "...",
          "objectKey": "...",
          "region": "us-west-2"
        }
      }
    }
  },
  "dockerImages": {}
}

If we have more than one assets, their publishing steps are run in parallel, the generation steps are also executed in the same fashion. Our internal tool has a unavoidable limitation where it can fail when running in parallel in some edge cases. We need the ability to tell CDK to run the asset publishing steps (or at least the asset generation steps) in sequence.

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

N/A

Environment details (OS name and version, etc.)

N/A

@huyphan huyphan added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Sep 21, 2022
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Sep 21, 2022
@misterjoshua
Copy link
Contributor

Agreed that publishInParallel could be easily configurable. The CLI arg sounds like a good idea, but I wonder whether we should consider a cdk.json option as well.

@huyphan
Copy link
Contributor Author

huyphan commented Sep 22, 2022

cdk.json works too!

@eidanspiegel
Copy link

We are also affected by this

@rix0rrr
Copy link
Contributor

rix0rrr commented Nov 9, 2022

Fixed in #22579

@rix0rrr rix0rrr closed this as completed Nov 9, 2022
@github-actions
Copy link

github-actions bot commented Nov 9, 2022

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

No branches or pull requests

4 participants