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

Wrong canister principals are generated by dfx generate and other #3733

Open
vporton opened this issue Apr 28, 2024 · 2 comments
Open

Wrong canister principals are generated by dfx generate and other #3733

vporton opened this issue Apr 28, 2024 · 2 comments
Labels
needs-triage This ticket needs investigation.

Comments

@vporton
Copy link
Contributor

vporton commented Apr 28, 2024

Wrong canister principals are generated by dfx generate, if canisters were not created/deployed before calling generate. For more details see here.

The bug seems repeatable by DFX 0.19.0.

The bug also appears in my PR #3710. After this PR, the bug appears not only in dfx generate, but also in dfx deploy (and probably dfx build). Meanwhile, if I did testing right, in 0.19.0 it appears only for dfx generate.

I tried the following:

  1. Start DFX
  2. run dfx generate in an ICP software folder.

I expected to see this happen: dfx generate to bail out like dfx build does in this situation.

Instead, this happened: Wrong canister principals are put into .dfx/local/lsp/.

@vporton vporton added the needs-triage This ticket needs investigation. label Apr 28, 2024
@vporton
Copy link
Contributor Author

vporton commented Apr 29, 2024

This bug happens not only on dfx generate. The following also caused it:

for i in main order personhood payments pst CanDBIndex NacDBIndex CanDBPartition NacDBPartition ic_eth internet_identity; do dfx deploy -vv $i; done
in https://github.com/vporton/zondirectory2 repo

vporton added a commit to vporton/sdk that referenced this issue Apr 29, 2024
vporton added a commit to vporton/sdk that referenced this issue Apr 29, 2024
@vporton
Copy link
Contributor Author

vporton commented Apr 29, 2024

I determined that this bug happens even without generate in branch build-only-necessary, not the upstream master branch.

The branch build-only-necessary-dev contains the test wrong_ids.bash that seems to reliably reprise this bug.

@vporton vporton changed the title Wrong canister principals are generated by dfx generate Wrong canister principals are generated by dfx generate and other Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage This ticket needs investigation.
Projects
None yet
Development

No branches or pull requests

1 participant