Skip to content

Run every suite this repo owns, not one spec of one - #259

Open
vitramir wants to merge 7 commits into
mainfrom
ci/run-every-suite
Open

Run every suite this repo owns, not one spec of one#259
vitramir wants to merge 7 commits into
mainfrom
ci/run-every-suite

Conversation

@vitramir

Copy link
Copy Markdown
Contributor

The workflow named a single file:

E2E_SUITES: playwright
E2E_PLAYWRIGHT_TEST_ARGS: test/e2e/organization-platform-usage.spec.ts

So the repo that owns the suites ran one of its 101 specs and test files. Every other change to them — including the sign-in rework that just landed — went in on the word of a run that never executed them.

Three jobs now cover the lot

Job Suites Coverage
console playwright 22 specs
apps playwright-chat-app, playwright-tracing-app 18 specs
services go-core 61 test files

A job apiece rather than one for all three: a VM boot is ten minutes and the suites together do not fit under an hour, and a red job then names the thing that broke. fail-fast: false, so one failure does not hide the others.

Why the tag differs per job. The suites read it in opposite directions. For playwright a tag becomes a --grep, and console-api.spec.ts, chat-api.spec.ts and gateway-api.spec.ts carry no tag — so any filter silently drops them. Those jobs pass none. go-core is the reverse: with no tag it runs smoke alone, so it names its services explicitly.

One suite fix. playwright-chat-app was the only playwright suite whose select opted out when asked for nothing, which made it unreachable from a run of everything. It now selects like its siblings. Verified by simulating every suite's select against each tag set.

Deliberately excluded: go-terraform and go-agn-cli. Both need a binary built elsewhere — the provider from terraform-provider-agyn, the CLI from an agn-cli release — and run from the workflows that have it. Without one they reach for a public registry that does not serve these providers, which is the failure console-app hit on the old bootstrap path.

Expect this first run to be red. It is the first time 100 of these have executed against the VM at all, and the ordinary-member sign-in that landed in #258 has only ever been tried against one spec — I would expect several 403 cluster admin required among them, each either a setup call that should use the bootstrap token or a spec that belongs on adminPage.

The workflow named a single file:

  E2E_SUITES: playwright
  E2E_PLAYWRIGHT_TEST_ARGS: test/e2e/organization-platform-usage.spec.ts

So the repo that owns the suites ran one of its 101 specs and test files,
and every other change to them landed on the word of a run that never
executed them. Three jobs now cover the lot: 22 console specs, 18 across
the two app frontends, 61 go-core test files.

A job apiece rather than one for all three, because a VM boot is ten
minutes and the suites together do not fit in a job that should stay under
an hour -- and a red job then names the thing that broke.

The tag differs per job because the suites read it in opposite directions.
A tag becomes a --grep for playwright, and console-api, chat-api and
gateway-api carry none, so filtering silently drops them: those jobs pass
no tag. go-core with no tag runs smoke alone, so it names its services.

playwright-chat-app opted out of a run that asks for nothing, alone among
the playwright suites, which left it unreachable from a run of everything.
It selects like its siblings now.

go-terraform and go-agn-cli stay out. Both need a binary built elsewhere,
and they run from the workflows that have it.
run-tests created an LLM provider and a model over the Gateway's HTTP API
before every run, for the one suite that could not make its own. It cost
193 lines, two variables, and a step that had to be reachable and ready
from the runner -- and it failed the whole `services` job on a 503 in the
seconds after a rollout, before a single Go test had run.

go-core has resolved its own model since the provisioning moved; this
gives go-terraform the same. AGYN_MODEL_ID still wins when a caller has
one, and a 503 is retried rather than ending the job, because by then it
is one suite waiting rather than every suite blocked.

E2E_GATEWAY_URL went with it: it existed to give the seeding an address
the runner could reach, and nothing else read it.
The chat and tracing suites carry their own copies of the sign-in helper,
and only the console's learned Dex. So on the bundle VM neither could sign
in at all: 23 of the apps job's 27 specs failed waiting for a chat list or
a no-organizations screen, on a page that was still Dex's login form.

Same patch as the console's -- match the password field, fill it, submit
-- and the same bundled member by default.

Three copies of one helper is the actual problem here, and this is not the
change that fixes that.
Asking for every service tag at once does not compile. go-core's helper
files deliberately repeat each other behind mutually exclusive service
tags -- two TestMains, four workload constants, fourteen names in all --
so the package stops building the moment two of them are on together. I
started deduplicating and stopped: making a suite one package to suit a
runner is the wrong way round, and there is no coverage that would catch a
behaviour change while merging helpers that only look identical.

A job per service instead, which is what every calling repo already does.
A red job then names the service rather than the suite.

smoke rides along, because the suite assumes it: main_test.go is built for
nine service tags and calls helpers only a smoke-tagged file defines, so
svc_k8s_runner alone does not compile. svc_egress_gateway is the one
exception -- it repeats the k8s-runner workload constants, which smoke also
carries -- so it runs alone.

Every combination here was compiled before it was written down.
Two more calls the services answer with "cluster admin required" once the
suite signs in as an ordinary member, and neither is what its spec is
about.

listUsers is not asserted on anywhere; it is how inviteMember finds the
identity behind an address. registerRunner seeds the runners whose listing
is the actual subject of runners.spec.

Both go through the bootstrap token, like createUser.
Its sections are an overview of every organization, the user directory,
cluster runners and the app catalog. An ordinary member has no route to
any of them, so the test sat waiting for a sidebar that was never going to
render. The organization sections in the same file stay on the member,
which is who they are for.
The suite's setup posted a password grant to
keycloak.keycloak.svc.cluster.local, which the platform stopped running
when Dex replaced it. So the whole package failed its setup -- "e2e setup
failed: setup credentials" -- rather than any test failing on its own
account.

Dex serves the same grant; the chart sets oauth2.passwordConnector to
`local`, which is what enables it. The username becomes the address,
because Dex looks a static user up by its email field and has nothing
else. The rest holds: Dex stamps `iss` from its configured issuer, not
from the address it was called on, so a token minted over plain
in-cluster HTTP still verifies against a Media Proxy configured with the
browser-facing one.

Verified against a running VM, from a pod and through the ingress.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant