Skip to content

Optimize CI for wolfProvider#400

Open
aidangarske wants to merge 46 commits into
wolfSSL:masterfrom
aidangarske:ci-draft-pause
Open

Optimize CI for wolfProvider#400
aidangarske wants to merge 46 commits into
wolfSSL:masterfrom
aidangarske:ci-draft-pause

Conversation

@aidangarske
Copy link
Copy Markdown
Member

@aidangarske aidangarske commented May 23, 2026

Description

Note 6/5: Currently CI is failing this will fix once merged

  • trigger OSP projects to run nightly and send slack message if fail
  • dynamically get latest wolfssl version and openssl version
  • (All OSP where getting tested by 3.0.20 from debian:bookworm not 3.5.4)
  • add ubsan and asan for WP specifically
  • Add smoke tests for draft
  • Only test on status "open" only smoke on draft
  • no apt-get use ghcr container
  • backward comapt for 5.8.4
  • 5.9.1 support
  • Nightly runs all tested and passing with new patches
  • Auto retry system for flaky nightlies in place and tested
  • Added the ability to toggle pr runs of OSP projects on PR meaning we can add a label like ci:all or ci:hostap and it will run the selected suite in the PR you put the label on against that branch. Making it easy to test CI changes from failed nightly or add new tests or edit tests for example.

related PR's need to go in first in this order then this one

  1. wolfProvider: 5.9.1 FIPS patches (krb5, hostap, stunnel, libssh2, curl) osp#340
  2. https://github.com/wolfSSL/testing/pull/962
  3. https://github.com/wolfSSL/testing/pull/958

slack notifications system using claude and simple expected regex to retry flacky jobs
image

Copilot AI review requested due to automatic review settings May 23, 2026 06:27
@aidangarske aidangarske marked this pull request as draft May 23, 2026 06:30
@aidangarske aidangarske changed the title ci: pause non-smoke workflows on draft PRs, add smoke preflight Optimize CI for wolfProvider May 23, 2026
@aidangarske aidangarske reopened this May 23, 2026
@aidangarske aidangarske self-assigned this May 23, 2026
@aidangarske aidangarske requested review from Copilot and dgarske and removed request for Copilot May 23, 2026 06:43
@aidangarske aidangarske marked this pull request as ready for review May 25, 2026 19:25

This comment was marked as resolved.

aidangarske added a commit to aidangarske/wolfProvider that referenced this pull request May 25, 2026
…ew fix)

Was: every workflow pulled ghcr.io/wolfssl/wolfprovider-test-deps:bookworm,
which doesn't exist until upstream master runs the publish workflow.
Bootstrap chicken-and-egg.

Now: publish-test-deps-image.yml fires on any branch push (and PRs)
and pushes to ghcr.io/<repo-owner>/wolfprovider-test-deps:bookworm.
Consumer workflows read from the PR head's owner when on a PR, else
the running repo's owner. Result: a fork PR publishes to the fork's
ghcr namespace and pulls from it; master pushes publish to the org's
ghcr namespace and pulls from it.

Also fixes copilot review feedback from
wolfSSL#400 (review)

- Phase B log filename renames broke check-workflow-result.sh's
  hardcoded log paths (curl-test.log, openvpn-test.log, sssd-test.log,
  net-snmp-test.log, nginx-test.log, openssh-test.log, tcpdump-test.log,
  liboauth2-test.log, stunnel-test.log) plus in-step greps in cjose,
  libcryptsetup, libfido2, libhashkit2, libtss2, opensc, python3-ntp,
  qt5network5, tnftp, tpm2-tools. Reverted log names back to
  <app>-test.log; second mode overwrites first.
- libtss2.yml: fix `if $(grep -q ...)` (invalid shell -- command
  substitution of grep used as the if condition expanded to an empty
  command). Use `if grep -q ...; then`.
- opensc.yml: fix `TEST_RESULT=$(((grep ...) && echo 0 || echo 1))`
  (arithmetic expansion `(( ))` can't contain shell commands). Hoist
  to a check_opensc_log() function called from both modes.
- stunnel.yml: `grep -c "failed: 0"` returns 1 on success, but
  check-workflow-result.sh expects TEST_RESULT==0 for pass.
  Use `if grep -q ...; then TEST_RESULT=0; else TEST_RESULT=1; fi`.
  Also mirror tests/logs/results.log to stunnel-test.log so the
  force-fail check finds the expected file.
- hostap.yml: drop continue-on-error from the normal-mode test step.
  Without it the step's exit code was swallowed and normal-mode test
  failures didn't fail the job.

One-time setup: after this lands, the owner of each fork that opens a
PR has to make their ghcr.io/<owner>/wolfprovider-test-deps package
public (GitHub UI: Packages -> Package settings -> Change visibility).
GitHub's Actions runners can only pull public packages from another
namespace.
aidangarske added a commit to aidangarske/wolfProvider that referenced this pull request May 25, 2026
…vate)

Earlier commits tried to make fork CI work by:
  - having publish-test-deps-image.yml push to a per-owner ghcr namespace
    (ghcr.io/<owner>/wolfprovider-test-deps)
  - having consumer workflows pull from the PR head's owner
  - auto-PATCHing the test-deps package to visibility=public
  - dropping the `github.repository == 'wolfSSL/wolfProvider'` guard on
    the wolfprov-debs ORAS pull in build-wolfprovider.yml

That path only works if the packages can be public, which they can't
(some of the .debs contain commercially-licensed bits). Revert to the
canonical-only behavior:

publish-test-deps-image.yml
  - fires only on push to master/main (was '**')
  - guards the publish on github.repository == 'wolfSSL/wolfProvider'
  - drops the per-owner namespace; always pushes to
    ghcr.io/wolfssl/wolfprovider-test-deps
  - removes the Mark-package-public step

build-wolfprovider.yml
  - restores the github.repository == 'wolfSSL/wolfProvider' guard on
    the Login, Download .debs, and Download WIC steps

39 consumer workflows
  - container.image reverted from the per-owner expression back to the
    literal ghcr.io/wolfssl/wolfprovider-test-deps:bookworm

Practical effect: PR CI and nightly only run on the canonical repo
(or once PR wolfSSL#400 merges, on wolfSSL/wolfProvider's runners). Fork
pushes will skip the wolfprov-deb pull and any container-using job
will fail loud at the image pull -- which is the right signal: those
runs need to happen on the canonical repo.
aidangarske added a commit to aidangarske/wolfProvider that referenced this pull request May 25, 2026
…idation)

Add pull_request trigger to nightly-osp.yml so PR wolfSSL#400's reviewers
can see the dispatcher actually fan all 41 reusable workflows out
and the notify job hit Slack.

Marked temporary in the file header -- revert this trigger before
merging if you don't want the full nightly job set firing on every
PR. (For everyday CI, scheduled + workflow_dispatch is the intended
shape.)

Note: PR runs from forks will still hit the private-package issue
for the wolfprov-debs pull (the wolfSSL/wolfProvider repo guard
short-circuits the ORAS step on non-canonical repos). The plumbing
itself -- dispatch, discover-versions, notify, Slack -- runs
regardless and is what this PR-trigger lets you verify end-to-end.
aidangarske added a commit to aidangarske/wolfProvider that referenced this pull request May 25, 2026
Adds aidangarske/wolfProvider to the publish workflow's repository
allowlist so PR wolfSSL#400's working branch can bootstrap a test-deps
image on the fork's ghcr namespace. Pushed image lands at
ghcr.io/aidangarske/wolfprovider-test-deps:bookworm.

Also adds 'ci-draft-pause' to the branches list (alongside master/
main) so a push to that branch triggers the workflow without needing
a separate workflow_dispatch.

Consumer workflows continue to pull from ghcr.io/wolfssl/... so this
fork-side push is purely for the fork owner to verify the
build/push pipeline works end to end before PR merges. After merge,
the canonical wolfSSL/wolfProvider master push will publish the
authoritative image and consumers will find it.

Note: the 'ci-draft-pause' branch entry is TEMPORARY for PR wolfSSL#400.
Drop it (and remove aidangarske from the allowlist if desired)
once the PR merges.
dgarske pushed a commit that referenced this pull request May 26, 2026
)

Bootstrap PR: introduces the test-deps container image that PR #400's
nightly OSP workflows consume. This is a minimal subset of PR #400
intended to merge first, so the publish workflow fires once on master
and the test-deps image lands at ghcr.io/wolfssl/wolfprovider-test-deps
:bookworm before the rest of PR #400 merges. Without this, PR #400's
OSP container jobs all fail with "manifest unknown" because the image
they pull doesn't exist anywhere yet.

Two files only:
  docker/wolfprovider-test-deps/Dockerfile
    Single Debian-bookworm image with every apt dep that the OSP
    integration tests used to install at job time. One apt-get update
    at build time, zero at job time -- eliminates Debian mirror flake.

  .github/workflows/publish-test-deps-image.yml
    Builds the Dockerfile and pushes to
    ghcr.io/wolfssl/wolfprovider-test-deps:bookworm on push to
    master/main (path-filtered to docker/wolfprovider-test-deps/**)
    or workflow_dispatch. Guarded with
    github.repository == 'wolfSSL/wolfProvider' so forks don't try
    to push to wolfSSL's namespace.

The OSP workflows themselves, the discover-versions resolver, the
ASan/UBSan workflow, and all the matrix/force-fail consolidation
land via PR #400 once this is in place.
dgarske added a commit that referenced this pull request May 26, 2026
ci: bootstrap test-deps Docker image (prep for PR #400)
aidangarske added a commit to aidangarske/wolfProvider that referenced this pull request May 26, 2026
PR wolfSSL#402 published ghcr.io/wolfssl/wolfprovider-test-deps:bookworm.
This empty commit bumps the head SHA so PR wolfSSL#400's checks rerun
against the now-existing image.
@aidangarske aidangarske force-pushed the ci-draft-pause branch 3 times, most recently from 5ce6df6 to 91f2549 Compare May 27, 2026 04:50
@aidangarske aidangarske requested review from ColtonWilley and padelsbach and removed request for dgarske May 27, 2026 04:54
@aidangarske aidangarske force-pushed the ci-draft-pause branch 2 times, most recently from 82d537b to e5226fb Compare May 27, 2026 05:21
@aidangarske aidangarske added ci:debian-package PR OSP toggle: run debian-package ci:krb5 PR OSP toggle: run krb5 ci:hostap PR OSP toggle: run hostap ci:stunnel PR OSP toggle: run stunnel ci:libssh2 PR OSP toggle: run libssh2 ci:curl PR OSP toggle: run curl and removed ci:bind9 PR OSP toggle: run bind9 ci:debian-package PR OSP toggle: run debian-package ci:curl PR OSP toggle: run curl labels Jun 5, 2026
@aidangarske aidangarske added ci:curl PR OSP toggle: run curl ci:hostap PR OSP toggle: run hostap ci:krb5 PR OSP toggle: run krb5 ci:libssh2 PR OSP toggle: run libssh2 ci:stunnel PR OSP toggle: run stunnel and removed ci:curl PR OSP toggle: run curl ci:hostap PR OSP toggle: run hostap ci:krb5 PR OSP toggle: run krb5 ci:libssh2 PR OSP toggle: run libssh2 ci:stunnel PR OSP toggle: run stunnel labels Jun 5, 2026
@aidangarske aidangarske added ci:curl PR OSP toggle: run curl ci:hostap PR OSP toggle: run hostap ci:krb5 PR OSP toggle: run krb5 and removed ci:curl PR OSP toggle: run curl ci:hostap PR OSP toggle: run hostap ci:krb5 PR OSP toggle: run krb5 ci:libssh2 PR OSP toggle: run libssh2 ci:stunnel PR OSP toggle: run stunnel labels Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants