Repository navigation
ci: reuse the build artifact instead of rebuilding the core package - #12893
Merged
Merged
Conversation
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require review
Tip of the day💡 Did you know, you can route each severity your way: inline, summary, both, or drop |
commit: |
|
gioboa
approved these changes
Sep 21, 2026
alumni
approved these changes
Sep 30, 2026
michaelbromley
enabled auto-merge (squash)
October 7, 2026 16:13
Deploying typeorm with
|
| Latest commit: |
7fbbdd9
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://36c4b87a.typeorm.pages.dev |
| Branch Preview URL: | https://ci-reuse-build-artifact.typeorm.pages.dev |
|
|
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.



Follow-up from #12854:
tests-legacy-naming-strategiesandlinteach ran a full core build, because thebuildjob's artifact held the wrong layout.Why the artifact could not be reused
compilewritesbuild/compiled, which the test suites run against.packagewritesbuild/package, which the workspace packages link against viapublishConfig.directory. Thebuildjob only produced the first.The blocker was not just that they are different directories. Both scripts began by deleting the whole of
build/, so running one discarded the other's output and a single job could not produce both.The change
Each script now cleans only what it owns.
gulp packageremovesbuild/packageandbuild/browser, the two directories it writes. A newclean:compiledtask removesbuild/compiled, andcompileuses that instead of the blanketclean. The blanketgulp cleanstays for when you want the lot gone.With that,
buildrunscompileand thenpackage, and one artifact carries both layouts.lintandtests-legacy-naming-strategiesdownload it instead of rebuilding.buildalso has to run whenever a job that consumes the artifact runs, or those jobs would be skipped along with it, so its condition now covers thelintandlegacy-naming-strategiesfilters too.Two things found on the way
packages/legacy-naming-strategies/**did not match thelintfilter, so changes to that package's source were never linted unless its eslint config happened to change too. Since rootlintfans out to every workspace package, the filter is now justpackages/**.None of the three eslint configs ignored
coverage/, which is generated and gitignored. Running the tests and then linting meant eslint reported on c8's bundled HTML report scripts. Now ignored in all three.Verification
The published tree is unchanged:
build/packagewas snapshotted before the change and compared file by file after, 2949 files, no additions, removals or content differences.compilethenpackageandpackagethencompileboth leave all three directories present, so the order does not matter. After both,build/compiled/testholds its 948 compiled specs,build/compiled/test/utils/test-setup.jsis in place for the mochafilehook,build/package/index.jsexists, and the workspace link still resolves.With a build already present and no local
pnpm run package, as in the new jobs,pnpm run lintand the naming-strategies suite both pass.The job graph was checked against the filters for several change shapes, including a codemod-only change, a legacy-naming-strategies-only change and a lockfile-only change. In each case where a consumer job runs,
buildruns too.Not fixed here
pnpm run lintexited 2 once during this work and once previously, with output discarded both times. I could not reproduce it: three attempts that regenerate coverage and lint immediately all exited 0, as did every package individually and the recursive run. It has never happened in CI. Noting it rather than claiming the coverage ignores above fixed it, since I have no evidence they did.