Closed akrejcir closed 2 weeks ago
Totals | |
---|---|
Change from base Build 11315476158: | 0.007% |
Covered Lines: | 6062 |
Relevant Lines: | 8357 |
Thanks for the PR @akrejcir
What will happen on upgrade, if the
DeployVMConsoleProxy
FG is set?
Good point, I did not consider update.
Does HCO have functionality to run some logic only during update? It would be good, if we can copy the value of the feature gate to the new field in .spec
. But only during update, because in the new version, the feature gate will be ignored.
Thanks for the PR @akrejcir What will happen on upgrade, if the
DeployVMConsoleProxy
FG is set?Good point, I did not consider update.
Does HCO have functionality to run some logic only during update? It would be good, if we can copy the value of the feature gate to the new field in
.spec
. But only during update, because in the new version, the feature gate will be ignored.
HCO does have code that only run during upgrade, but we need to avoid modifying the HyperConverged spec. Another alternative is the mutation webhook. @tiraboschi WDYT?
hco-e2e-kv-smoke-gcp lane succeeded. /override ci/prow/hco-e2e-kv-smoke-azure
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-kv-smoke-azure
Good point, I did not consider update. Does HCO have functionality to run some logic only during update? It would be good, if we can copy the value of the feature gate to the new field in
.spec
. But only during update, because in the new version, the feature gate will be ignored.HCO does have code that only run during upgrade, but we need to avoid modifying the HyperConverged spec. Another alternative is the mutation webhook. @tiraboschi WDYT?
In assets/upgradePatches.json
we are accumulating a set of jsonpatches to be executed during the upgrades (according to semver matching rules) on the spec stanza of the HCO CR.
move
and copy
operations are also supported. Please take a look at https://github.com/evanphx/json-patch/blob/master/v5/patch_test.go for examples.
I'd suggest to add there an upgradePatch to handle it during upgrades without the need for additional code.
...
HCO does have code that only run during upgrade, but we need to avoid modifying the HyperConverged spec. Another alternative is the mutation webhook. @tiraboschi WDYT?
In
assets/upgradePatches.json
we are accumulating a set of jsonpatches to be executed during the upgrades (according to semver matching rules) on the spec stanza of the HCO CR.move
andcopy
operations are also supported. Please take a look at https://github.com/evanphx/json-patch/blob/master/v5/patch_test.go for examples. I'd suggest to add there an upgradePatch to handle it during upgrades without the need for additional code.
Thanks, I will add a patch there.
Which version is checked by the semverRange
field? Is it the version from which we are upgrading, or to which we are upgrading? It was not clear from the code.
hco-e2e-kv-smoke-gcp lane succeeded. /override ci/prow/hco-e2e-kv-smoke-azure
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-kv-smoke-azure
@akrejcir: The following test failed, say /retest
to rerun all failed tests or /retest-required
to rerun all mandatory failed tests:
Test name | Commit | Details | Required | Rerun command |
---|---|---|---|---|
pull-hyperconverged-cluster-operator-e2e-k8s-1.29 | 25eac4980b7ddacd8ac38b6225fa224143dde121 | link | true | /test pull-hyperconverged-cluster-operator-e2e-k8s-1.29 |
hco-e2e-kv-smoke-gcp lane succeeded. /override ci/prow/hco-e2e-kv-smoke-azure
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-kv-smoke-azure
hco-e2e-upgrade-prev-operator-sdk-sno-aws lane succeeded. /override ci/prow/hco-e2e-upgrade-prev-operator-sdk-sno-azure hco-e2e-upgrade-operator-sdk-sno-aws lane succeeded. /override ci/prow/hco-e2e-upgrade-operator-sdk-sno-azure hco-e2e-upgrade-prev-operator-sdk-aws lane succeeded. /override ci/prow/hco-e2e-upgrade-prev-operator-sdk-azure hco-e2e-operator-sdk-aws lane succeeded. /override ci/prow/hco-e2e-operator-sdk-gcp
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-operator-sdk-gcp, ci/prow/hco-e2e-upgrade-operator-sdk-sno-azure, ci/prow/hco-e2e-upgrade-prev-operator-sdk-azure, ci/prow/hco-e2e-upgrade-prev-operator-sdk-sno-azure
hco-e2e-consecutive-operator-sdk-upgrades-azure lane succeeded. /override ci/prow/hco-e2e-consecutive-operator-sdk-upgrades-aws hco-e2e-operator-sdk-sno-azure lane succeeded. /override ci/prow/hco-e2e-operator-sdk-sno-aws
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-consecutive-operator-sdk-upgrades-aws, ci/prow/hco-e2e-operator-sdk-sno-aws
/retest
Can you please take another look?
hco-e2e-kv-smoke-gcp lane succeeded. /override ci/prow/hco-e2e-kv-smoke-azure
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-kv-smoke-azure
@akrejcir, @tiraboschi
I'm not sure about this PR.
Do we really need a new enabler field to replace the existing feature gate? The term "feature gate" is wrongly used in HCO anyway, and we need to treat the feature gates as "enablers". I think this change will just create mess.
We want to introduce a new API, to fix the wrong feature gate naming anyway.
I suggest to just replace the default value to true.
And @akrejcir - sorry for the late response.
@akrejcir, @tiraboschi
I'm not sure about this PR.
Do we really need a new enabler field to replace the existing feature gate? The term "feature gate" is wrongly used in HCO anyway, and we need to treat the feature gates as "enablers". I think this change will just create mess.
We want to introduce a new API, to fix the wrong feature gate naming anyway.
I suggest to just replace the default value to true.
Thanks for the feedback. I don't have any opinion on HCO API change. I think it is up to you to decide what should change. Then, I will update this PR.
@akrejcir, @tiraboschi
I'm not sure about this PR.
Do we really need a new enabler field to replace the existing feature gate? The term "feature gate" is wrongly used in HCO anyway, and we need to treat the feature gates as "enablers". I think this change will just create mess.
We want to introduce a new API, to fix the wrong feature gate naming anyway.
I agree with this:
the name of the feature gate
stanza is misleading but it's already used for other configuration knobs.
For the sake of consistency, let's continue using it until we will be able to move all of them with the next version of the API.
I suggest to just replace the default value to true.
We need to understand if we simply want to propose a new default for future fresh deployments or if we want also to "silently" change it for all the cluster on upgrades.
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
I'm sorry for the confusion, I've removed most of the code from this PR. Now it only uses the new SSP API without changing the HCO API.
I also did not change the default value for the feature gate, because I incorrectly assumed that we want to enable it by default. In the acceptance criteria of the epic https://issues.redhat.com/browse/CNV-34204 , it says that vm-console-proxy should not be enabled by default.
hco-e2e-upgrade-operator-sdk-sno-aws lane succeeded. /override ci/prow/hco-e2e-upgrade-operator-sdk-sno-azure
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-upgrade-operator-sdk-sno-azure
hco-e2e-consecutive-operator-sdk-upgrades-aws lane succeeded. /override ci/prow/hco-e2e-consecutive-operator-sdk-upgrades-azure
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-consecutive-operator-sdk-upgrades-azure
hco-e2e-upgrade-operator-sdk-sno-aws lane succeeded. /override ci/prow/hco-e2e-upgrade-operator-sdk-sno-azure
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-upgrade-operator-sdk-sno-azure
/retest
@akrejcir: The following tests failed, say /retest
to rerun all failed tests or /retest-required
to rerun all mandatory failed tests:
Test name | Commit | Details | Required | Rerun command |
---|---|---|---|---|
ci/prow/hco-e2e-consecutive-operator-sdk-upgrades-azure | 4862950d3fca7a1d0b645954063f9a2dd89123c7 | link | true | /test hco-e2e-consecutive-operator-sdk-upgrades-azure |
ci/prow/hco-e2e-upgrade-operator-sdk-sno-azure | 4862950d3fca7a1d0b645954063f9a2dd89123c7 | link | false | /test hco-e2e-upgrade-operator-sdk-sno-azure |
ci/prow/hco-e2e-kv-smoke-azure | 4862950d3fca7a1d0b645954063f9a2dd89123c7 | link | true | /test hco-e2e-kv-smoke-azure |
Full PR test history. Your PR dashboard.
hco-e2e-kv-smoke-gcp lane succeeded. /override ci/prow/hco-e2e-kv-smoke-azure
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-kv-smoke-azure
hco-e2e-operator-sdk-sno-aws lane succeeded. /override ci/prow/hco-e2e-operator-sdk-sno-azure hco-e2e-upgrade-prev-operator-sdk-sno-aws lane succeeded. /override ci/prow/hco-e2e-upgrade-prev-operator-sdk-sno-azure
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-operator-sdk-sno-azure, ci/prow/hco-e2e-upgrade-prev-operator-sdk-sno-azure
For the sake of consistency, let's continue using it until we will be able to move all of them with the next version of the API.
@tiraboschi is there already an upstream github issue or an downstream epic to track this?
For the sake of consistency, let's continue using it until we will be able to move all of them with the next version of the API.
@tiraboschi is there already an upstream github issue or an downstream epic to track this?
Yes: https://issues.redhat.com/browse/CNV-47166 for the design phase, currently targeted to v4.18. and https://issues.redhat.com/browse/CNV-17501 for the actual implementation, targeted to v4.19 (this requires a proper support of conversion webhook mechanism in OLMv1 to avoid any disruption on upgrades).
/approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: tiraboschi
The full list of commands accepted by this bot can be found here.
The pull request process is described here
What this PR does / why we need it: The token generation API was stabilized in the SSP, and feature gate was removed: https://github.com/kubevirt/ssp-operator/pull/1018
This PR removes the same feature gate from HCO, and adds a new field in the .spec to enable this feature.
Reviewer Checklist
Jira Ticket:
Release note: