Repository navigation
Create new clusters at 1.37 on the Rapid channel - #56
Conversation
aditya-shantanu
left a comment
There was a problem hiding this comment.
Reviewed the two commits on top of #41 (cee81b7, 1f3b884). The channel plumbing is consistent end to end: RELEASE_CHANNEL reaches this repo's setup-gcp, nil vs UNSPECIFIED is handled correctly in the create request, extended is refused before anything hits GKE, and the dry-run fixture exercises the project-screen check. go vet and go test ./... pass in both modules at this head; CI is green and the branch is mergeable. One non-blocking note inline.
aditya-shantanu
left a comment
There was a problem hiding this comment.
Approval at 1f3b884 stands. 5ec325f fixes the prior nit (acknowledge-and-continue, focus on the version field); thread resolved. go vet and go test ./... pass in both modules at 5ec325f.
The PR is CONFLICTING with main and needs a rebase. Still stacked on #41 (merge-base f210ca7); README.md and the three SVGs conflict with #41 alone, so those four belong to that rebase.
README.md(1 hunk, step 3/4 table rows) anddocs/screenshots/{clusters,guard,provision}.svg: textual; regenerate the SVGs.tools/setup-gcp/cmd/cluster.go(2 hunks): textual. #55 removeddeleteCluster, which this PR'sreleaseChannels/validateReleaseChannelwere appended after; and main now callsNewClusterManagerClient(ctx, clientOptions...), keep that plus thevalidateReleaseChannelcall.--release-channelstill fits post-#55createClusterIdempotent(only applied on create; existing clusters are kept as-is).installer/internal/ui/screens_gcp.go(3 hunks): the struct-field andUpdatehunks are textual; thesubmit()hunk is semantic. #47 rewrotesubmit()to run all probes under onectx(30ssubmitTimeout, esc-cancellable viavalidateCancel), tag results withseq, and skip the later probes whenblocked(no billing / no GKE API). The channel check must follow: pass thatctxtochannelProblem/ChannelVersionsinstead ofcontext.Background()(otherwise a slowget-server-configoutlives the deadline and esc), gate it on!blocked(otherwise a project without the API pays a doomed gcloud call every retry), andprojValidMsgneedsseqalongsidechannelPairso a stale result cannot setchannelAcked.
5ec325f to
3d06678
Compare
|
Rebased onto main (#41, #47, #55, #59 are all in now). The channel check now runs inside #47's submit: same ctx and deadline, skipped when billing or the GKE API is off, and tied to the submit's seq. setup-gcp kept the client options from main and lost deleteCluster like #55 did. Squashed the installer part into one commit. |
aditya-shantanu
left a comment
There was a problem hiding this comment.
Approval stands at 3d06678 pending a trivial rebase; not re-approving a conflicting head. Main moved to 693f426 (#63, #64) after this push and git merge-tree origin/main pr-56 now conflicts in one file:
tools/setup-gcp/cmd/cluster.go: textual. #63'srequiredNodeSysctlsand this PR'sreleaseChannelsare both inserted afterrequiredBetaAPIs; keep both. Everything else auto-merges, and setup-gcpgo vet/go testpass on that trial merge.
The code at this head is right. The rebase onto #47/#59 is as asked: the channel check runs under the submit's shared ctx and deadline, is gated on !blocked, its result rides the seq-tagged projValidMsg and is dropped when stale, and channelAcked resets on any edit alongside probeAcked/permAcked (prior thread resolved; the zone-edit case is in the test). --release-channel fits post-#55 createClusterIdempotent: nil vs UNSPECIFIED handled, applied only on the create path, extended refused up front. README and clusters.svg show the 1.37 default.
go vet and go test ./... pass in both modules at 3d06678. The UNSTABLE/DIRTY state beyond the conflict is only the Actions security-scan workflow awaiting approval.
One non-blocking nit inline. Also non-blocking: no test drives the channel check through the deadline or stale-seq path specifically; the shared-ctx tests from #47/#59 cover the mechanism. Open #53 also conflicts with this PR in snapshot.go/snapshot_test.go (adjacent env additions); whichever lands second rebases.
setup-gcp could pin a cluster version but not a channel, so new clusters always landed on Regular, and Regular doesn't carry 1.37. This adds --release-channel / RELEASE_CHANNEL to bootstrap and create cluster. Empty leaves the channel unset like before; "none" is an explicit unenroll. "extended" is rejected up front since it won't allow the beta APIs we turn on. Same change as agent-substrate/substrate#1797, now that setup-gcp lives here.
1.37 serves the PodCertificate APIs as v1, which Substrate uses from v0.4.0, so a new cluster at 1.37 needs no beta APIs and never needs its node pools replaced. Rapid is the only channel with 1.37 right now. The advanced track gets a release channel field next to the version. We ask GKE (get-server-config) whether the channel offers the version and warn if it doesn't; submitting again goes on, since it only matters if you create a cluster. The check runs under the submit deadline, skips blocked projects, and any edit re-arms it. Extended is refused outright.
If get-server-config was the check that ran out the submit deadline, the error was swallowed and the submit went on after 30s with no word. Now it says "timed out" like the other checks, and submitting again goes on. The channel test also drives the project screen directly instead of walking the wizard to it (38s down to 2s), which keeps the ui package under go test's 10 minute default.
3d06678 to
d79c3cb
Compare
aditya-shantanu
left a comment
There was a problem hiding this comment.
Approved at d79c3cb.
Rebased onto d8b6131 (#53/#63/#64 in). The two carried commits match 3d06678 hunk for hunk apart from conflict resolution: cluster.go keeps both requiredNodeSysctls and releaseChannels; snapshot.go env() keeps #53's NETWORK/SUBNETWORK/ENABLE_DATAPLANE_V2 plus RELEASE_CHANNEL, with tests for both. d79c3cb closes the prior nit: channelProblem routes a deadline hit through deadlineHit, so the #59 "timed out" wording shows and the next submit goes on; an Esc cancel stays silent since deadlineHit keys off DeadlineExceeded. TestAChannelLookupThatTimesOutSaysSo covers both branches; thread resolved. The channel-field test now drives projectScreen directly (cheaper) and still covers the zone-edit reset.
go vet ./... and go test ./... pass in installer/ (ui 574s) and tools/setup-gcp/ at d79c3cb. git merge-tree origin/main pr-56 is clean. Note: conflicts with open #65 in ui_test.go and clusters.svg; whichever lands second needs a rebase.
* Fit cluster list rows to the terminal so the badges stay visible Each row was about 100 columns wide, and beside the sidebar the list only gets about 47 at 80 columns, so the readiness badges were cut off in most terminals. Now the list picks one layout that fits every row: it shortens the GKE version suffix, then switches to short badges, then drops node count, location and version. Names only get truncated as a last resort, since clusters often share a prefix. Also "1 node" instead of "1 nodes". * Make the badge assertions fail without the badge "installed" and "partial" were also matched by the dry-run cluster names substrate-installed and substrate-partial, so those tests passed with no badge at all. A leading space matches both badge forms but not the names. * Regenerate the clusters screenshot after rebasing onto #56
New clusters now get created at 1.37 on the Rapid channel instead of 1.36 on Regular. With the v0.4.0 pin Substrate uses the v1 PodCertificate APIs, so a 1.37 cluster doesn't need the beta APIs and never needs its node pools replaced. Rapid is the only channel that has 1.37 right now.
tools/setup-gcpgets--release-channel/RELEASE_CHANNEL(same change as setup-gcp: let callers choose the cluster's release channel agent-substrate/substrate#1797, now that setup-gcp lives here).Rebased onto main now that #41 is in, so it's just the two commits.
Tested the channel check against real
get-server-configoutput (only Rapid has 1.37 today) plus unit and UI tests.