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

Update cache invalidation to report build type #339

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 118 additions & 0 deletions .changeset/blue-jeans-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
---
'@atlaspack/core': minor
'@atlaspack/diagnostic': minor
'@atlaspack/e2e-tests': minor
'@atlaspack/feature-flags': minor
'@atlaspack/fs': minor
'@atlaspack/graph': minor
'@atlaspack/integration-tests': minor
'@atlaspack/logger': minor
'@atlaspack/markdown-ansi': minor
'@atlaspack/package-manager': minor
'@atlaspack/plugin': minor
'@atlaspack/profiler': minor
'@atlaspack/register': minor
'@atlaspack/rust': minor
'@atlaspack/test-utils': minor
'@atlaspack/types': minor
'@atlaspack/types-internal': minor
'@atlaspack/utils': minor
'@atlaspack/workers': minor
'@atlaspack/link': minor
'@atlaspack/babel-preset': minor
'@atlaspack/babel-register': minor
'@atlaspack/bundle-stats': minor
'@atlaspack/eslint-config': minor
'@atlaspack/eslint-config-browser': minor
'@atlaspack/eslint-plugin': minor
'@atlaspack/query': minor
'@atlaspack/parcel-to-atlaspack': minor
'@atlaspack/namer-default': minor
'@atlaspack/optimizer-blob-url': minor
'@atlaspack/optimizer-css': minor
'@atlaspack/optimizer-cssnano': minor
'@atlaspack/optimizer-data-url': minor
'@atlaspack/optimizer-htmlnano': minor
'@atlaspack/optimizer-image': minor
'@atlaspack/optimizer-inline-requires': minor
'@atlaspack/optimizer-svgo': minor
'@atlaspack/optimizer-swc': minor
'@atlaspack/optimizer-terser': minor
'@atlaspack/packager-css': minor
'@atlaspack/packager-html': minor
'@atlaspack/packager-js': minor
'@atlaspack/packager-raw': minor
'@atlaspack/packager-raw-url': minor
'@atlaspack/packager-svg': minor
'@atlaspack/packager-ts': minor
'@atlaspack/packager-wasm': minor
'@atlaspack/packager-webextension': minor
'@atlaspack/packager-xml': minor
'@atlaspack/reporter-build-metrics': minor
'@atlaspack/reporter-bundle-analyzer': minor
'@atlaspack/reporter-bundle-buddy': minor
'@atlaspack/reporter-bundle-stats': minor
'@atlaspack/reporter-cli': minor
'@atlaspack/reporter-conditional-manifest': minor
'@atlaspack/reporter-dev-server': minor
'@atlaspack/reporter-dev-server-sw': minor
'@atlaspack/reporter-json': minor
'@atlaspack/reporter-lsp': minor
'@atlaspack/reporter-sourcemap-visualiser': minor
'@atlaspack/reporter-tracer': minor
'@atlaspack/resolver-default': minor
'@atlaspack/resolver-glob': minor
'@atlaspack/resolver-repl-runtimes': minor
'@atlaspack/runtime-browser-hmr': minor
'@atlaspack/runtime-js': minor
'@atlaspack/runtime-react-refresh': minor
'@atlaspack/runtime-service-worker': minor
'@atlaspack/runtime-webextension': minor
'@atlaspack/transformer-babel': minor
'@atlaspack/transformer-css': minor
'@atlaspack/transformer-glsl': minor
'@atlaspack/transformer-graphql': minor
'@atlaspack/transformer-html': minor
'@atlaspack/transformer-image': minor
'@atlaspack/transformer-inline': minor
'@atlaspack/transformer-inline-string': minor
'@atlaspack/transformer-js': minor
'@atlaspack/transformer-json': minor
'@atlaspack/transformer-jsonld': minor
'@atlaspack/transformer-less': minor
'@atlaspack/transformer-mdx': minor
'@atlaspack/transformer-postcss': minor
'@atlaspack/transformer-posthtml': minor
'@atlaspack/transformer-pug': minor
'@atlaspack/transformer-raw': minor
'@atlaspack/transformer-react-refresh-wrap': minor
'@atlaspack/transformer-sass': minor
'@atlaspack/transformer-svg': minor
'@atlaspack/transformer-svg-react': minor
'@atlaspack/transformer-toml': minor
'@atlaspack/transformer-typescript-tsc': minor
'@atlaspack/transformer-typescript-types': minor
'@atlaspack/transformer-webextension': minor
'@atlaspack/transformer-webmanifest': minor
'@atlaspack/transformer-worklet': minor
'@atlaspack/transformer-xml': minor
'@atlaspack/transformer-yaml': minor
'@atlaspack/lsp': minor
'@atlaspack/lsp-protocol': minor
'@atlaspack/watcher-watchman-js': minor
'@atlaspack/babel-plugin-transform-contextual-imports': minor
'@atlaspack/babel-plugin-transform-runtime': minor
'@atlaspack/babel-preset-env': minor
'@atlaspack/swc-plugin-contextual-imports': minor
'@atlaspack/create-react-app': minor
'@atlaspack/domain-sharding': minor
'@atlaspack/events': minor
'@atlaspack/macros': minor
'@atlaspack/node-resolver-core': minor
'@atlaspack/service-worker': minor
'@atlaspack/ts-utils': minor
'@atlaspack/validator-eslint': minor
'@atlaspack/validator-typescript': minor
Copy link
Contributor

Choose a reason for hiding this comment

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

How come we're bumping every package? Can't we just release core?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I mentioned this earlier, I'm not sure but I reckon also changes to core do impact everything

Copy link
Contributor

Choose a reason for hiding this comment

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

Changesets should take care of it if core is listed as an explicit dependency

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey, I believe changesets will bump all packages because they have explicit dependencies with one another and core is depended on by everything.

---

Update cache invalidation metrics with build type
6 changes: 6 additions & 0 deletions packages/core/core/src/RequestTracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,10 @@ export class RequestGraph extends ContentGraph<
events: Array<Event>,
options: AtlaspackOptions,
threshold: number,
/**
* True if this is the start-up (loading phase) invalidation.
*/
isInitialBuild: boolean = false,
): Async<boolean> {
let didInvalidate = false;
let count = 0;
Expand Down Expand Up @@ -1114,6 +1118,7 @@ export class RequestGraph extends ContentGraph<
trackableEvent: 'fsevent_response_time',
duration,
predictedTime,
isInitialBuild,
numberOfEvents: events.length,
numberOfInvalidatedNodes: invalidatedNodes.size,
},
Expand Down Expand Up @@ -1718,6 +1723,7 @@ async function loadRequestGraph(options): Async<RequestGraph> {
options.unstableFileInvalidations || events,
options,
10000,
true,
);
return requestGraph;
} catch (e) {
Expand Down