test: cover the resume release, the gated DELETE and the overfill, part 3 of 3 (upload-session-concurrency-cap plan: 12/12)

Stacked MRs

Part MR Scope Status
1/3 !3315 (merged) CancelSession, the DELETE move, the resume's release merged
2/3 !3316 (merged) turn the resume charge on merged
3/3 this MR handler tests and the e2e overfill targets main

Merge order: !3315 (merged) and !3316 (merged) have merged. This MR is rebased onto main and is the last of the three.

Summary

Step 12, part 3 of 3. Tests and the e2e scenario, plus one note on a GCS gap. No production behaviour change.

  • OCI handler: each enumerated PATCH and PUT exit past a resume books exactly one release, also on a panic.
  • OCI handler: with a real gate behind ResumeSession, a PATCH and a PUT that carries its chunk shed, and a DELETE of the same session still answers 204, for docker and oci. Since !3316 (merged) a bodyless PUT takes no unit, so it is not one of the sheds.
  • e2e: e2e.docker.publish.upload-slots-exhausted and e2e.oci.publish.upload-slots-exhausted. Six sessions open first. Five declared-length PATCHes are then held through the ingress at a cap of 2 per pod. At least one sheds with 503 and a Retry-After of 28 to 42 seconds, the refused session survives, a DELETE of the sixth session mid-hold answers 204, and a retry completes.
  • GCS: a bodyless PUT takes no slot, but on GCS its writer open still reads the marker tail into a 256 KiB buffer. The ResumeToCommit doc and the max_concurrent_upload_sessions row now say so, and the resume comment in pg_blobstore.go points to that doc. storage.md already did. This was decided in the !3316 (merged) review thread (!3316 (comment 4020688500)). The driver change is tracked in #1634 (closed).

Governing ADRs

Same as parts 1 and 2. No behaviour change here.

Testing

  • Rebased onto main after !3316 (merged) merged. The two fakes behind ResumeSession take the new purpose parameter. The gated one charges only a ResumeToStage resume, as the real store does. Inverting that check turns the gated DELETE test red.
  • Hooks pass over the whole range. go vet and golangci-lint with -tags=e2e are clean. e2e-catalog check reports 0 disagreements.
  • The two e2e tests have not run locally, since there was no k3d rig. CI is the first run: test:e2e:caproni:instance passed on the pipeline for 960a0416 (https://gitlab.com/gitlab-org/ops/artifact-registry/-/jobs/17222838294). It has not been played on a later head. The e2e changes since then leave the rows' behaviour as it was: comment and recipe wording, a //nolint line, and a named bound with the same value.
  • The rows drive raw upload sessions, not docker. No docker client can hold a chunk open, and its requests carry no id the test can match. So how docker reacts to a refused chunk stays unrecorded, and limitations.md says so.
  • docs/user: no change.

Plan and spec amendments

In the plan:

  • e2e: the rows drive raw sessions, and why.
  • Step 12 Files: lists the test files the catalog check makes this step carry, the regenerated scenario ids, and the shared splitHeldUploads.
  • Three pointers to the container scenario now use its upload-slots-exhausted name.
  • Status: the Step 12 row records the three MRs.

Size

849 LOC at 69d74812, added plus removed: 468 OCI handler tests, 318 e2e, 57 docs, 6 in code comments. This is already the third part of a split step. The handler tests and the e2e rows check different layers and share no file, so another split would only add a merge step.

Closes #1242 (closed)

Edited by Dzmitry (Dima) Meshcharakou

Merge request reports

Loading
Loading