-
Notifications
You must be signed in to change notification settings - Fork 253
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
ci-operator: stop allowing users to set artifact dir #1731
ci-operator: stop allowing users to set artifact dir #1731
Conversation
Part of DPTP-1668 |
64cbf5e
to
3a8038d
Compare
3a8038d
to
716f9fb
Compare
pkg/steps/artifacts.go
Outdated
@@ -366,27 +367,6 @@ func addPodUtils(pod *coreapi.Pod, artifactDir string, decorationConfig *prowv1. | |||
return nil | |||
} | |||
|
|||
func addArtifacts(pod *coreapi.Pod, artifactDir string) { |
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 is suspicious but I think templates don't actually use this, they use addArtifactsToPod
...
Hmm I think I can split this up |
716f9fb
to
9ecab37
Compare
OK, so it theoretically should be possible to split this into steps:
I'll try to do that - there are areas where we infer 1&2 from 3 randomly so it's a bit messy but probably doable. |
9ecab37
to
100978f
Compare
@alvaroaleman @petr-muller updated this to be minimal now that the rest of the changes have come in. Notably, this removes the
In
So there's 563 places where we set it to what would otherwise be the default value anyway, so there's zero utility to this flag. In addition, having to pass this directory around everywhere in our codebase ended up being a bad cargo-cult ... half the places didn't even end up using it, and in some cases like multi-stage it looks like we accidentally used this instead of the per-step one ... |
100978f
to
dde9c8f
Compare
bd055de
to
e77c8c4
Compare
e77c8c4
to
49a06c3
Compare
/retest |
49a06c3
to
5f73515
Compare
@alvaroaleman updated |
Seeing a lot of this lately
/retest |
No longer are users able to set the explicit directory for: - `ci-operator` outputs - simple Pod tests - multi-stage test steps `ci-operator` itself will read the `${ARTIFACTS}` value to determine where to put its own artifacts (like the output jUnit files). This is in effect what already happens, as this is the fallback to when the flag is not passed, and we do not pass it in generated jobs. The flag will remain in a deprecated manner so as to not break users. All test steps *except* for `Template` tests are already using the test-infra pod-utils to upload, and therefore are not allowed to set a non-standard directory, anyway. Nothing changes for these steps. It is now not possible to opt out of this by telling `ci-operator` not to use pod-utils. We continue to use the deprecated artifact fetching sidecar code for Templates, but only for templates. This will cause a breaking change to prowgen as our previous automation explicitly wrote our defaulted value into all configs even if they never set it. Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
5f73515
to
7dbb791
Compare
Rebased and ready @alvaroaleman @petr-muller |
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.
LGTM
/hold
Holding to allow resolving Alvaro's comment
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: petr-muller, stevekuznetsov 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 |
/hold cancel You need to opt in via flag |
No longer are users able to set the explicit directory for:
ci-operator
outputsci-operator
itself will read the${ARTIFACTS}
value to determinewhere to put its own artifacts (like the output jUnit files). This is in
effect what already happens, as this is the fallback to when the flag is
not passed, and we do not pass it in generated jobs. The flag will
remain in a deprecated manner so as to not break users.
All test steps except for
Template
tests are already using thetest-infra pod-utils to upload, and therefore are not allowed to set a
non-standard directory, anyway. Nothing changes for these steps. It is
now not possible to opt out of this by telling
ci-operator
not to usepod-utils.
We continue to use the deprecated artifact fetching sidecar code for
Templates, but only for templates.
This will cause a breaking change to prowgen as our previous automation
explicitly wrote our defaulted value into all configs even if they never
set it.
Signed-off-by: Steve Kuznetsov skuznets@redhat.com
/assign @alvaroaleman @petr-muller @bbguimaraes