letsencrypt / letsencrypt/boulder

CI Nits and Improvements

Open
#9,006 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
5.8k
Forks
649
Avg merge
3d 23h
Merged PRs (30d)
24

Description

All of these are courtesy of @endbr64.

Concurrency

All the run-on-each-PRs deserve a concurrency key to reduce resource usage on subsequent pushes:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: ${{ github.event_name == 'pull_request' }}

Cold Compilation

govulncheck gets cold-compiled on each run.
https://github.com/letsencrypt/boulder/blob/c5f1008d88f790b7298689358dc7e24389babf21/.github/workflows/boulder-ci.yml#L118-L139

You might want to pull in actions/cache in some fashion:

# Gather the Go version for the cache key.
      - name: Record Go version
        id: go-version
        run: echo "version=$(go env GOVERSION)" >> "$GITHUB_OUTPUT"

      # Without this, every run downloads and compiles govulncheck's whole
      # dependency tree from scratch.
      - name: Cache govulncheck build
        uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
        with:
          path: |
            ~/go/pkg/mod
            ~/.cache/go-build
          key: govulncheck-${{ runner.os }}-${{ steps.go-version.outputs.version }}-${{ env.GOVULNCHECK_VERSION }}
          restore-keys: |
            govulncheck-${{ runner.os }}-

      - name: Run govulncheck
        run: go run "golang.org/x/vuln/cmd/govulncheck@${GOVULNCHECK_VERSION}" ./...

Is Zizmor required to pass?

zizmor.yml isn't included in this block, despite the comment. Presumably it's because it's either allowed to soft-fail or handled by the branch protection rules:
https://github.com/letsencrypt/boulder/blob/c5f1008d88f790b7298689358dc7e24389babf21/.github/workflows/boulder-ci.yml#L169-L187

Zizmor is not being updated by Dependabot

Speaking of zizmor, using the env block to load it is opaque to Dependabot, so you're out of date (https://github.com/zizmorcore/zizmor/releases/tag/v1.30.0 is the current release). You might want to switch to using zizmorcore/zizmor-action:
https://github.com/letsencrypt/boulder/blob/c5f1008d88f790b7298689358dc7e24389babf21/.github/workflows/zizmor.yml#L16-L20

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with .github/workflows/boulder-ci.yml, especially the run-on-each-PR jobs and the govulncheck and Zizmor sections, then compare .github/workflows/zizmor.yml. Determine which concurrency and cache changes are appropriate and whether Zizmor is required to pass. Done means the selected CI improvements are implemented and the workflow and dependency-update behavior are clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, go
Domain
ci-cd, devops, tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.