Skip to content
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

Add ForcePull to BuildOverrides #123

Merged
merged 2 commits into from Jul 10, 2020
Merged

Add ForcePull to BuildOverrides #123

merged 2 commits into from Jul 10, 2020

Conversation

coreydaley
Copy link
Member

Use the ForcePull pointer from BuildOverridesConfig

https://issues.redhat.com/browse/BUILD-96

@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 Jun 25, 2020
@coreydaley coreydaley changed the title [WIP] Jira build 96 add forcepull to buildoverrides Jira build 96 add forcepull to buildoverrides Jul 7, 2020
@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 Jul 7, 2020
@coreydaley
Copy link
Member Author

/assign @adambkaplan @gabemontero

@gabemontero
Copy link
Contributor

in case it is masked by github's PR review ... I think the comment from 13 days ago around line 45 of overrides.go was resolved incorrectly @coreydaley @adambkaplan

the default should be IfNotPresent, which is what k8s go doc says, and hence I don't think applyForcePullToPod should need modification

@coreydaley
Copy link
Member Author

If the system admin has set ForcePull to false, shouldn't we propagate that down also?
So if a user has set it to corev1.PullAlways, and the sys admin set ForcePull to false, shouldn't that change the users config to corev1.IfNotPresent?

@gabemontero
Copy link
Contributor

If the system admin has set ForcePull to false, shouldn't we propagate that down also?

duh ... correct ... also updated my comment above ... feel free to resolve

So if a user has set it to corev1.PullAlways, and the sys admin set ForcePull to false, shouldn't that change the users config to corev1.IfNotPresent?

ok for this one, the user does not have access to set pull always, etc. ... they just control force pull, and force pull should either translate to always or ifnotpresent

Your code still has pullPolicy := corev1.PullNever

@coreydaley
Copy link
Member Author

Your code still has pullPolicy := corev1.PullNever

Yep, I will fix that, I think it got reset when I made a recent change :(

@coreydaley
Copy link
Member Author

@gabemontero changed to IfNotPresent instead of Never

Copy link
Contributor

@gabemontero gabemontero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default pull policy looks good @coreydaley

one more suggestion came to me ... add a unit test that confirms false (and not set at all for that matter perhaps) results in pull if not present being set

pkg/build/controller/build/overrides/overrides_test.go Outdated Show resolved Hide resolved
@gabemontero
Copy link
Contributor

gabemontero commented Jul 8, 2020 via email

@coreydaley
Copy link
Member Author

@adambkaplan Do you have any comments on this?

Copy link
Contributor

@adambkaplan adambkaplan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coreydaley nit in the code and PR title. These are consumed by the public in our changelogs.

Suggested change: "Allow ForcePull to be set to False in BuildOverrides".

pkg/build/controller/build/overrides/overrides.go Outdated Show resolved Hide resolved
@adambkaplan
Copy link
Contributor

/approve

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 9, 2020
https://issues.redhat.com/browse/BUILD-96

fixing test, BuildSpec.TriggeredBy json now has omitempty
@coreydaley
Copy link
Member Author

@adambkaplan @gabemontero all comments have been addressed and all requested updates completed. ptal

@gabemontero
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 9, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adambkaplan, coreydaley, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@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.

@openshift-merge-robot openshift-merge-robot merged commit 2d163d9 into openshift:master Jul 10, 2020
@adambkaplan
Copy link
Contributor

/retitle Add ForcePull to BuildOverrides

@openshift-ci-robot openshift-ci-robot changed the title Jira build 96 add forcepull to buildoverrides Add ForcePull to BuildOverrides Jul 15, 2020
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.

None yet

6 participants