Skip to content

fix(core): splitting tree.json produces a lot of files #34718

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

Merged
merged 3 commits into from
Jun 16, 2025

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Jun 13, 2025

In #34478, we made sure that tree.json would not exceed 512MB, by splitting parts of the construct tree to separate files.

The method we chose led to a lot of files.

In this PR we are combining the various small subtrees into larger "forest" files. Since there are no official readers for the new file format yet, we're not losing a lot of effort by changing the format.

The protocol is that if treeId is set in a subtree reference, the target file is a forest file, otherwise it's a tree file.

Closes #34627.


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

In #34478, we made sure that `tree.json` would not exceed 512MB, by splitting parts of the construct tree to separate files.

The method we chose led to a lot of files.

In this PR we are combining the various small subtrees into larger "forest" files.

Closes #34627.
@rix0rrr rix0rrr requested a review from a team as a code owner June 13, 2025 20:03
@aws-cdk-automation aws-cdk-automation requested a review from a team June 13, 2025 20:03
@github-actions github-actions bot added bug This issue is a bug. effort/medium Medium work item – several days of effort p2 labels Jun 13, 2025
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jun 13, 2025
Copy link
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)

@rix0rrr rix0rrr added the pr-linter/exempt-integ-test The PR linter will not require integ test changes label Jun 13, 2025
@aws-cdk-automation aws-cdk-automation dismissed their stale review June 13, 2025 20:08

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

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jun 13, 2025
}

for (const forestFile of forestFiles) {
fs.writeFileSync(path.join(this.outdir, forestFile.fileName), JSON.stringify(forestFile.file), { encoding: 'utf-8' });
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we write the files in parallel?

Copy link
Contributor

mergify bot commented Jun 16, 2025

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

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: c5470b0
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Contributor

mergify bot commented Jun 16, 2025

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 mergify bot merged commit 650134f into main Jun 16, 2025
17 checks passed
@mergify mergify bot deleted the huijbers/minimize-subtree-files-2 branch June 16, 2025 11:56
Copy link
Contributor

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 Jun 16, 2025
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. effort/medium Medium work item – several days of effort p2 pr/needs-maintainer-review This PR needs a review from a Core Team Member pr-linter/exempt-integ-test The PR linter will not require integ test changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

core: "Could not find parent of" error in FragmentedTreeWriter for tree.json
3 participants