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

Add metadata section "icp:public git_commit_id" to canister wasms #1772

Closed
wants to merge 1 commit into from

Conversation

aterga
Copy link

@aterga aterga commented Aug 6, 2023

This PR is a suggestion for adding a metadata section that marks the git_commit_id of this II canister build.

Intended usage:

On locally built canisters:

dfx canister metadata $IIC_CANISTER_ID git_commit_id
0000000000000000000000000000000000000000

On canisters built via CI:

dfx canister metadata $IIC_CANISTER_ID git_commit_id
# Outputs an actual git commit SHA that allows distinguishing canister versions via CLI

Inspired by https://sourcegraph.com/github.com/dfinity/ic/-/blob/bazel/canisters.bzl?L120

@frederikrothenberger
Copy link
Contributor

frederikrothenberger commented Aug 7, 2023

Hi Arshavir

Thanks for the contribution.

Could you give a little bit of context, what this metadata section is used for (other than just being consistent with canisters from the monorepo)?

Is it a requirement, to set 0000000000000000000000000000000000000000 for locally built canisters? Because the build script already has the II_VERSION variable (that is provided to give release information in the front-end), which is "$commit,$release,$dirty". The metadata field should consistent with that.

Is it also an option to just leave the field off completely instead of filling it with bogus content for locally / dirty built canisters?

@nmattia
Copy link
Collaborator

nmattia commented Jan 25, 2024

Closing because this seems stale, feel free to reopen

@nmattia nmattia closed this Jan 25, 2024
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