-
Notifications
You must be signed in to change notification settings - Fork 82
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
rebuild filesystem map on config change #95
rebuild filesystem map on config change #95
Conversation
the latest e2e-aws-operator run uncovered some more short comings in the e2e test ... it minimally needs to wait for the skip list change to be fully processed by the operator ... in the last run, it became apparent it was not will be adding fixes to this PR |
11fe0c5
to
5a2687c
Compare
image-eco: another incredibly slow dancer-mysql build wrt downloading dancer-mysql dependencies from various github and other internet locations |
and the first clean aws-operator in a bit |
/test e2e-aws-image-ecosystem |
running operator e2e again /test e2e-aws-operator |
aws-operator passes again image-eco flakes again with the same dancer slowness .... @bparees ptal at the changes I'll initiate more test runs, but if these slowness flakes persist, having to dive into them and possible disabling tests or increasing timeouts of these tests might be needed .... I think the delays are upstream internet issues, but a second or third set of eyes may not hurt if it comes to that |
/test e2e-aws-image-ecosystem |
/test e2e-aws-operator |
pkg/stub/interfaces.go
Outdated
imagestream = tagInPayload("v4.0", "IMAGE_AGENT_NODEJS", imagestream) | ||
if g.h != nil { | ||
// if we are not skipping jenkins imagestream, tag in images from payload | ||
if _, ok := g.h.imagestreamFile["jenkins"]; ok { |
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.
don't need to handle the 2 agent imagestream names separately?
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.
I was inclined to think that customers would not be looking to manage the agent streams since they don't come from known samples content from openshift/library
But sure perhaps that is an over reaching assumption?
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.
if we allow people to skip an imagestream by name i think we have to assume they might use that to skip the jenkins agent imagestreams in addition to the master imagestream. (and conversely, just because they skip jenkins doesn't mean they want to skip the agents)
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 will go away in next push
pkg/stub/interfaces.go
Outdated
case imagestream.Name == "jenkins-agent-nodejs": | ||
imagestream = tagInPayload("v4.0", "IMAGE_AGENT_NODEJS", imagestream) | ||
if g.h != nil { | ||
// if we are not skipping jenkins imagestream, tag in images from payload |
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.
why does this need to be special cased?
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.
file processing can occur regardless of actual imagestream upserting
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.
I'll add a comment
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.
but why not just always do this?
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.
(ie always update the imagestream w/ the payload pullspec, even if the user is "skipping" the imagestream).
If anything it seems safer than returning an un-mutated imagestream that contains content we know is wrong.
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.
I think there will be cases when users want to import their own jenkins images ... at least at the beginning of 4.0 dev @jupierce relayed to me his team would need this
The agent streams yeah maybe it just makes sense to always mutate
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.
though per the other comment thread maybe we do allow manage separately, and allow to skip :-)
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.
What I was trying to get at is that I see calling this function as orthogonal to whether the imagestream is being skipped or not.
This function's job(as i understand it) is to return an imagestream for a given filepath. (and in the case of jenkins, handle mutating the imagestream as needed, though maybe this isn't the right place to do the mutation since presumably the other imagestream mutations, such as to change the registry hostname, are done elsewhere).
It shouldn't care whether a given imagestream is in the skipped list or not, that should be up to the caller to filter out.
So making this function aware of the skiplist, specifically to handle jenkins mutation, seems awkward.
What would happen if this function always mutated the jenkins imagestream before returning it, regardless of the skiplist?
Alternatively, can we put the mutation in the same place other imagestream mutation is done?
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.
Admittedly the path of least resistance was here. I'll revisit isolating the mutation, placing it elsewhere, and we can compare the awkwardness, etc.
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.
yeah it will be cleaner ... part of next push
pkg/stub/config.go
Outdated
newStreamMap[si] = true | ||
} | ||
h.skippedImagestreams = newStreamMap | ||
h.skippedTemplates = newTempMap | ||
|
||
} | ||
|
||
func (h *Handler) buildFileMaps(cfg *v1.Config) error { | ||
func (h *Handler) buildFileMaps(cfg *v1.Config, cfgChange bool) error { |
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.
maybe rename this to forceRebuild ? That seems to be its intent.
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.
Yeah I went with the "why" vs. "intent" etc.
But there may be new reasons to force in the future ... I'll change
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.
part of next push
bld skip filters off of Status.Skipped* don't tag payload for jenkins* when jenkins in skip list make sure Status.Skipped* updated in TestSkipped
5a2687c
to
89577c4
Compare
updates pushed @bparees ... ptal |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bparees, gabemontero 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 |
1 similar comment
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bparees, gabemontero 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 |
cool thx @bparees and the "ben 1" commit will live in posterity :-) |
doh. i swear github was only showing me one commit. oh well. |
No description provided.