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

test: add repositories.bzl snapshot tests for each lockfile version #2057

Merged
merged 1 commit into from
Jan 12, 2025

Conversation

jbedard
Copy link
Member

@jbedard jbedard commented Jan 5, 2025

Adding the test snapshot files to ensure we see unexpected changes when changing related code.


Changes are visible to end-users: no

Test plan

  • New test cases added

Copy link

aspect-workflows bot commented Jan 5, 2025

Test

All tests were cache hits

212 tests (100.0%) were fully cached saving 38s.


Test

e2e/bzlmod

All tests were cache hits

5 tests (100.0%) were fully cached saving 782ms.


Test

e2e/gyp_no_install_script

All tests were cache hits

2 tests (100.0%) were fully cached saving 138ms.


Test

e2e/js_image_oci

All tests were cache hits

1 test (100.0%) was fully cached saving 6s.


Test

e2e/npm_link_package

All tests were cache hits

3 tests (100.0%) were fully cached saving 555ms.


Test

e2e/npm_link_package-esm

All tests were cache hits

3 tests (100.0%) were fully cached saving 575ms.


Test

e2e/npm_translate_lock

All tests were cache hits

1 test (100.0%) was fully cached saving 26ms.


Test

e2e/npm_translate_lock_empty

All tests were cache hits

1 test (100.0%) was fully cached saving 26ms.


Test

e2e/npm_translate_lock_multi

All tests were cache hits

2 tests (100.0%) were fully cached saving 97ms.


Test

e2e/npm_translate_lock_partial_clone

All tests were cache hits

1 test (100.0%) was fully cached saving 22ms.


Test

e2e/npm_translate_lock_replace_packages

All tests were cache hits

3 tests (100.0%) were fully cached saving 317ms.


Test

e2e/npm_translate_lock_subdir_patch

All tests were cache hits

1 test (100.0%) was fully cached saving 93ms.


Test

e2e/npm_translate_package_lock

All tests were cache hits

1 test (100.0%) was fully cached saving 26ms.


Test

e2e/npm_translate_yarn_lock

All tests were cache hits

1 test (100.0%) was fully cached saving 26ms.


Test

e2e/package_json_module

All tests were cache hits

1 test (100.0%) was fully cached saving 362ms.


Test

e2e/pnpm_lockfiles

All tests were cache hits

40 tests (100.0%) were fully cached saving 3s.


Test

e2e/pnpm_workspace

All tests were cache hits

10 tests (100.0%) were fully cached saving 2s.


Test

e2e/pnpm_workspace_rerooted

All tests were cache hits

12 tests (100.0%) were fully cached saving 2s.


Test

e2e/repo_mapping

All tests were cache hits

2 tests (100.0%) were fully cached saving 276ms.


Test

e2e/rules_foo

All tests were cache hits

2 tests (100.0%) were fully cached saving 263ms.


Test

e2e/runfiles

All tests were cache hits

1 test (100.0%) was fully cached saving 100ms.


Test

e2e/vendored_node

All tests were cache hits

1 test (100.0%) was fully cached saving 181ms.


Buildifier      Format

@alexeagle
Copy link
Member

I wish we didn't have so many of these - they are big and brittle, and it's hard to tell whether the changes to these "golden" files are desirable or not. Would it be just as good to test just one of them?

@jbedard
Copy link
Member Author

jbedard commented Jan 6, 2025

I explicitly want to see the diff between the pnpm versions and make sure changes to them align. These ones (e2e/pnpm_lockfiles) are easy to update with 1 sh script, it's all just for me to look at the diffs for each version.

@jbedard jbedard force-pushed the pnpm_lockfiles-repos.bzl branch from 2077cf8 to c1631a8 Compare January 6, 2025 21:53
Copy link
Collaborator

@dzbarsky dzbarsky left a comment

Choose a reason for hiding this comment

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

while the huge amount of goop is annoying, given how pnpm behavior differs between the versions it seems reasonable to have the various goldens. Perhaps the right path forward is to start dropping support for the older versions, v 5.4 was released 5 years ago ;)

@jbedard jbedard merged commit a82d064 into aspect-build:main Jan 12, 2025
93 checks passed
@jbedard jbedard deleted the pnpm_lockfiles-repos.bzl branch January 12, 2025 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants