Skip to content

Conversation

@wking
Copy link
Member

@wking wking commented Dec 8, 2021

Assorted tidying in preparation for populating status.history[].acceptedRisks. No semantic changes here. Details in the commit messages.

wking added 2 commits December 7, 2021 15:57
…gradeable_test

To match our preferred spelling.  The test file has had the outgoing
spelling since it landed in bcd58d8 (loosen upgradeable condition
to allow z-level upgrades, 2020-01-02, openshift#291).
The argument landed in b72e843 (Bug 1822844: Block z level upgrades
if ClusterVersionOverridesSet set, 2020-04-30, openshift#364) for use by
Upgradeable.Run.  But even then, that method opens by retrieving a
(possibly cached) ClusterVersion resource from the configured lister,
so there's no need to pass the explicit argument.  We should save
explicit inputs for things that need to be passed in from memory at
call-time, and not use them for information that can be retrieved from
precondition-creation-time callbacks.  And even for things that need
to come from memory at call time, we should be using ReleaseContext so
we can add and remove properties without having to touch function
signatures for precondition implementations that don't care about the
properties we're touching.

While I'm touching the Run call site, I replaced a context.TODO with a
context.Background.  As pointed out in the docs [1], Background is
prefered for tests.

[1]: https://pkg.go.dev/context#Background
@openshift-ci openshift-ci bot requested review from jottofar and vrutkovs December 8, 2021 08:30
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 8, 2021
@wking wking force-pushed the precondition-cleanup branch 2 times, most recently from 1f435bd to ff739b2 Compare December 8, 2021 09:06
The argument landed in b72e843 (Bug 1822844: Block z level upgrades
if ClusterVersionOverridesSet set, 2020-04-30, openshift#364) for use by
Upgradeable.Run.  But even then, that method opens by retrieving a
(possibly cached) ClusterVersion resource from the configured lister,
so there's no need to pass the explicit argument.  We should save
explicit inputs for things that need to be passed in from memory at
call-time, and not use them for information that can be retrieved from
precondition-creation-time callbacks.  And even for things that need
to come from memory at call time, we should be using ReleaseContext so
we can add and remove properties without having to touch function
signatures for precondition implementations that don't care about the
properties we're touching.

While I'm touching the Run call site, I replaced a context.TODO with a
context.Background.  As pointed out in the docs [1], Background is
prefered for tests.

[1]: https://pkg.go.dev/context#Background
@wking wking force-pushed the precondition-cleanup branch 2 times, most recently from 077d079 to 5469ae8 Compare December 10, 2021 05:06
Shifting this down a level sets the stage for warn-level preconditions
that can produce a non-blocking error.  We don't have those yet, but
once we do, we can handle aggregation within Summarize without needing
further modifications to the sync-worker call-site.
There's enough going on in the RecentEtcdBackup and Upgradeable
preconditions that having them in their own files doesn't feel too
empty.
@wking wking force-pushed the precondition-cleanup branch from 5469ae8 to c77c336 Compare December 10, 2021 14:58
@jottofar
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 10, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 10, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jottofar, wking

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

The pull request process is described here

Details 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-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@wking
Copy link
Member Author

wking commented Dec 10, 2021

sandboxes are unrelated.

/override ci/prow/e2e-agnostic-upgrade

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 10, 2021

@wking: Overrode contexts on behalf of wking: ci/prow/e2e-agnostic-upgrade

Details

In response to this:

sandboxes are unrelated.

/override ci/prow/e2e-agnostic-upgrade

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 kubernetes/test-infra repository.

@openshift-merge-robot openshift-merge-robot merged commit 8219252 into openshift:master Dec 10, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 10, 2021

@wking: all tests passed!

Full PR test history. Your PR dashboard.

Details

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 kubernetes/test-infra repository. I understand the commands that are listed here.

@wking wking deleted the precondition-cleanup branch December 10, 2021 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants