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: build: Add tests to sanity check embedded built-in actors metadata #11684

Merged
merged 1 commit into from
Mar 6, 2024

Conversation

masih
Copy link
Member

@masih masih commented Mar 5, 2024

Related Issues

#11683

Proposed Changes

Add tests that assert the embedded built-in actors metadata is correct:

  • the corresponding CAR file is present in built-in actors released
    assets as a CAR file.
  • the corresponding tar.zst is locally present and matches the expected
    SHA-256 digest
  • manifest CID is the only root CID in the corresponding CAR file.
  • actor CIDs are present in the corresponding CAR file.

Configure a dedicated CI workflow to only run the tests on:

  • release/* branches,
  • modification to build/builtin_actors_gen.go,
  • or embedded ZST files.

Additional Info

Note: only the latest network version seem to have BundleGitTag. Tests depend on this value to fetch the right CAR file.

Checklist

Before you mark the PR ready for review, please make sure that:

  • Commits have a clear commit message.
  • PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, test
    • area, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps
  • If the PR affects users (e.g., new feature, bug fix, system requirements change), update the CHANGELOG.md and add details to the UNRELEASED section.
  • New features have usage guidelines and / or documentation updates in
  • Tests exist for new functionality or change in behavior
  • CI is green

@Stebalien Stebalien enabled auto-merge (squash) March 5, 2024 21:47
Copy link
Member

@rvagg rvagg left a comment

Choose a reason for hiding this comment

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

Just want to note that I've been running unit tests locally (per #11628) and wouldn't mind if we could try and keep them fairly minimal, and even squish down some of the slow ones we currently have. This is only ~9s for me, which is not the worst, but it all stacks up.

Maybe we should do a pass some time and do a skip based on os.Getenv("CI") to make it more practical. This one would probably be in that category.

@jennijuju
Copy link
Member

Can this to be only run in CI when a PR is open against releases branch?

@masih
Copy link
Member Author

masih commented Mar 6, 2024

os.Getenv("CI")

I have a better idea; I'll change this PR to:

  • compare sha256 of files that are already downloaded as Steven suggested.
  • only run it if either builtin_actors_gen.go or zst files in /build/actors change.

That should significantly shave time off the 10 seconds it takes to run these tests which seems to be an issue.

@masih masih force-pushed the masih/test-embedded-car-bundle-metadata branch from f95799c to 4135d5a Compare March 6, 2024 10:49
Add tests that assert the embedded built-in actors metadata is correct:

* the corresponding CAR file is present in built-in actors released
  assets as a CAR file.
* the corresponding tar.zst is locally present and matches the expected
  SHA-256 digest
* manifest CID is the only root CID in the corresponding CAR file.
* actor CIDs are present in the corresponding CAR file.

Configure a dedicated CI workflow to only run the tests on:
 * `release/*` branches,
 * modification to `build/builtin_actors_gen.go`,
 * or embedded ZST files.

Fixes #11683
@masih masih force-pushed the masih/test-embedded-car-bundle-metadata branch from 19af7ea to 283f6ca Compare March 6, 2024 11:25
@Stebalien Stebalien merged commit 1d4f539 into master Mar 6, 2024
84 of 88 checks passed
@Stebalien Stebalien deleted the masih/test-embedded-car-bundle-metadata branch March 6, 2024 11:38
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.

4 participants