e2e/qa: skip per-type capacity check when onchain max is zero#3697
Draft
nikw9944 wants to merge 1 commit into
Draft
e2e/qa: skip per-type capacity check when onchain max is zero#3697nikw9944 wants to merge 1 commit into
nikw9944 wants to merge 1 commit into
Conversation
Mirror the onchain semantic in qa.Test.ValidDevices: a per-type max of zero (max_unicast_users, max_multicast_publishers, max_multicast_subscribers) means the cap is not enforced. The create_core user processor only fails with MaxUnicastUsersExceeded when max > 0 && count >= max, so the QA filter should skip the per-type bucket entirely when max is zero and fall through to the aggregate users check. Fixes the regression where qa.alldevices on mainnet-beta dropped from testing 85 devices to testing 3 — 92 of 96 activated mainnet-beta devices have max_unicast_users == 0 and were silently excluded. malbeclabs/infra#1294
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
typeMax > 0guard to the per-type capacity check inqa.Test.ValidDevicesso it mirrors the onchain semantic. Onchain (smartcontract/programs/doublezero-serviceability/src/processors/user/create_core.rs), the per-type cap is only enforced whenmax > 0; a max of zero means "no per-type cap." The QA filter now falls through to the aggregateMaxUsers - UsersCountcheck in that case.qa.alldevicesregression introduced by e2e/qa: check per-type device capacity in ValidDevices #3563, where the test dropped from exercising 85 devices to 3. 92 of 96 activated mainnet-beta devices havemax_unicast_users == 0and were silently excluded; only the three with a non-zero per-type cap and free slots (fra-velia,frankry,allnodes-fra1) survived.nyc001-dz002atmax_unicast_users=29, unicast_users_count=29) is still filtered becausemax > 0 && max - count < minCapacity.e2e/internal/qa/test_test.gocovering: per-type cap saturated (still excluded), per-type max zero with users (now included), aggregate cap saturated under zero per-type cap (still excluded),skipCapacityCheck,"test"-coded devices, and equivalent coverage for multicast publisher/subscriber.Testing Verification
TestValidDevices_Unicast,TestValidDevices_MulticastPublisher, andTestValidDevices_MulticastSubscribertable tests pass undergo test ./e2e/internal/qa/....TestValidDevices_Unicast/per-type_max_zero_with_users_counted_is_included_(regression_fix); it failed as expected (frankfurt-edgemissing from result), confirming the test would have caught this regression had it existed when e2e/qa: check per-type device capacity in ValidDevices #3563 landed.go vet ./e2e/internal/qa/...andgo build -tags=qa ./e2e/internal/qa/...both clean.qa.alldevicesrun with this fix correctly includes ~85+ devices. Devices withmax_unicast_users=0pass through to the aggregate check.nyc001-dz002(saturated at 29/29) is correctly filtered by the per-type check.