Skip to content

ci: Remove dead code, unused inputs and honor input refs - #941

Open
cmainas wants to merge 2 commits into
mainfrom
fix/small_fixe_ci
Open

ci: Remove dead code, unused inputs and honor input refs#941
cmainas wants to merge 2 commits into
mainfrom
fix/small_fixe_ci

Conversation

@cmainas

@cmainas cmainas commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Description

  • Delete unused typos.toml (spell-check runs cspell, not typos).
  • Remove useless "Get revision SHA" steps and inline github.ref_name where the branch value is still needed (build-latest).
  • Drop unused workflow inputs (runner, runner-arch-map, unused runner-archs, dead ref) and their call-site passes
  • Use the declared ref input into checkout (lint, unit_test, vm_test, kind_test)
  • Remove unused GIT_CLONE_PAT secret and no-op workflow_dispatch triggers that cannot run standalone (upload_s3, vm_test, kind_test)
  • Drop redundant host dependency install in kind_test (used only inside the node)

Edit: A new job has been added which executes the e2e vm_test when something changes in e2e using the PR's branch ref to checkout the code. Otherwise the base branch of the PR is used as a checkout ref, keeping the base testing code stable across new PRs.

Related issues

How was this tested?

In PR's CI

LLM usage

Assisted by Opus 4.8

Checklist

  • I have read the contribution guide.
  • The linter passes locally (make lint).
  • The e2e tests of at least one tool pass locally (make test_ctr, make test_nerdctl, make test_docker, make test_crictl).
  • If LLMs were used: I have read the llm policy.

- Delete unused typos.toml (spell-check runs cspell, not typos).
- Remove useless "Get revision SHA" steps and inline github.ref_name
  where the branch value is still needed (build-latest).
- Remove the dead "Get image digest" and "Set short SHA" steps in
  build-latest.
- Drop unused workflow inputs (runner, runner-arch-map, unused
  runner-archs, dead ref) and their call-site passes
- Use the declared ref input into checkout (lint, unit_test, vm_test,
  kind_test)
- Remove unused GIT_CLONE_PAT secret and no-op workflow_dispatch
  triggers that cannot run standalone (upload_s3, vm_test, kind_test)
- Drop redundant host dependency install in kind_test (used only inside
  the node)

Signed-off-by: Charalampos Mainas <charalampos.mainas@gmail.com>
@netlify

netlify Bot commented Aug 10, 2026

Copy link
Copy Markdown

Deploy Preview for urunc canceled.

Name Link
🔨 Latest commit 225a611
🔍 Latest deploy log https://app.netlify.com/projects/urunc/deploys/6a8c780e7047100008470c1a

@cmainas
cmainas force-pushed the fix/small_fixe_ci branch from ab7669a to e016a36 Compare August 10, 2026 17:59
@cmainas
cmainas marked this pull request as ready for review August 10, 2026 18:13
@cmainas
cmainas requested a review from ananos August 10, 2026 18:13
@cmainas
cmainas force-pushed the fix/small_fixe_ci branch 4 times, most recently from e016a36 to bafe00f Compare August 19, 2026 10:50
We currently execute the end-to-end tests using the base ref of a PR in
order to ensure that the PR's code works as expected and nothing in the
PR trickes the tests in order to succeed.

However, we also need to tests the changes that take place in the e2e
tests. For that reason, another run of vm_tests is triggered using the
PR's branch ref to check if the new code of end-to-end tests is working
properly.

Signed-off-by: Charalampos Mainas <charalampos.mainas@gmail.com>
@cmainas
cmainas force-pushed the fix/small_fixe_ci branch from bafe00f to 225a611 Compare August 24, 2026 16:57

@gntouts gntouts left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good job, the fixes look good. One addition I'd like to see:

The tests/ filter should also cover the other files the e2e job reads from
the checkout. The job consumes four things: tests/e2e (compiled),
script/dm_create.sh (vm_test.yml:146-148, runs as root), the root Makefile
(make prepare at :329, make <test> at :355/357), and go.mod/go.sum via
make prepare. The filter only tracks the first one.

Possible failures if we leave it:

  • A PR that changes dm_create.sh merges without ever running it. If it is
    broken, every later PR fails at "Setup devmapper" across the whole matrix,
    and the blame lands on the wrong commit.
  • A PR that renames a test target and updates the matrix in vm_test.yml
    fails with No rule to make target: the workflow file resolves at the PR
    head, but the checkout is base, so the new matrix runs against the old
    Makefile.
  • A TEST_OPTS change (e.g. raising the 20m timeout) silently does not apply
    at PR time.

The nightly runs main and catches all of this eventually, but that moves
detection to after the merge, which is what this gate exists to prevent.

Suggestion:

// Must track what vm_test.yml reads from the checkout.
const roots = ['tests/', 'Makefile', 'script/'];
const changed = files.some(f => roots.some(r => f.filename.startsWith(r)));

go.mod/go.sum matter less: the binary arrives prebuilt, and base tests
against base go.mod is already a consistent pair. Include them if you want
go mod verify exercised; either way is fine.

This only widens the trigger for vm_test_head, the base-ref vm_test job is unchanged.

@cmainas

cmainas commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Thank you @gntouts for the review.

I wanted to avoid go.mod and go.sum because this is an expensive CI. We already have to wait around 15 minutes for the e2e tests and this will now increase even more. However, I understand that a change in go.* could affect the e2e tests.

I will also include the rest of the paths you mention and I will open a new issue to improve the e2e testing times and scope to better utilize the nightly testing and also do not stall CI in the PRs.

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.

Remove unused files and dead code form CI

2 participants