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

feat: dfx deps: wasm_hash_url and loose the hash check #3510

Merged
merged 8 commits into from
Jan 17, 2024

Conversation

lwshang
Copy link
Contributor

@lwshang lwshang commented Jan 17, 2024

SDK-1345

Description

Loose the constraint of wasm_hash :

  • If the hash of downloaded wasm doesn’t match the provided hash, dfx deps won’t abort. Instead, it will print a warning message.
  • The hash can still benefit wasm cache invalidation. If a downloaded wasm has the matching hash, dfx deps can skip the downloading.

Add another optional field wasm_hash_url in the pullable metadata.

  • Providers like II can provide the hash through this URL instead of hard coding the hash directly.
  • The hash of an alternative wasm module doesn’t have to be known beforehand. It can be modified later.
  • For II, all flavors can be built in parallel. We will only need:
    • The PROD wasm has the wasm_url and wasm_hash_url in its pullable metadata.
    • The DEV build job pushes the wasm module and its hash through the URLs above.
    • The PROD and DEV build won’t intertwine with each other

How Has This Been Tested?

e2e tests / deps.bash

Checklist:

  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

@lwshang lwshang marked this pull request as ready for review January 17, 2024 20:31
@lwshang lwshang requested review from chenyan-dfinity and a team as code owners January 17, 2024 20:31
@lwshang lwshang merged commit 0863345 into master Jan 17, 2024
172 checks passed
@lwshang lwshang deleted the lwshang/sdk-1345 branch January 17, 2024 22:29
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.

2 participants