Skip to content

Resolve payload pull spec#3

Merged
hongkailiu merged 4 commits intopetr-muller:mainfrom
hongkailiu:real-image
Mar 6, 2026
Merged

Resolve payload pull spec#3
hongkailiu merged 4 commits intopetr-muller:mainfrom
hongkailiu:real-image

Conversation

@hongkailiu
Copy link
Copy Markdown
Collaborator

@hongkailiu hongkailiu commented Mar 2, 2026

For channel risks-always, the nodeB in the graph will get the real pull spec for the payload.

I think I need only it for the test and thus do not extend it to all nodes.
When we do, we might want some cache to avoid the workload for quay.io.

@hongkailiu
Copy link
Copy Markdown
Collaborator Author

a cluster bot cluster is usually with version like 4.21.0-0.nightly-2026-02-26-092444.
Thus, the case gets resolved AFTER the first GA version is released.
So it might not be that useful for 4.22 as today.

Hmm. The change from this pull is not that useful.

@hongkailiu
Copy link
Copy Markdown
Collaborator Author

/hold

@hongkailiu
Copy link
Copy Markdown
Collaborator Author

$ git --no-pager log --pretty=oneline -1
d6351a8ce25fecd36913b9a3a2bb226ef04c5b0a (HEAD -> real-image, hongkailiu/real-image) Use pull spec an approximate tag

$ curl -s "http://localhost:8080/api/upgrades_info/graph?channel=risks-always&version=4.22.0-0-2026-03-03-000541-test-ci-ln-1phllqb-latest&arch=amd64" | jq '.nodes[1]'
{
  "version": "4.22.1",
  "payload": "quay.io/openshift-release-dev/ocp-release@sha256:fa50ad76be25a54235058782d1844a236f64a9a0e9764eedb885ccf1565286c4",
  "metadata": {
    "io.openshift.upgrades.fauxinnati.tag": "4.22.0-ec.0",
    "io.openshift.upgrades.graph.release.channels": "risks-always",
    "io.openshift.upgrades.graph.release.manifestref": "sha256:00000000000000000000000000000000000000000000000000000000003d5ef1",
    "url": "https://access.redhat.com/errata/RHSA-2024:06201"
  }
}

$ curl -s "http://localhost:8080/api/upgrades_info/graph?channel=risks-always&version=4.21.0-0-2026-03-03-000541-test-ci-ln-1phllqb-latest&arch=amd64" | jq '.nodes[1]'
{
  "version": "4.21.1",
  "payload": "quay.io/openshift-release-dev/ocp-release@sha256:7ca8870aa5e505f969aa26161594a3f99b65baf7d29bab8adaca0cade51b0bb6",
  "metadata": {
    "io.openshift.upgrades.graph.release.channels": "risks-always",
    "io.openshift.upgrades.graph.release.manifestref": "sha256:00000000000000000000000000000000000000000000000000000000003d5b09",
    "url": "https://access.redhat.com/errata/RHSA-2024:06101"
  }
}

$ curl -s "http://localhost:8080/api/upgrades_info/graph?channel=risks-always&version=4.21.1&arch=amd64" | jq '.nodes[1]'
{
  "version": "4.21.2",
  "payload": "quay.io/openshift-release-dev/ocp-release@sha256:ed3b2be8d2673f8669ba2a6d4951011b9b4d52eb4a28eb46ed87c05d175cc196",
  "metadata": {
    "io.openshift.upgrades.graph.release.channels": "risks-always",
    "io.openshift.upgrades.graph.release.manifestref": "sha256:00000000000000000000000000000000000000000000000000000000003d5b0a",
    "url": "https://access.redhat.com/errata/RHSA-2024:06102"
  }
}

@hongkailiu
Copy link
Copy Markdown
Collaborator Author

No Prow. But still ...

/hold cancel

For channel risks-always, the nodeB in the graph will get
the real pull spec for the payload.

I _think_ I need only it for the test and thus do not
extend it to all nodes.
When we do, we might want some cache to avoid the workload
for quay.io.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates fauxinnati’s risks-always channel behavior so that the “nodeB” payload can use a real quay.io pull spec (when resolvable), enabling more realistic payload testing for conditional-risk scenarios.

Changes:

  • Refactored node construction to allow injecting a specific payload pull spec plus optional extra metadata.
  • Added a pull-spec resolution path for risks-always nodeB that queries quay.io and falls back to an approximate prerelease tag.
  • Introduced logrus logging and a retryable HTTP client for outbound quay.io requests.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pkg/fauxinnati/types.go Adds NewNodeWithPullSpec to support constructing nodes with a specified payload and metadata.
pkg/fauxinnati/server.go Wires in a resolver + HTTP client; uses resolved pull spec for risks-always nodeB; adds request/start logging.
pkg/fauxinnati/release.go Implements quay.io HEAD-based pull spec resolution by digest for version/arch tags.
cmd/fauxinnati/main.go Enables logrus (currently forcing Debug level).
go.mod / go.sum Adds dependencies for retryable HTTP and logrus.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/fauxinnati/server.go
Comment thread pkg/fauxinnati/server.go Outdated
Comment thread pkg/fauxinnati/release.go
Comment thread cmd/fauxinnati/main.go
Comment thread pkg/fauxinnati/server.go Outdated
@hongkailiu
Copy link
Copy Markdown
Collaborator Author

 $ git --no-pager log --pretty=oneline -1
c92472ac68a626b39b6e114ade4f60afbe827eb7 (HEAD -> real-image, hongkailiu/real-image) Use the latest version to patch

$ curl -s "http://localhost:8080/api/upgrades_info/graph?channel=risks-always&version=4.22.0-0-2026-03-03-000541-test-ci-ln-1phllqb-latest&arch=amd64" | jq '.nodes[1]'
{
  "version": "4.22.0-ec.3",
  "payload": "quay.io/openshift-release-dev/ocp-release@sha256:58b98da1492b3f4af6129c4684b8e8cde4f2dc197e4b483bb6025971d59f92a5",
  "metadata": {
    "io.openshift.upgrades.graph.release.channels": "risks-always",
    "io.openshift.upgrades.graph.release.manifestref": "sha256:00000000000000000000000000000000000000000000000000000000003d5ef0",
    "url": "https://access.redhat.com/errata/RHSA-2024:06200"
  }
}

$ curl -s "http://localhost:8080/api/upgrades_info/graph?channel=risks-always&version=4.21.0-0-2026-03-03-000541-test-ci-ln-1phllqb-latest&arch=amd64" | jq '.nodes[1]'
{
  "version": "4.21.1",
  "payload": "quay.io/openshift-release-dev/ocp-release@sha256:7ca8870aa5e505f969aa26161594a3f99b65baf7d29bab8adaca0cade51b0bb6",
  "metadata": {
    "io.openshift.upgrades.graph.release.channels": "risks-always",
    "io.openshift.upgrades.graph.release.manifestref": "sha256:00000000000000000000000000000000000000000000000000000000003d5b09",
    "url": "https://access.redhat.com/errata/RHSA-2024:06101"
  }
}

$ curl -s "http://localhost:8080/api/upgrades_info/graph?channel=risks-always&version=4.22.3&arch=amd64" | jq '.nodes[1]'
{
  "version": "4.22.4",
  "payload": "quay.io/openshift-release-dev/ocp-release@sha256:00000000000000000000000000000000000000000000000000000000003d5ef4",
  "metadata": {
    "io.openshift.upgrades.graph.release.channels": "risks-always",
    "io.openshift.upgrades.graph.release.manifestref": "sha256:00000000000000000000000000000000000000000000000000000000003d5ef4",
    "url": "https://access.redhat.com/errata/RHSA-2024:06204"
  }
}

@hongkailiu hongkailiu merged commit 8b2a0e1 into petr-muller:main Mar 6, 2026
1 check was pending
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.

2 participants