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

chore(PocketIC): use sequence numbers as state labels #2157

Merged
merged 49 commits into from
Oct 25, 2024

Conversation

mraszyk
Copy link
Contributor

@mraszyk mraszyk commented Oct 21, 2024

This PR replaces a state label derived from the certified state by a sequence number. The reason for this change is that parts of a PocketIC instance state are not certified (e.g., ingress and canister http pools) and thus they are not reflected in the state label. Because it is not clear why having the same state label for two different instances with the same state would be beneficial at the moment, this PR uses sequence numbers as state labels.

This PR also fixes a bug when deleting an instance: an instance should not be deleted if it is still busy with a computation.

Finally,

  • the size of the test //packages/pocket-ic:test is reduced back to small (this test is fast again);
  • outdated comments are removed;
  • unnecessary Debug implementations are removed.

@mraszyk mraszyk requested a review from a team as a code owner October 21, 2024 14:29
@github-actions github-actions bot added the chore label Oct 21, 2024
@mraszyk mraszyk marked this pull request as draft October 21, 2024 17:34
@mraszyk mraszyk changed the title chore(PocketIC): generate state labels randomly chore(PocketIC): use sequence numbers as state labels Oct 22, 2024
@mraszyk mraszyk marked this pull request as ready for review October 25, 2024 11:01
@mraszyk mraszyk added this pull request to the merge queue Oct 25, 2024
Merged via the queue into master with commit 0df03ce Oct 25, 2024
27 checks passed
@mraszyk mraszyk deleted the mraszyk/pic-random-state-label branch October 25, 2024 11:27
nmattia pushed a commit that referenced this pull request Oct 25, 2024
This PR replaces a state label derived from the certified state by a
sequence number. The reason for this change is that parts of a PocketIC
instance state are not certified (e.g., ingress and canister http pools)
and thus they are not reflected in the state label. Because it is not
clear why having the same state label for two different instances with
the same state would be beneficial at the moment, this PR uses sequence
numbers as state labels.

This PR also fixes a bug when deleting an instance: an instance should
not be deleted if it is still busy with a computation.

Finally,
- the size of the test `//packages/pocket-ic:test` is reduced back to
small (this test is fast again);
- outdated comments are removed;
- unnecessary Debug implementations are removed.

---------

Co-authored-by: IDX GitHub Automation <IDX GitHub Automation>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants