Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swap-image-csv.sh updates and minor fixes to set-plugin-image #535

Merged
merged 2 commits into from
Jan 25, 2024

Conversation

memodi
Copy link
Contributor

@memodi memodi commented Jan 24, 2024

Description

Updating swap-image-csv.sh script such that DOWNSTREAM_DEPLOYMENT env variable could be patched in CSV and minor fixes to set-plugin-image.

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 labelled 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).

Copy link

codecov bot commented Jan 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9d50e16) 57.83% compared to head (76baac9) 57.63%.
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #535      +/-   ##
==========================================
- Coverage   57.83%   57.63%   -0.21%     
==========================================
  Files          70       70              
  Lines        9446     9446              
==========================================
- Hits         5463     5444      -19     
- Misses       3653     3666      +13     
- Partials      330      336       +6     
Flag Coverage Δ
unittests 57.63% <ø> (-0.21%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


.PHONY: set-release-kind-downstream
set-release-kind-downstream:
ifeq ("", "$(CSV)")
Copy link
Contributor

Choose a reason for hiding this comment

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

This is for kind cluster deploy which doesn't use CSV

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, I have preserved behavior if there's no CSV it would just update env in noo controller deployment, is it incorrect?

Copy link
Member

Choose a reason for hiding this comment

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

I think there's a confusion :-) It's not for KIND clusters, it's "release kind" like in "downstream kind of release"

if [[ ! -z ${patch1+x} ]] ; then
oc patch csv $csv_name -n $namespace --type='json' -p "[$patch1, $patch2]"
else
oc patch csv $csv_name -n $namespace --type='json' -p "[$patch2]"
Copy link
Contributor

Choose a reason for hiding this comment

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

is this suppose to be patch1 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so patch2 is what we want in all cases, patch1 is conditional depending upon whether rel_name is set patch1 var will be set.

@@ -179,12 +179,15 @@ endif
@echo -e "\n==> Redeploying..."
kubectl rollout status -n $(OPERATOR_NS) --timeout=60s deployment netobserv-controller-manager
kubectl wait -n $(OPERATOR_NS) --timeout=60s --for condition=Available=True deployment netobserv-controller-manager
kubectl rollout status -n $(NAMESPACE) --timeout=60s deployment netobserv-plugin
Copy link
Contributor

Choose a reason for hiding this comment

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

did u intentionally remove those 2 lines ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, since it assumes netobserv-plugin is already deployed, while csv could be patched before any plugin is deployed and there would no netobserv-plugin deployment to check rollout status on. This is in line with what's currently in there for ebpf/flp make targets

Copy link
Member

Choose a reason for hiding this comment

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

I'm good with that, this wasn't really useful actually

@jotak
Copy link
Member

jotak commented Jan 25, 2024

/lgtm

@OlivierCazade
Copy link
Contributor

/approve

Copy link

openshift-ci bot commented Jan 25, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: OlivierCazade

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 33456e0 into netobserv:main Jan 25, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants