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-3691: Replace lockfile-lint with yarn constraints #5858

Merged
merged 5 commits into from
Dec 13, 2024

Conversation

indietyp
Copy link
Member

🌟 What is the purpose of this PR?

lockfile-lint is quite simple in it's use-case (for us it's simply checking the source and parsing the file). Instead of needing to use a new tool to do so we can make use of yarn constraints to ensure that we don't use any of the sources we currently do not allow.

This also allows us to make changes that are a lot more stringent than lockfile-lint allowed previously. See the change to see what we're enforcing and how.

we also support the patch: protocol, unlike lockfile-lint

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

@github-actions github-actions bot added area/deps Relates to third-party dependencies (area) area/infra Relates to version control, CI, CD or IaC (area) labels Dec 11, 2024
Copy link

codecov bot commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 22.87%. Comparing base (5e43293) to head (035bd36).
Report is 9 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5858   +/-   ##
=======================================
  Coverage   22.87%   22.87%           
=======================================
  Files         572      573    +1     
  Lines       19415    19428   +13     
  Branches     2752     2754    +2     
=======================================
+ Hits         4442     4445    +3     
- Misses      14920    14930   +10     
  Partials       53       53           
Flag Coverage Δ
local.hash-subgraph 24.54% <ø> (ø)
rust.error-stack 72.51% <ø> (ø)

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.

CiaranMn
CiaranMn previously approved these changes Dec 13, 2024
Copy link
Contributor

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/organization/v/1 $$17.1 \mathrm{ms} \pm 196 \mathrm{μs}\left({\color{lightgreen}-29.224 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$16.3 \mathrm{ms} \pm 172 \mathrm{μs}\left({\color{gray}-2.998 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$16.0 \mathrm{ms} \pm 172 \mathrm{μs}\left({\color{lightgreen}-8.524 \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 200 \mathrm{μs}\left({\color{gray}3.34 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$17.0 \mathrm{ms} \pm 221 \mathrm{μs}\left({\color{gray}-1.179 \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 193 \mathrm{μs}\left({\color{gray}2.90 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/block/v/1 $$16.6 \mathrm{ms} \pm 202 \mathrm{μs}\left({\color{lightgreen}-5.032 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$16.3 \mathrm{ms} \pm 206 \mathrm{μs}\left({\color{lightgreen}-31.872 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$17.6 \mathrm{ms} \pm 233 \mathrm{μs}\left({\color{gray}0.785 \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 $$67.5 \mathrm{ms} \pm 418 \mathrm{μs}\left({\color{gray}0.985 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=0, E=0 $$38.9 \mathrm{ms} \pm 106 \mathrm{μs}\left({\color{gray}-2.536 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=2, PT=2, ET=2, E=2 $$58.0 \mathrm{ms} \pm 153 \mathrm{μs}\left({\color{gray}0.692 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=0, E=2 $$44.3 \mathrm{ms} \pm 221 \mathrm{μs}\left({\color{gray}1.30 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=2, E=2 $$50.0 \mathrm{ms} \pm 227 \mathrm{μs}\left({\color{gray}-0.750 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=2, ET=2, E=2 $$54.4 \mathrm{ms} \pm 365 \mathrm{μs}\left({\color{gray}0.953 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=255, PT=255, ET=255, E=255 $$109 \mathrm{ms} \pm 571 \mathrm{μs}\left({\color{gray}-1.539 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=0, E=0 $$44.0 \mathrm{ms} \pm 152 \mathrm{μs}\left({\color{gray}1.17 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=2, PT=2, ET=2, E=2 $$100 \mathrm{ms} \pm 358 \mathrm{μs}\left({\color{gray}-1.944 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=0, E=2 $$85.3 \mathrm{ms} \pm 399 \mathrm{μs}\left({\color{gray}1.37 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=2, E=2 $$92.6 \mathrm{ms} \pm 511 \mathrm{μs}\left({\color{gray}-1.316 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=2, ET=2, E=2 $$98.1 \mathrm{ms} \pm 734 \mathrm{μs}\left({\color{gray}0.031 \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.37 \mathrm{ms} \pm 3.18 \mathrm{μs}\left({\color{gray}-1.078 \mathrm{\%}}\right) $$ Flame Graph

scaling_read_entity_complete_one_depth

Function Value Mean Flame graphs
entity_by_id 50 entities $$268 \mathrm{ms} \pm 2.43 \mathrm{ms}\left({\color{gray}0.256 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 5 entities $$26.5 \mathrm{ms} \pm 141 \mathrm{μs}\left({\color{gray}1.29 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1 entities $$20.0 \mathrm{ms} \pm 58.1 \mathrm{μs}\left({\color{gray}-3.634 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$51.8 \mathrm{ms} \pm 2.49 \mathrm{ms}\left({\color{red}6.66 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 25 entities $$175 \mathrm{ms} \pm 773 \mathrm{μs}\left({\color{gray}-0.506 \mathrm{\%}}\right) $$ Flame Graph

scaling_read_entity_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$1.92 \mathrm{ms} \pm 6.08 \mathrm{μs}\left({\color{gray}0.258 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$2.11 \mathrm{ms} \pm 6.62 \mathrm{μs}\left({\color{gray}2.14 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$1.97 \mathrm{ms} \pm 14.4 \mathrm{μs}\left({\color{gray}0.662 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$2.88 \mathrm{ms} \pm 13.4 \mathrm{μs}\left({\color{gray}0.537 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$13.7 \mathrm{ms} \pm 46.2 \mathrm{μs}\left({\color{gray}-2.279 \mathrm{\%}}\right) $$ Flame Graph

scaling_read_entity_complete_zero_depth

Function Value Mean Flame graphs
entity_by_id 50 entities $$4.02 \mathrm{ms} \pm 19.2 \mathrm{μs}\left({\color{lightgreen}-5.302 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 5 entities $$1.96 \mathrm{ms} \pm 12.0 \mathrm{μs}\left({\color{gray}0.593 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1 entities $$1.95 \mathrm{ms} \pm 11.2 \mathrm{μs}\left({\color{gray}0.750 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$2.15 \mathrm{ms} \pm 9.81 \mathrm{μs}\left({\color{gray}0.883 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 25 entities $$3.32 \mathrm{ms} \pm 7.17 \mathrm{μs}\left({\color{gray}0.399 \mathrm{\%}}\right) $$ Flame Graph

@indietyp indietyp added this pull request to the merge queue Dec 13, 2024
Merged via the queue into main with commit 812560d Dec 13, 2024
166 checks passed
@indietyp indietyp deleted the bm/h-3691-replace-lockfile-lint-with-yarn-constraints branch December 13, 2024 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/apps area/deps Relates to third-party dependencies (area) area/infra Relates to version control, CI, CD or IaC (area)
Development

Successfully merging this pull request may close these issues.

3 participants