network-observability-operator
network-observability-operator copied to clipboard
NETOBSERV-2054: Adding version label to upstream bundle
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).
@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.
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
mainimage 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
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"
@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 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.
@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):
- [x] 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.
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 Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 73.79%. Comparing base (f33e098) to head (3f4e67d).
:warning: 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%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more. see 28 files with indirect coverage changes
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
/ok-to-test
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
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.
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: https://github.com/netobserv/network-observability-operator/pull/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
this commit https://github.com/netobserv/network-observability-operator/commit/f87de00293713b1b1730e67743afaf331e6ef6aa fixes it ... I'll send it to your PR if you're not already on it
New changes are detected. LGTM label has been removed.
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
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"
}
/ok-to-test
thanks @jotak I am guessing this would work after these changes have been merged. I'll go ahead and merge it.
[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
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
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