This repository was archived by the owner on Mar 3, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
(feature) Implement polling image source in intervals #185
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
Author
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main operator-framework/catalogd#185 +/- ##
==========================================
- Coverage 46.15% 39.70% -6.46%
==========================================
Files 6 8 +2
Lines 364 471 +107
==========================================
+ Hits 168 187 +19
- Misses 177 265 +88
Partials 19 19
☔ View full report in Codecov by Sentry. |
ncdc
reviewed
Oct 6, 2023
ncdc
reviewed
Oct 6, 2023
ncdc
reviewed
Oct 6, 2023
ncdc
reviewed
Oct 6, 2023
ncdc
reviewed
Oct 6, 2023
ncdc
reviewed
Oct 6, 2023
ncdc
reviewed
Oct 6, 2023
ncdc
reviewed
Oct 6, 2023
ncdc
reviewed
Oct 6, 2023
ncdc
reviewed
Oct 6, 2023
ncdc
reviewed
Oct 6, 2023
ncdc
reviewed
Oct 6, 2023
0e8a94e to
a8bcf0c
Compare
7f76823 to
7216d84
Compare
joelanford
reviewed
Oct 12, 2023
joelanford
reviewed
Oct 17, 2023
ncdc
reviewed
Oct 17, 2023
ncdc
reviewed
Oct 17, 2023
45b3bd1 to
a351b8b
Compare
ncdc
reviewed
Oct 18, 2023
2fdb4e3 to
e37fcc0
Compare
ncdc
reviewed
Oct 18, 2023
818e971 to
155b53c
Compare
ncdc
reviewed
Oct 18, 2023
| if catalog.Spec.Source.Image.PollInterval == nil { | ||
| return false | ||
| } | ||
| // if it's not time to poll yet, and the CR wasn't changed don't unpack again |
Member
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works as-is, but for future reference, it's often much easier to reason about a series of simple if conditions vs. a combination of conditions. Specifically, I find this easier:
if catalog.Generation != catalog.Status.ObservedGeneration {
return true
}
if nextPoll.After(time.Now()) {
return true
}
return false
ncdc
reviewed
Oct 18, 2023
ncdc
reviewed
Oct 18, 2023
ncdc
reviewed
Oct 18, 2023
Implements https://docs.google.com/document/d/1iWSrWL9pYRJ5Ua3VYErkK1Q2lAusBUeDCh66Ew4lDbQ/edit?usp=sharing Closes operator-framework#180 Signed-off-by: Anik Bhattacharjee <[email protected]>
everettraven
approved these changes
Oct 19, 2023
anik120
added a commit
to anik120/catalogd
that referenced
this pull request
Oct 19, 2023
…work#185) Implements https://docs.google.com/document/d/1iWSrWL9pYRJ5Ua3VYErkK1Q2lAusBUeDCh66Ew4lDbQ/edit?usp=sharing Closes operator-framework#180 Signed-off-by: Anik Bhattacharjee <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements https://docs.google.com/document/d/1iWSrWL9pYRJ5Ua3VYErkK1Q2lAusBUeDCh66Ew4lDbQ/edit?usp=sharing
Closes #180