Skip to content

Fix CI for 0.48.2-RC2: x/net CVEs, publish --editor, and runner-specific test failures - #3869

Open
icanhasmath wants to merge 6 commits into
version/0-48-2-RC2from
marcg/0-48-2-RC2-ci-fixes
Open

icanhasmath wants to merge 6 commits into
version/0-48-2-RC2from
marcg/0-48-2-RC2-ci-fixes

Conversation

@icanhasmath

@icanhasmath icanhasmath commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes for problems that fail CI on every PR into version/0-48-2-RC2. Neither depends on #3868.

Update golang.org/x/net to v0.62.0

The Scan job (Trivy) fails on CVE-2026-78661 and CVE-2026-97045 in golang.org/x/net v0.60.0, both fixed in v0.62.0.
They are in x/net/html, which we don't compile in, but Trivy reports by module version. go get also raises
x/crypto, x/sys, x/term, x/text, x/sync and x/tools to the versions v0.62.0 requires. vendor/ is updated
to match.

Don't search every namespace when publishing a new ingredient without one

state publish <file> --editor outside a project has no namespace until the editor fills it in. Before opening the
editor, Run searched every namespace for the name taken from the file. For a logged-in user that search takes about
55s and then fails with "Could not search for ingredient", so the editor never opens. The first match could also be an
unrelated ingredient with the same name.

The "New ingredient with editor flag" integration test fails on every master nightly for this reason, back to at least
early September.

A new ingredient without a namespace now skips the lookup. confirmRequest still requires a namespace, and
checkNamespaceEdit checks the version once one is filled in. --edit still searches, because it needs the search to
find the ingredient.

Let state publish --editor continue when no editor can be opened

If EDITOR isn't set and there's no xdg-open (common on headless Linux, and the case on the ubuntu-24.04-arm runner),
publish exited with "Could not publish ingredient. Error received: ". It did this even though the notice just
before says the file can be edited by hand. It now says no editor could be opened and waits for the confirmation as
usual. Covered by TestOpenInEditorWithoutEditor, which fails without the fix.

Integration tests that failed only because of the runner or the branch name

  • TestPublishBuildEncrypted is skipped on Linux/arm64. It installs into a Python project that state init creates
    without that platform. Integration tests only run on ARM for labelled PRs.
  • PerformanceIntegrationTestSuite's teardown stopped state-svc even when its tests were skipped by tag. On macOS, a
    long branch name makes the socket path too long to connect to, so every labelled PR from such a branch failed there.
    It now only stops the service when the Performance tests ran, using a new tagsuite.RunsForTags.

Testing:

  • Reproduced the hang with the beta state; the goroutine dump shows it stuck in SearchIngredientsStrict.
  • With this change, a logged-in dev build opens the editor right away.
  • The publish unit tests pass.
  • The PR is labelled Test: publish, so CI runs the publish integration tests.

🤖 Generated with Claude Code

icanhasmath and others added 2 commits October 29, 2026 12:08


The Scan job failed on both: x/net v0.60.0 is affected and v0.62.0 fixes them.
go get also raised x/crypto, x/sys, x/term, x/text, x/sync and x/tools to the
versions x/net v0.62.0 requires.
… one

state publish --editor outside a project has no namespace until the editor
fills it in, so Run searched every namespace for the name derived from the file.
Logged in, that search took long enough to time out ("Could not search for
ingredient"), so the editor never opened. This is why the "New ingredient with
editor flag" integration test has failed nightly on master since at least
September. Its first match could also be any ingredient with that name.

Skip the lookup for a new ingredient without a namespace; confirmRequest
requires one and checkNamespaceEdit checks the version once it is filled in.
--edit still searches, since it needs to find the ingredient.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
icanhasmath and others added 2 commits October 29, 2026 12:36
Without EDITOR set and without xdg-open, as on many headless Linux machines
and the ubuntu-24.04-arm runner, OpenEditor fails and publish exited with
"Could not publish ingredient. Error received: <no value>", even though the
notice just before it says the file can be edited by hand. Say that no editor
could be opened and wait for the confirmation as usual instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…name

- TestPublishBuildEncrypted installs into a Python project that state init
  creates without a Linux/arm64 platform, so skip it there, like the other
  platform-specific skips. Integration tests only run on ARM for labelled PRs.
- PerformanceIntegrationTestSuite's TearDownSuite stopped state-svc even when
  its tests were skipped by tag. On macOS a long branch channel makes the socket
  path too long to dial, so every labelled PR from such a branch failed there.
  Only stop the service when the Performance tests ran, using a new
  tagsuite.RunsForTags that OnlyRunForTags is now built on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@icanhasmath icanhasmath changed the title Fix CI for 0.48.2-RC2: x/net CVEs and publish --editor without a namespace Fix CI for 0.48.2-RC2: x/net CVEs, publish --editor, and runner-specific test failures Oct 29, 2026
icanhasmath and others added 2 commits October 29, 2026 12:50
The test writes its edits to the file itself, but with no EDITOR set, macOS
`open` hands the file to whatever app the runner has registered. On
macos-latest, publish then read the file back without the test's edits and
failed with "You have to supply the namespace". Point EDITOR at a command that
doesn't exist, so publish takes the "edit the file by hand" path on every OS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
editorFileRx matched "file:\s*?(.*?)\.\s", whose lazy \s*? left the space
after "file:" in the captured path whenever the temp file name had 9 digits
instead of 10 (about one run in four). The test then wrote its edits to
" /tmp/NNN.ingredient.yaml", a different file, so publish read the original
back and failed with "You have to supply the namespace". The last commit's
macOS explanation was wrong; this was the cause on every OS.

Reproduced by driving a dev build through termtest 12 times: three runs captured
the leading space before this change and none after.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant