Skip to content

Conversation

OlivierCazade
Copy link
Contributor

@OlivierCazade OlivierCazade commented Apr 18, 2025

Description

Adding version label to upstream bundle

Dependencies

n/a

Checklist

If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.

  • Is this PR backed with a JIRA ticket? If so, make sure it is written as a title prefix (in general, PRs affecting the NetObserv/Network Observability product should be backed with a JIRA ticket - especially if they bring user facing changes).
  • Does this PR require product documentation?
    • If so, make sure the JIRA epic is labeled with "documentation" and provides a description relevant for doc writers, such as use cases or scenarios. Any required step to activate or configure the feature should be documented there, such as new CRD knobs.
  • Does this PR require a product release notes entry?
    • If so, fill in "Release Note Text" in the JIRA.
  • Is there anything else the QE team should know before testing? E.g: configuration changes, environment setup, etc.
    • If so, make sure it is described in the JIRA ticket.
  • QE requirements (check 1 from the list):
    • Standard QE validation, with pre-merge tests unless stated otherwise.
    • Regression tests only (e.g. refactoring with no user-facing change).
    • No QE (e.g. trivial change with high reviewer's confidence, or per agreement with the QE team).

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Apr 18, 2025

@OlivierCazade: This pull request references NETOBSERV-2054 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

Description

Adding version label to upstream bundle

Dependencies

n/a

Checklist

If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.

  • Is this PR backed with a JIRA ticket? If so, make sure it is written as a title prefix (in general, PRs affecting the NetObserv/Network Observability product should be backed with a JIRA ticket - especially if they bring user facing changes).
  • Does this PR require product documentation?
  • If so, make sure the JIRA epic is labeled with "documentation" and provides a description relevant for doc writers, such as use cases or scenarios. Any required step to activate or configure the feature should be documented there, such as new CRD knobs.
  • Does this PR require a product release notes entry?
  • If so, fill in "Release Note Text" in the JIRA.
  • Is there anything else the QE team should know before testing? E.g: configuration changes, environment setup, etc.
  • If so, make sure it is described in the JIRA ticket.
  • QE requirements (check 1 from the list):
  • Standard QE validation, with pre-merge tests unless stated otherwise.
  • Regression tests only (e.g. refactoring with no user-facing change).
  • No QE (e.g. trivial change with high reviewer's confidence, or per agreement with the QE team).

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@@ -1,5 +1,7 @@
FROM scratch

ARG BUNDLEVERSION=1.9.0
Copy link
Member

Choose a reason for hiding this comment

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

we'll need to update this every time we cut the branch, correct? could we please document somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

1.9.0 value here si just the default one if the arg is not specified.

In the Makefile we already have a variable with the current version that is updated every new version, we set the argument using this variable, so this should not add any work when cutting branch.

Copy link
Member

Choose a reason for hiding this comment

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

maybe just remove the default value then ? So there's no ambiguity

Copy link
Member

@memodi memodi left a comment

Choose a reason for hiding this comment

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

thanks @OlivierCazade , besides the bundle version, could we add some labels to bundle and individual component images to show which revision they're on for e.g.: short sh256 of latest git commit that main image is currently at?

@jotak
Copy link
Member

jotak commented Apr 25, 2025

thanks @OlivierCazade , besides the bundle version, could we add some labels to bundle and individual component images to show which revision they're on for e.g.: short sh256 of latest git commit that main image is currently at?

@memodi It already exists, it's the "vcs-ref" label:

$ skopeo inspect docker://quay.io/redhat-user-workloads/ocp-network-observab-tenant/network-observability-operator-bundle-ystream@sha256:202263f1605bc99b64e7167a97b4b9b03eddce30314b2647b1d6c68d45b1ee6e | jq '.Labels["vcs-ref"]'
"5841fb0ec2080ee6361bf55036f2321dec8f73af"

$ git log -1 5841fb0ec2080ee6361bf55036f2321dec8f73af
commit 5841fb0ec2080ee6361bf55036f2321dec8f73af (upstream/main, upstream/HEAD)
Author: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com>
Date:   Thu Apr 24 17:14:52 2025 +0200

    chore(deps): update netobserv-ebpf-agent-ystream to 0b2a03c (#1437)
    
    Image created from 'https://github.com/netobserv/netobserv-ebpf-agent?rev=02675b93c9f731e163541227cbfcdcc8df631163'
    
    Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
    Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com>


EDIT: sorry, just saw you're talking about upstream and not downstream

@memodi
Copy link
Member

memodi commented Apr 25, 2025

EDIT: sorry, just saw you're talking about upstream and not downstream

yes, these labels does exist on upstream images as well, but they don't seem to be accurate and values of them are just same across different component images, for e.g.: comparing FLP and Operator main images here:

$ podman image inspect quay.io/netobserv/flowlogs-pipeline:main | jq '.[].Config.Labels."build-date"'
"2025-03-25T14:50:12Z"
$ podman image inspect quay.io/netobserv/flowlogs-pipeline:main | jq '.[].Config.Labels["vcs-ref"]'
"63823c7605fee63261a8e33cad8085bc4bb24676"

$ podman image inspect quay.io/netobserv/network-observability-operator:main | jq '.[].Config.Labels."build-date"'
"2025-03-25T14:50:12Z"
$ podman image inspect quay.io/netobserv/network-observability-operator:main | jq '.[].Config.Labels["vcs-ref"]'
"63823c7605fee63261a8e33cad8085bc4bb24676"

@jotak
Copy link
Member

jotak commented Apr 29, 2025

@memodi that sounds like labels inherited from the base image (ubi9) itself. Which would explain why we retrieve the same on all our components

@memodi
Copy link
Member

memodi commented Apr 30, 2025

@memodi that sounds like labels inherited from the base image (ubi9) itself. Which would explain why we retrieve the same on all our components

could we overwrite them with the values to denote the correct values? I that's essentially what we need as for this task.

@jotak jotak added the needs-changes To be added to denote PR needs changes or some questions/comments to be addressed label May 20, 2025
@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Aug 26, 2025

@OlivierCazade: This pull request references NETOBSERV-2054 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set.

In response to this:

Description

Adding version label to upstream bundle

Dependencies

n/a

Checklist

If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.

  • Is this PR backed with a JIRA ticket? If so, make sure it is written as a title prefix (in general, PRs affecting the NetObserv/Network Observability product should be backed with a JIRA ticket - especially if they bring user facing changes).
  • Does this PR require product documentation?
  • If so, make sure the JIRA epic is labeled with "documentation" and provides a description relevant for doc writers, such as use cases or scenarios. Any required step to activate or configure the feature should be documented there, such as new CRD knobs.
  • Does this PR require a product release notes entry?
  • If so, fill in "Release Note Text" in the JIRA.
  • Is there anything else the QE team should know before testing? E.g: configuration changes, environment setup, etc.
  • If so, make sure it is described in the JIRA ticket.
  • QE requirements (check 1 from the list):
  • Standard QE validation, with pre-merge tests unless stated otherwise.
  • Regression tests only (e.g. refactoring with no user-facing change).
  • No QE (e.g. trivial change with high reviewer's confidence, or per agreement with the QE team).

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@OlivierCazade
Copy link
Contributor Author

Tests are failing because the operator-sdk generate bundle command overwrite the bundle Dockerfile.

I don't remember having thie issue before, may be a new feature of the operator-sdk.

@codecov
Copy link

codecov bot commented Sep 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.79%. Comparing base (f33e098) to head (3f4e67d).
⚠️ Report is 46 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1415      +/-   ##
==========================================
+ Coverage   70.73%   73.79%   +3.06%     
==========================================
  Files          75       80       +5     
  Lines       10011    11357    +1346     
==========================================
+ Hits         7081     8381    +1300     
- Misses       2539     2559      +20     
- Partials      391      417      +26     
Flag Coverage Δ
unittests 73.79% <ø> (+3.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 28 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@OlivierCazade OlivierCazade force-pushed the upstream-bundle-version branch 2 times, most recently from b2da877 to b51b9c5 Compare September 23, 2025 13:21
@jotak jotak mentioned this pull request Sep 25, 2025
10 tasks
@OlivierCazade OlivierCazade force-pushed the upstream-bundle-version branch from b51b9c5 to 3f4e67d Compare October 2, 2025 12:10
Copy link
Member

@jotak jotak left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Oct 2, 2025
@memodi
Copy link
Member

memodi commented Oct 2, 2025

/ok-to-test

@openshift-ci openshift-ci bot added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Oct 2, 2025
@github-actions
Copy link

github-actions bot commented Oct 2, 2025

New images:

  • quay.io/netobserv/network-observability-operator:af337bf
  • quay.io/netobserv/network-observability-operator-bundle:v0.0.0-sha-af337bf
  • quay.io/netobserv/network-observability-operator-catalog:v0.0.0-sha-af337bf

They will expire after two weeks.

To deploy this build:

# Direct deployment, from operator repo
IMAGE=quay.io/netobserv/network-observability-operator:af337bf make deploy

# Or using operator-sdk
operator-sdk run bundle quay.io/netobserv/network-observability-operator-bundle:v0.0.0-sha-af337bf

Or as a Catalog Source:

apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: netobserv-dev
  namespace: openshift-marketplace
spec:
  sourceType: grpc
  image: quay.io/netobserv/network-observability-operator-catalog:v0.0.0-sha-af337bf
  displayName: NetObserv development catalog
  publisher: Me
  updateStrategy:
    registryPoll:
      interval: 1m

@memodi
Copy link
Member

memodi commented Oct 2, 2025

I can version field in the upstream now, however vcs-ref is still empty for the pre-merge bundle:

      "Labels": {
        "operators.operatorframework.io.bundle.channel.default.v1": "community",
        "operators.operatorframework.io.bundle.channels.v1": "latest,community",
        "operators.operatorframework.io.bundle.manifests.v1": "manifests/",
        "operators.operatorframework.io.bundle.mediatype.v1": "registry+v1",
        "operators.operatorframework.io.bundle.metadata.v1": "metadata/",
        "operators.operatorframework.io.bundle.package.v1": "netobserv-operator",
        "operators.operatorframework.io.metrics.builder": "operator-sdk-v1.40.0",
        "operators.operatorframework.io.metrics.mediatype.v1": "metrics+v1",
        "operators.operatorframework.io.metrics.project_layout": "go.kubebuilder.io/v4",
        "operators.operatorframework.io.test.config.v1": "tests/scorecard/",
        "operators.operatorframework.io.test.mediatype.v1": "scorecard+v1",
        "quay.expires-after": "2w",
        "vcs-ref": "",
        "version": "0.0.0-sha-af337bf"
      }
    },

I am guessing version will be overwritten with 0.0.0-sha-main post-merge, correct? However vcs-ref would be helpful determining which commit it was built on.

@jotak jotak mentioned this pull request Oct 3, 2025
@jotak
Copy link
Member

jotak commented Oct 3, 2025

Hi @memodi @OlivierCazade
The reason why it seems not working is because the push-to-quay job is of type pull_request_target, which means the CI itself runs from the base branch, not from the PR. In other words, changes done to makefile/dockerfile/ gh-actions can't be tested this way. (edit: I think my explanation was wrong anyway, changes to makefile are taken into account)
You can test it though, by sending the commit to the worflow-test branch and then opening a dummy PR to be merged into workflow-test => you should see what you want from that dummy PR. That's what I've done here: #2068

[edit]

... annnnnnd ...
It doesn't work any better lol

               "Labels": {
                    "operators.operatorframework.io.bundle.channel.default.v1": "community",
                    "operators.operatorframework.io.bundle.channels.v1": "latest,community",
                    "operators.operatorframework.io.bundle.manifests.v1": "manifests/",
                    "operators.operatorframework.io.bundle.mediatype.v1": "registry+v1",
                    "operators.operatorframework.io.bundle.metadata.v1": "metadata/",
                    "operators.operatorframework.io.bundle.package.v1": "netobserv-operator",
                    "operators.operatorframework.io.metrics.builder": "operator-sdk-v1.40.0",
                    "operators.operatorframework.io.metrics.mediatype.v1": "metrics+v1",
                    "operators.operatorframework.io.metrics.project_layout": "go.kubebuilder.io/v4",
                    "operators.operatorframework.io.test.config.v1": "tests/scorecard/",
                    "operators.operatorframework.io.test.mediatype.v1": "scorecard+v1",
                    "quay.expires-after": "2w",
                    "vcs-ref": "",
                    "version": "0.0.0-sha-74b0b55"
               }

So there's still something wrong

@jotak
Copy link
Member

jotak commented Oct 3, 2025

this commit f87de00 fixes it ... I'll send it to your PR if you're not already on it

@openshift-ci openshift-ci bot removed the lgtm label Oct 3, 2025
@openshift-ci
Copy link

openshift-ci bot commented Oct 3, 2025

New changes are detected. LGTM label has been removed.

@github-actions github-actions bot removed the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Oct 3, 2025
@jotak jotak added ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. and removed needs-changes To be added to denote PR needs changes or some questions/comments to be addressed labels Oct 3, 2025
@github-actions
Copy link

github-actions bot commented Oct 3, 2025

New images:

  • quay.io/netobserv/network-observability-operator:e049d34
  • quay.io/netobserv/network-observability-operator-bundle:v0.0.0-sha-e049d34
  • quay.io/netobserv/network-observability-operator-catalog:v0.0.0-sha-e049d34

They will expire after two weeks.

To deploy this build:

# Direct deployment, from operator repo
IMAGE=quay.io/netobserv/network-observability-operator:e049d34 make deploy

# Or using operator-sdk
operator-sdk run bundle quay.io/netobserv/network-observability-operator-bundle:v0.0.0-sha-e049d34

Or as a Catalog Source:

apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: netobserv-dev
  namespace: openshift-marketplace
spec:
  sourceType: grpc
  image: quay.io/netobserv/network-observability-operator-catalog:v0.0.0-sha-e049d34
  displayName: NetObserv development catalog
  publisher: Me
  updateStrategy:
    registryPoll:
      interval: 1m

@jotak
Copy link
Member

jotak commented Oct 3, 2025

this should work now; from the workflow-test branch:

               "Labels": {
                    "operators.operatorframework.io.bundle.channel.default.v1": "community",
                    "operators.operatorframework.io.bundle.channels.v1": "latest,community",
                    "operators.operatorframework.io.bundle.manifests.v1": "manifests/",
                    "operators.operatorframework.io.bundle.mediatype.v1": "registry+v1",
                    "operators.operatorframework.io.bundle.metadata.v1": "metadata/",
                    "operators.operatorframework.io.bundle.package.v1": "netobserv-operator",
                    "operators.operatorframework.io.metrics.builder": "operator-sdk-v1.40.0",
                    "operators.operatorframework.io.metrics.mediatype.v1": "metrics+v1",
                    "operators.operatorframework.io.metrics.project_layout": "go.kubebuilder.io/v4",
                    "operators.operatorframework.io.test.config.v1": "tests/scorecard/",
                    "operators.operatorframework.io.test.mediatype.v1": "scorecard+v1",
                    "vcs-ref": "f87de00",
                    "version": "0.0.0-sha-workflow-test"
               }

@jotak jotak added the lgtm label Oct 6, 2025
@memodi
Copy link
Member

memodi commented Oct 6, 2025

/ok-to-test

@memodi
Copy link
Member

memodi commented Oct 6, 2025

thanks @jotak
I am guessing this would work after these changes have been merged. I'll go ahead and merge it.

@memodi memodi added the approved label Oct 6, 2025
@openshift-ci
Copy link

openshift-ci bot commented Oct 6, 2025

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 0392046 into netobserv:main Oct 6, 2025
18 of 19 checks passed
@memodi
Copy link
Member

memodi commented Oct 6, 2025

confirming, this is working well on main bundle:

$ oc image info quay.io/netobserv/network-observability-operator-bundle:v0.0.0-sha-main
Name:        quay.io/netobserv/network-observability-operator-bundle:v0.0.0-sha-main
Digest:      sha256:fbf5ece1ab3457c937754384a0184c5dce54f7c59a40763731816d2a1efda21d
Media Type:  application/vnd.docker.distribution.manifest.v2+json
Created:     22m ago
Image Size:  54.99kB in 3 layers
Layers:      54.14kB sha256:30350ed8ac9d9b8cb94666d3005910b557ab175dc0eada45de610aa610ff2374
             389B    sha256:cad83f07a6f4b3014f9a0dd0ab988deeebd12d48907242c622740cc70ffa1198
             454B    sha256:a5d1755a62b36ce729a7e49e31bb10781be54e7360c64b77d25e1f9aa3de3e06
OS:          linux
Arch:        amd64
Command:     <none>
Working Dir: /
Environment: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Labels:      operators.operatorframework.io.bundle.channel.default.v1=community
             operators.operatorframework.io.bundle.channels.v1=latest,community
             operators.operatorframework.io.bundle.manifests.v1=manifests/
             operators.operatorframework.io.bundle.mediatype.v1=registry+v1
             operators.operatorframework.io.bundle.metadata.v1=metadata/
             operators.operatorframework.io.bundle.package.v1=netobserv-operator
             operators.operatorframework.io.metrics.builder=operator-sdk-v1.40.0
             operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
             operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v4
             operators.operatorframework.io.test.config.v1=tests/scorecard/
             operators.operatorframework.io.test.mediatype.v1=scorecard+v1
             vcs-ref=0392046
             version=0.0.0-sha-main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved jira/valid-reference lgtm ok-to-test To set manually when a PR is safe to test. Triggers image build on PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants