Skip to content

Bug 1905599: Preserve original .status.lastUpdateTime in copied CSVs. #1892

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

Conversation

benluddy
Copy link
Contributor

@benluddy benluddy commented Dec 4, 2020

Currently, CSVs are mirrored into the namespaces that are watched by
the operator they represent. At the moment a copied CSV is updated,
its .status.lastUpdateTime field is set to the current time, rather
than using the same timestamp that appears on the original CSV's
status. As the size of a cluster grows, it becomes increasingly
unlikely that these two timestamps will have the same value. This
means that there's almost always a non-empty diff between the original
and any given copy, thereby triggering an update to the copy even if
nothing else has changed in the original.

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 4, 2020
@openshift-ci-robot
Copy link
Collaborator

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 4, 2020
@dinhxuanvu
Copy link
Member

dinhxuanvu commented Dec 5, 2020

I think this is a reasonable stop-gap solution for the copied CSV issue.

Copy link
Member

@dinhxuanvu dinhxuanvu 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-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: benluddy, dinhxuanvu

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-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 5, 2020
Currently, CSVs are mirrored into the namespaces that are watched by
the operator they represent. At the moment a copied CSV is updated,
its .status.lastUpdateTime field is set to the current time, rather
than using the same timestamp that appears on the original CSV's
status. As the size of a cluster grows, it becomes increasingly
unlikely that these two timestamps will have the same value. This
means that there's almost always a non-empty diff between the original
and any given copy, thereby triggering an update to the copy even if
nothing else has changed in the original.
@benluddy benluddy force-pushed the copied-csv-updatetime branch from 5b38f05 to 7fc883c Compare December 8, 2020 03:07
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Dec 8, 2020
@benluddy benluddy marked this pull request as ready for review December 8, 2020 03:09
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 8, 2020
@exdx
Copy link
Member

exdx commented Dec 8, 2020

/lgtm
/retest

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 8, 2020
@ecordell ecordell changed the title Preserve original .status.lastUpdateTime in copied CSVs. Bug 1881504: Preserve original .status.lastUpdateTime in copied CSVs. Dec 8, 2020
@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-urgent Referenced Bugzilla bug's severity is urgent for the branch this PR is targeting. label Dec 8, 2020
@openshift-ci-robot
Copy link
Collaborator

@benluddy: This pull request references Bugzilla bug 1881504, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1881504: Preserve original .status.lastUpdateTime in copied CSVs.

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-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Dec 8, 2020
@ecordell ecordell changed the title Bug 1881504: Preserve original .status.lastUpdateTime in copied CSVs. Bug 1905599: Preserve original .status.lastUpdateTime in copied CSVs. Dec 8, 2020
@openshift-ci-robot
Copy link
Collaborator

@benluddy: This pull request references Bugzilla bug 1905599, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1905599: Preserve original .status.lastUpdateTime in copied CSVs.

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.

@ecordell
Copy link
Member

ecordell commented Dec 8, 2020

/cherry-pick release-4.6

@openshift-cherrypick-robot

@ecordell: once the present PR merges, I will cherry-pick it on top of release-4.6 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.6

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.

@benluddy
Copy link
Contributor Author

benluddy commented Dec 8, 2020

Patch for unrelated test flake is up: #1896.

/retest

@openshift-bot
Copy link
Contributor

/retest

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

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

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

@benluddy
Copy link
Contributor Author

benluddy commented Dec 9, 2020

/retest

@ecordell
Copy link
Member

ecordell commented Dec 9, 2020

/retest

@openshift-merge-robot openshift-merge-robot merged commit 2294bcc into operator-framework:master Dec 9, 2020
@openshift-ci-robot
Copy link
Collaborator

@benluddy: All pull requests linked via external trackers have merged:

Bugzilla bug 1905599 has been moved to the MODIFIED state.

In response to this:

Bug 1905599: Preserve original .status.lastUpdateTime in copied CSVs.

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-cherrypick-robot

@ecordell: #1892 failed to apply on top of branch "release-4.6":

Applying: Preserve original .status.lastUpdateTime in copied CSVs.
Using index info to reconstruct a base tree...
M	pkg/controller/operators/olm/operatorgroup.go
M	test/e2e/csv_e2e_test.go
Falling back to patching base and 3-way merge...
Auto-merging test/e2e/csv_e2e_test.go
CONFLICT (content): Merge conflict in test/e2e/csv_e2e_test.go
Auto-merging pkg/controller/operators/olm/operatorgroup.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Preserve original .status.lastUpdateTime in copied CSVs.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-4.6

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.

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. bugzilla/severity-urgent Referenced Bugzilla bug's severity is urgent for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants