Skip to content

Start one pipeline in the Pages unpublish scenario, so no deployment lands after the unpublish - #1094

Merged
jmrplens merged 6 commits into
issue-951-decisionsfrom
fix-e2e-pages-push-pipeline
Sep 30, 2026
Merged

jmrplens merged 6 commits into
issue-951-decisionsfrom
fix-e2e-pages-push-pipeline

Conversation

@jmrplens

@jmrplens jmrplens commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

The complete CE run of this stack's top (47ad92602, the issue-951-decisions head before the stack was rebased onto b44ab96; GitLab 19.4.1) failed one end-to-end scenario, and the failure is neither in the server nor in anything this stack changes: TestPages_Unpublish_RemovesTheDeployment raced its own second pipeline. This layer, the new top of the stack, fixes the scenario.

Two pipelines deployed every site

The scenario commits a Pages configuration to the default branch and then creates a pipeline, so every project ran two: the push started one and the fixture the other, which is why the pipelines the three surfaces waited for were 33, 35 and 37. Both run the pages job, and both deploy the site.

The wait for a deployment was therefore met by whichever deployment came first. On the meta surface, the unpublish and the read after it completed within 200 ms of the read that met the wait, and that last read still listed a deployment created in the same second: the other pipeline's, deployed after Pages::DeleteService had deactivated every active one. The dynamic and individual surfaces passed on the same run, and the same scenario passed on the stack's earlier Docker runs.

The fix

deployPages now commits the configuration with [skip ci], as the model evaluation's commitCIConfiguration already commits the configurations of the worlds it builds, so the pipeline the fixture creates is the only one and its deployment is the one the wait sees. GitLab ignores the marker for a pipeline created through the API (lib/api/ci/pipelines.rb calls Ci::CreatePipelineService with ignore_skip_ci: true), so that pipeline still runs. The push still records a pipeline of its own, in the skipped state and with no job (Gitlab::Ci::Pipeline::Chain::Skip), so each project still takes two pipeline IDs and the one the fixture waits for is every other one (32, 34 and 36 on the passing CE run, 33, 35 and 37 on the EE run). What the scenario holds is unchanged: a deployment exists before the unpublish, and after it the settings list none or the read is refused as not found.

Other scenarios also commit a CI configuration and then create a pipeline through the API, so they run a second pipeline too: the job lifecycle, the resource group and the SAST report pipeline, and every scenario built on fixture.CIFile. None of them reads anything the push's pipeline can change after its wait: the job reads are pinned to the created pipeline or resolved to the newest successful one, the resource group scenario asserts only the shape of what is queued, the SAST findings are read for the created pipeline's iid, and the pipeline lifecycle already accepts a latest pipeline no older than the one it created. None of them failed on these runs, and this layer leaves them as they are. The release job scenario is not one of them: its one job runs only on a tag, so the branch push starts nothing, and the tag pipeline it waits for runs on the commit that carries the configuration, where the marker would skip the only pipeline it has.

Checks

  • Docker, complete runs at this layer before the rebase onto b44ab96 (e600a73d0 on the previous base 50ef2cf, the same patches as e4d21e7 on b44ab96), with the skip gate on: the licensed run on GitLab 19.4.1-ee passed, 1332 tests with no failure and no skip; the unlicensed run on 19.4.1 passed, 1067 tests with no failure and no skip. The skip gate read 0 skipped, 0 declared, 0 undeclared and 0 stale on both. The Pages scenario passed on all three surfaces of both runs.
  • The run that found it: the CE run of 47ad92602, the layer below before the rebase, on the same 19.4.1: 1067 tests, 2 failures (the scenario and its meta subtest), 0 skipped. Nothing else failed.
  • Coverage record: re-recorded from the two passing runs in a commit of its own. The levels are unchanged (CE L1 834 of 872, L2 730, L3 714; EE L1 1028 of 1092, L2 924, L3 908), the test calls grow to 3524 and 4671, and every package entry names e600a73d0, the pre-rebase tree the runs tested. make check-e2e-coverage-record and make check-e2e-coverage-page pass.
  • At e600a73d0, before the rebase, with the freshness gates checked (the record commit above it changes only the two coverage files, whose gates, check-e2e-static and the freshness checks were run again after it): it builds and vets (plain and under the e2e, httpe2e, stdioe2e and collectore2e tags), every e2e package compiles, and the serialtypecheck gate passes, under -race too; the whole unit suite passes shuffled (276 packages); every make target of CI's generated-artifacts job passes, with check-request-inventory on a recording of the whole suite (1625 rows, unchanged); make golangci-lint and make govulncheck report nothing; test/e2e/http passes (605 tests, the 7 Docker-only proxy and balancer cases skipped) and test/e2e/stdio passes (118 tests).
  • After the rebase onto b44ab96 (Record the upstream state of 2026-09-30 in the register #1083, Record the merge of gitlab-org/gitlab!255702 and the rebase of gitlab-org/gitlab!255704 #1084 and Update the dependencies the cooldown admits, and pin the site past five advisories published on 29 September #1085, none of which touches a file this stack writes): at a5401f1 it builds and vets (plain and under the e2e, httpe2e, stdioe2e and collectore2e tags), every e2e gitlab package compiles, the unit suites of the six packages the stack touches pass shuffled, make check-tenancy reads 83 rows and 308 sites, and the freshness gates CI runs pass: the README statistics, the llms files, the LobeHub manifest, the model evaluation corpus and results, the e2e coverage record and page, the token footprint, the site stats, the benchmark charts, the action catalog manifest, the testing reference, the request inventory and the golden snapshots. check-e2e-static, brand-check, check-install-buttons, check-doc-tool-names, check-doc-links and check-plan-untracked pass there too.
  • A docs commit at the top (a5401f1): CLAUDE.md opened its HTTP routing section with "Nine invariants" over eight bullets (main says six over seven, and the held-call bullet this stack adds moved the figure by three), and said 19 skills in its project structure and its skills heading, as the Copilot instructions did, where .github/skills holds 18 and the skills table lists 18. They now say eight and 18; no link targets the heading's anchor. markdownlint on both files, format_md_tables --check, check-em-dash against main and the layer below, gen_stats -check, check-llms, check-doc-tool-names, check-doc-links and audit-catalog-first, which reads both files, pass.
  • Local: gen_stats -check, check-openplugin, check-doc-links, check-plan-untracked, check-mcpb, markdownlint on the changed pages, format_md_tables --check and check-em-dash against main pass, and the site-lint job's gates pass in site/.
  • Generated artifacts: the README's end-to-end line count moves with the comment, in the refresh commit at this top; every other generator came out unchanged.

Review fixes from #1093

The two review threads on #1093 are answered here, at the top, so that no layer below is rebased for a wording change (9185eac):

  • What a refusal of HLD-010 or HLD-011 establishes. INV-019 read a refusal of either as showing that other callers hold slots. It establishes only that the process is full: one credential can fill HLD-010 by itself, and HLD-011 where the descriptor limit is small or the rate limit is off, and the refusal names no figure, so a caller can conclude that others hold slots only from its own count, plainly when it holds none. The specification now says so, and its lead sentence draws the inference that others are holding only where a caller is still under a bound of its own or knows the upstream to be healthy, which leaves these two rows out. ADR-0023 NEG-007 now calls their refusal at most the same bit, and the comment on the session refusal in cmd/server/sessions.go no longer says that words naming the ceiling would tell a caller others hold sessions; the register rows and the held-call refusal already stated only that the process is full.
  • The memory limit a systemd unit inherits. Every page, register comment and code comment that said a unit without MemoryMax is bounded only by the host was wrong for a unit whose slices set one, since cgroup v2 applies the memory.max of every ancestor. They now say it is bounded by the slices above it where one of them sets one, and otherwise only by the host, in English and Spanish, and the operator guides name systemctl show -p EffectiveMemoryMax <unit>, which reports the tightest of those limits on systemd 256 and later and prints nothing on earlier versions (checked on 252).

Checked at 9185eac: go test ./internal/tenancy, the cmd/server build and make check-tenancy (83 rows, 308 sites, 0 findings) pass through the remote runner; markdownlint on the changed pages, format_md_tables --check, gen_llms -check, the site stats check and gen_stats -check, after regenerating the README statistics for the four comment lines added, pass locally, and no em or en dash is added.

Stack

Part of the tenancy stack for 3.1.0; no issue of its own. The other scenarios that start a second pipeline, and the fixtures the model evaluation shares with them, are recorded in #1096.

@jmrplens
jmrplens added this pull request to stack #1095 September 30, 2026 10:18

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @jmrplens, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 1 day and 22 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 13 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: jmrplens/gitlab-mcp-server/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 5a176803-f601-4b8e-a8b0-ece2414cc448

📥 Commits

Reviewing files that changed from the base of the PR and between f866188 and 9185eac.

📒 Files selected for processing (21)
  • .github/copilot-instructions.md
  • CLAUDE.md
  • README.md
  • cmd/server/sessions.go
  • docs/concepts/security.md
  • docs/development/adr/adr-0023-tenant-policy-is-declared-once.md
  • docs/development/e2e-coverage.json
  • docs/development/tenant-policy-spec.md
  • docs/development/testing/e2e-coverage.md
  • docs/development/testing/testing.md
  • docs/guides/enterprise-deployment.md
  • docs/guides/http-server-mode.md
  • docs/reference/resource-consumption.md
  • internal/tenancy/decisions_allow.go
  • site/src/content/docs/es/operations/http-server.mdx
  • site/src/content/docs/es/operations/security.mdx
  • site/src/content/docs/es/performance/sizing.mdx
  • site/src/content/docs/operations/http-server.mdx
  • site/src/content/docs/operations/security.mdx
  • site/src/content/docs/performance/sizing.mdx
  • test/e2e/gitlab/common/pages_test.go
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jmrplens jmrplens added this to the 3.1.0 milestone Sep 30, 2026
@jmrplens jmrplens added the v3.1.0 Targeted at the 3.1.0 release label Sep 30, 2026
@jmrplens jmrplens changed the title fix e2e pages push pipeline Start one pipeline in the Pages unpublish scenario, so no deployment lands after the unpublish Sep 30, 2026
@jmrplens jmrplens closed this Sep 30, 2026
@jmrplens jmrplens reopened this Sep 30, 2026
@github-actions github-actions Bot added the e2e The end-to-end suite and its Docker fixtures label Sep 30, 2026
jmrplens added a commit that referenced this pull request Sep 30, 2026
The fix for #945 (#948) removed the workflow's own `actions/cache` step
for `~/.cache/golangci-lint` and left a second cache of that directory
in place: `golangci-lint-action` keeps one itself. `install-only: true`
returns after the install and nowhere else, so the action still restores
that cache before installing (`run()` calls `restoreCache` first) and
saves it again in its post step, under
`golangci-lint.cache-<os>-<interval>-<go.mod hash>` keys. The comment in
`ci.yml` said the cache was not restored and the static analysis page
that it was not kept between runs, and neither was true.

On 2026-09-30 the lint of #1088 to #1094, opened minutes before,
reported fifty unused `//nolint:staticcheck` directives on each layer,
in files the stack does not touch. Every one of those jobs restored, by
exact key, the entry main's push run of b44ab96 had saved at 09:07 UTC:
the key names only the OS, a seven-day interval and the hash of
`go.mod`, which the stack shares with main, so the analysis of main's
tree matched a different tree exactly. With that entry deleted, #1087's
second run and a rerun of #1088's commit fell back through the restore
key to main's entry of 2026-09-25 and linted clean, and a cold `make
golangci-lint` of the stack's tip reports nothing. That is the failure
#945 describes, a restored analysis disagreeing with the tree, coming
from the cache #948 did not see, and this time from main's entry rather
than the pull request's own.

`skip-cache: true` turns off both the restore and the save. The comment
above the step now says why it is needed alongside `install-only` and
what the key leaves out, and `docs/development/static-analysis.md` says
the same. The job's header comment no longer says the action caches the
linter binary, which it downloads on every run. The Go build and module
caches setup-go keeps are unaffected.

What it costs, measured on the whole job as #945 asks: the eight pushes
to main between 29 September 11:27 and 30 September 09:02 UTC each
restored a cache and took 214 to 319 s, the `make golangci-lint` step
190 to 298 s of it; this pull request's run, the only one with the
change so far, restored nothing and took 313 s, the step 287 s. All
eight restored the entry main saved on 25 September, which the action
does not save again while its key still matches, so the analysis they
reused was of a tree days older than theirs: it was not buying time the
spread between runs can show.

Closes #945
@jmrplens
jmrplens force-pushed the fix-e2e-pages-push-pipeline branch from a5401f1 to 5316d5c Compare September 30, 2026 12:05
@jmrplens jmrplens closed this Sep 30, 2026
@jmrplens jmrplens reopened this Sep 30, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sourcery assessment

Approved.

… unpublish

TestPages_Unpublish_RemovesTheDeployment committed its Pages
configuration to the default branch and then created a pipeline, so
every project ran two: the push started one and the fixture the other,
which is why the pipelines the three surfaces waited for were 33, 35
and 37. Both run the pages job, and both deploy.

The wait for a deployment was therefore met by whichever deployment
came first. On the meta surface of a CE run on GitLab 19.4.1 the
unpublish and the read after it completed within 200 ms of the read
that met the wait, and that last read still listed a deployment
created in the same second: the other pipeline's, deployed after
Pages::DeleteService had deactivated every active one. The other two
surfaces passed on the same run.

The configuration is now committed with [skip ci], as the model
evaluation's worlds already commit theirs, so the pipeline the fixture
creates is the only one and its deployment is the one the wait sees.
GitLab ignores the marker for a pipeline created through the API
(Ci::CreatePipelineService is called with ignore_skip_ci there).
The Pages scenario's comment moves the README's end-to-end line count.
Every other generator, the request inventory recorded through the whole
unit suite among them, came out unchanged.
…e stack

Both complete Docker runs of e600a73d0 passed with no skip, the licensed
one on GitLab 19.4.1-ee (1332 tests) and the unlicensed one on 19.4.1
(1067 tests), and this records them. The levels are the ones the record
already held (CE L1 834 of 872, L2 730, L3 714; EE L1 1028 of 1092,
L2 924, L3 908); the test calls grow to 3524 and 4671, and every package
entry now names the commit and run it came from.
The HTTP routing section of CLAUDE.md opened with "Nine invariants" over
eight top-level bullets: main said six over seven, and the held-call
bullet this stack added moved the figure by three rather than one.

.github/skills holds 18 skill directories and CLAUDE.md's skills table
has 18 rows, while the project structure, the table's heading and the
Copilot instructions all said 19. No link targets the heading's anchor.
The loopback helper, the fairness driver's input struct and the
executable name helper moved the source, function, comment and struct
counts, and the entry #1086 added to the documentation audit's allowed
names one source line, which also mentions gitlab. Their tests and the
two bench_resources tests held to their values rather than the host
moved the unit-test line count. The shared flood and the listing arm
judged where it crossed moved the end-to-end line count, and the
flood's two defers the defer count. serverExecutable's test adds one
test function to the testing reference.
@jmrplens
jmrplens force-pushed the fix-e2e-pages-push-pipeline branch from 5316d5c to f98733c Compare September 30, 2026 13:04
@jmrplens jmrplens closed this Sep 30, 2026
@jmrplens jmrplens reopened this Sep 30, 2026
A refusal of HLD-010 or HLD-011 establishes only that the process is
full. One credential can fill HLD-010 by itself, and HLD-011 where the
descriptor limit is small or the rate limit is off, and the refusal
names no figure, so it does not show that other callers hold slots: a
caller can conclude that only from its own count, plainly when it holds
none. The INV-019 paragraph now says so, and its lead sentence draws
the inference that others are holding only where a caller is still
under a bound of its own or knows the upstream to be healthy, which
leaves these two rows out. ADR-0023 NEG-007 calls their refusal at most
the same bit, and the comment on the session refusal in cmd/server no
longer says that words naming the ceiling would tell a caller others
hold sessions.

A systemd unit without a MemoryMax of its own is still bounded by the
MemoryMax of the slices above it, since cgroup v2 applies the
memory.max of every ancestor. Every page, register comment and code
comment that said such a unit is bounded only by the host now says so,
in English and Spanish, and the operator guides name `systemctl show -p
EffectiveMemoryMax <unit>`, which reports the tightest of those limits
on systemd 256 and later and prints nothing on earlier versions.

The README statistics move with the four comment lines this adds.
@github-actions github-actions Bot added the transport stdio and HTTP transports, the server process, and the transport e2e modules label Sep 30, 2026
@sonarqubecloud

Copy link
Copy Markdown

@jmrplens
jmrplens merged commit 7baa4a4 into main Sep 30, 2026
6 checks passed
@jmrplens
jmrplens deleted the fix-e2e-pages-push-pipeline branch September 30, 2026 15:13
jmrplens added a commit that referenced this pull request Sep 30, 2026
GitHub skips every workflow a push triggers when the commit the push
lands on carries a skip command anywhere in its message, and it reads
the command inside backticks as readily as in plain text. This
repository squash merges, so the pull request description becomes that
message.

The description of #1094 explained a Pages fixture that commits with the
first of those commands, and quoted it. Its merge, 7baa4a4, therefore
ran no CI, no CodeQL, no GitLab mirror and no Pages deployment on main
(I dispatched the mirror and Pages by hand; the other two have no manual
trigger), and the v3.1.0 tag later put on that commit started no
release.

## What changes

- `scripts/check-em-dash.sh description`, which `make
check-pr-description` runs on every pull request, now refuses the five
bracketed commands GitHub documents for push and pull_request events
(skip ci, ci skip, no ci, skip actions and actions skip, each in square
brackets) in the title or the body, in any case, with any spacing inside
the brackets and inside backticks. It also refuses the other form GitHub
documents, a skip-checks trailer set to true, at the start of any line
of the body, indented or in backticks included: any line rather than the
last, since the description is not the end of the squash commit's
message and where GitHub honours the trailer is not something to rely
on, and only at the start, so a sentence can still name it. Every body
grep reads its input as text, so a byte that is not valid UTF-8 in a
body read from disk cannot make a line pass unjudged. The refusal names
the line and says to write the command without its square brackets,
which is enough to talk about it.
- The description mode had no tests. `scripts/check_em_dash_sh_test.py`
runs the real script over titles and bodies written to disk (the
rehearsal path it already offers): each command in the body, one in the
title, mixed case, spacing and backticks, the trailer in each spelling
and before another trailer, a command beside a byte invalid in UTF-8,
the bare words and a mid-sentence trailer passing, and the em dash and
injected-block refusals still holding, all reported in one run. One case
drives the path CI takes, `PR_NUMBER` through `gh api` and `jq`, against
a stand-in `gh` answering with a body in CRLF, and one runs shellcheck
on the script. CI's script-test step picks the file up by its name
pattern.
- The Makefile target's comment, the two CI comments (the script-test
step and the description step), `docs/development/static-analysis.md`,
`CONTRIBUTING.md` and the header of `CLAUDE.md` say what the gate now
refuses and why.

## What it does not cover

Only a pull request description is read. What reaches main without one
is not: the release job's manifest stamp, whose message `release.yml`
fixes and which carries no skip command, and a direct push by an
administrator through the main ruleset's bypass.

## Verification

- `python3 -m unittest discover -s scripts -p
'check_em_dash_sh_test.py'`: 14 tests pass, and the whole script suite
with them.
- `shellcheck` and `bash -n` on the script; `make check-em-dash` against
`origin/main`; `go run ./cmd/format_md_tables/ --check`;
`markdownlint-cli2` on the changed pages; `gen_stats -check`.
- This description, and the commit message, pass the gate they add.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e The end-to-end suite and its Docker fixtures transport stdio and HTTP transports, the server process, and the transport e2e modules v3.1.0 Targeted at the 3.1.0 release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant