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

H-3689: Replace check-dependency-version-consistency with yarn constraints #5769

Conversation

indietyp
Copy link
Member

@indietyp indietyp commented Dec 2, 2024

🌟 What is the purpose of this PR?

Replaces check-dependency-version-consistency with yarn constraints, a new feature in Yarn 4, this allows us to unify some of the linting packages we previously relied on.

Additionally the enforceDevDependenciesAreProperlyDeclared constraint has been rewritten to be more robust.

constraints are now also auto-applied on commit

As a drive-by cross-env has been removed as it is no longer needed in Yarn 4 due to the introduction of a POSIX compliant OS independent shell implementation.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • does not modify any publishable blocks or libraries, or modifications do not need publishing

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph

@indietyp indietyp force-pushed the bm/h-3689-replace-check-dependency-version-consistency-with-yarn branch from 59fc763 to c64504e Compare December 3, 2024 12:08
@indietyp indietyp requested a review from CiaranMn December 3, 2024 12:09
Copy link

codecov bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 23.07%. Comparing base (d7f2ebd) to head (03f514f).
Report is 496 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5769      +/-   ##
==========================================
- Coverage   23.09%   23.07%   -0.03%     
==========================================
  Files         561      568       +7     
  Lines       18905    19103     +198     
  Branches     2680     2697      +17     
==========================================
+ Hits         4367     4408      +41     
- Misses      14486    14643     +157     
  Partials       52       52              
Flag Coverage Δ
apps.hash-ai-worker-ts 1.32% <ø> (ø)
apps.hash-api 1.16% <ø> (ø)
blockprotocol.type-system 46.42% <ø> (ø)
local.harpc-client 65.18% <ø> (-6.83%) ⬇️
local.hash-backend-utils 8.80% <ø> (ø)
local.hash-graph-sdk 100.00% <ø> (ø)
local.hash-isomorphic-utils 1.03% <ø> (ø)
local.hash-subgraph 24.54% <ø> (ø)
rust.deer 6.66% <ø> (ø)
rust.error-stack 72.51% <ø> (ø)
rust.sarif 87.66% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@CiaranMn CiaranMn left a comment

Choose a reason for hiding this comment

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

Much simpler, thank you

Copy link
Contributor

github-actions bot commented Dec 3, 2024

Benchmark results

@rust/hash-graph-benches – Integrations

representative_read_entity

Function Value Mean Flame graphs
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$17.1 \mathrm{ms} \pm 183 \mathrm{μs}\left({\color{lightgreen}-28.347 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$16.3 \mathrm{ms} \pm 193 \mathrm{μs}\left({\color{lightgreen}-5.256 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$16.3 \mathrm{ms} \pm 213 \mathrm{μs}\left({\color{lightgreen}-5.316 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/block/v/1 $$16.9 \mathrm{ms} \pm 196 \mathrm{μs}\left({\color{gray}-3.214 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$17.4 \mathrm{ms} \pm 217 \mathrm{μs}\left({\color{gray}3.70 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$17.7 \mathrm{ms} \pm 224 \mathrm{μs}\left({\color{gray}1.96 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$17.0 \mathrm{ms} \pm 182 \mathrm{μs}\left({\color{gray}-1.735 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$17.9 \mathrm{ms} \pm 223 \mathrm{μs}\left({\color{gray}3.73 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$17.2 \mathrm{ms} \pm 248 \mathrm{μs}\left({\color{gray}2.40 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property depths: DT=255, PT=255, ET=255, E=255 $$68.0 \mathrm{ms} \pm 380 \mathrm{μs}\left({\color{gray}0.895 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=0, E=0 $$39.2 \mathrm{ms} \pm 236 \mathrm{μs}\left({\color{gray}-2.045 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=2, PT=2, ET=2, E=2 $$57.3 \mathrm{ms} \pm 205 \mathrm{μs}\left({\color{gray}0.432 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=0, E=2 $$42.8 \mathrm{ms} \pm 265 \mathrm{μs}\left({\color{gray}-1.538 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=2, E=2 $$49.1 \mathrm{ms} \pm 223 \mathrm{μs}\left({\color{gray}-0.272 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=2, ET=2, E=2 $$54.1 \mathrm{ms} \pm 195 \mathrm{μs}\left({\color{gray}1.63 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=255, PT=255, ET=255, E=255 $$112 \mathrm{ms} \pm 574 \mathrm{μs}\left({\color{gray}0.241 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=0, E=0 $$43.5 \mathrm{ms} \pm 259 \mathrm{μs}\left({\color{gray}-1.086 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=2, PT=2, ET=2, E=2 $$102 \mathrm{ms} \pm 382 \mathrm{μs}\left({\color{gray}1.32 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=0, E=2 $$86.1 \mathrm{ms} \pm 750 \mathrm{μs}\left({\color{gray}4.25 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=2, E=2 $$94.6 \mathrm{ms} \pm 573 \mathrm{μs}\left({\color{gray}3.79 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=2, ET=2, E=2 $$99.7 \mathrm{ms} \pm 455 \mathrm{μs}\left({\color{gray}1.99 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity_type

Function Value Mean Flame graphs
get_entity_type_by_id Account ID: d4e16033-c281-4cde-aa35-9085bf2e7579 $$1.39 \mathrm{ms} \pm 3.62 \mathrm{μs}\left({\color{gray}-0.611 \mathrm{\%}}\right) $$ Flame Graph

scaling_read_entity_complete_one_depth

Function Value Mean Flame graphs
entity_by_id 50 entities $$270 \mathrm{ms} \pm 945 \mathrm{μs}\left({\color{gray}-1.946 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 5 entities $$26.6 \mathrm{ms} \pm 217 \mathrm{μs}\left({\color{gray}-0.973 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1 entities $$20.8 \mathrm{ms} \pm 156 \mathrm{μs}\left({\color{gray}3.16 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$59.5 \mathrm{ms} \pm 898 \mathrm{μs}\left({\color{gray}3.83 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 25 entities $$182 \mathrm{ms} \pm 1.21 \mathrm{ms}\left({\color{gray}2.31 \mathrm{\%}}\right) $$ Flame Graph

scaling_read_entity_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$1.97 \mathrm{ms} \pm 7.45 \mathrm{μs}\left({\color{gray}0.858 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$2.11 \mathrm{ms} \pm 6.24 \mathrm{μs}\left({\color{gray}-1.306 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$1.95 \mathrm{ms} \pm 5.98 \mathrm{μs}\left({\color{gray}-2.683 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$2.89 \mathrm{ms} \pm 12.9 \mathrm{μs}\left({\color{gray}-1.833 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$14.2 \mathrm{ms} \pm 58.4 \mathrm{μs}\left({\color{gray}-2.478 \mathrm{\%}}\right) $$ Flame Graph

scaling_read_entity_complete_zero_depth

Function Value Mean Flame graphs
entity_by_id 50 entities $$5.21 \mathrm{ms} \pm 45.6 \mathrm{μs}\left({\color{red}28.1 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 5 entities $$1.97 \mathrm{ms} \pm 8.83 \mathrm{μs}\left({\color{gray}-0.375 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1 entities $$1.94 \mathrm{ms} \pm 5.41 \mathrm{μs}\left({\color{gray}-0.214 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$2.17 \mathrm{ms} \pm 10.2 \mathrm{μs}\left({\color{gray}3.19 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 25 entities $$3.39 \mathrm{ms} \pm 16.3 \mathrm{μs}\left({\color{gray}1.54 \mathrm{\%}}\right) $$ Flame Graph

Merged via the queue into main with commit 6a10e5e Dec 3, 2024
166 checks passed
@indietyp indietyp deleted the bm/h-3689-replace-check-dependency-version-consistency-with-yarn branch December 3, 2024 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/apps > hash* Affects HASH (a `hash-*` app) area/apps > hash-api Affects the HASH API (app) area/apps > hash-realtime area/apps > hash-search-loader area/apps area/deps Relates to third-party dependencies (area) area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team
Development

Successfully merging this pull request may close these issues.

2 participants