-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
BZ 1356030 record quota errors during import #10183
Conversation
Output:
|
dc6c13f
to
dcc8fe8
Compare
@@ -86,12 +89,16 @@ type scheduled struct { | |||
} | |||
|
|||
// newScheduled initializes a scheduled import object and sets its scheduler. Limiter is optional. | |||
func newScheduled(enabled bool, client client.ImageStreamsNamespacer, buckets int, bucketLimiter, importLimiter flowcontrol.RateLimiter) *scheduled { | |||
func (f *ImportControllerFactory) newScheduled(enabled bool, client client.ImageStreamsNamespacer, buckets int, bucketLimiter, importLimiter flowcontrol.RateLimiter) *scheduled { |
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.
It seems like client
and importLimiter
can be fetched from f
.
One nit, LGTM otherwise. |
One issue, otherwise LGTM. [test] |
I'm not sure if it really fixes the referenced bug though. The reporter would probably like to see the message either as an output of |
40dc283
to
dc88bd3
Compare
return nil, err | ||
} | ||
isi.Status.Import = obj.(*api.ImageStream) | ||
return isi, nil | ||
} | ||
|
||
// recordQuotaExceededStatus adds the err to any tag that does not already have conditions set. | ||
func recordQuotaExceededStatus(originalStream *api.ImageStream, newStream *api.ImageStream, err error, now unversioned.Time, nextGeneration int64) { | ||
for tag, _ := range newStream.Status.Tags { |
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.
@miminar PTAL - is there a better way to just update the newest tags?
updated to record the quota error as a condition on the tag so it shows during the describe. Removed the events. |
example output:
|
0106a4a
to
efe0ffc
Compare
return nil, err | ||
} | ||
isi.Status.Import = obj.(*api.ImageStream) | ||
return isi, nil | ||
} | ||
|
||
// recordQuotaExceededStatus adds the quota err to any new tag. | ||
func recordQuotaExceededStatus(originalStream *api.ImageStream, newStream *api.ImageStream, err error, now unversioned.Time, nextGeneration int64) { | ||
for tag := range newStream.Status.Tags { |
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.
Could you set condition only on tags affected by the import?
@miminar please see the feedback commit based on our IRC discussion |
[test] |
LGTM, thanks! |
2b6cc5d
to
baef250
Compare
cool, squashed. Will merge on green |
Evaluated for origin test up to baef250 |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/7923/) |
[merge] |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/7923/) (Image: devenv-rhel7_4831) |
Evaluated for origin merge up to baef250 |
Adds event recording for failed image importsupdated to record conditions during import if they are quota errors
@miminar @mfojtik @soltysh