move pkg/build to external client and types#20659
move pkg/build to external client and types#20659openshift-merge-robot merged 19 commits intoopenshift:masterfrom
Conversation
b7f1d9e to
81ccd3e
Compare
|
this isn't going into 3.11 is it? @adambkaplan @coreydaley @nalind fyi, i don't think this will conflict w/ anything you're doing since that code should be using the external api already, if it's doing anything. |
|
@bparees I don't see a reason why this should not land in 3.11 (this is not a feature, just technical debt) |
|
For CLI parts: /cc @soltysh |
|
@mfojtik: GitHub didn't allow me to request PR reviews from the following users: or, for, CLI, parts. Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
FYI: I will split this big commit into interesting and boring changes tomorrow (and this will be ready for review) |
well we are trying to minimize the risk of 3.11 slipping, so if there's any chance this can regress something, that is a reason not to do it in 3.11. |
|
why are we merging any significant changesets to the 3.11 codestream? I agree with ben here, this seems like a bad idea. Especially given that we are actively trying to get branches set up ASAP for 3.11 maintenance |
|
i followed up off list, but i think this pr is low risk and has future benefits. |
9726f21 to
96c5791
Compare
| "github.com/docker/distribution/registry/api/errcode" | ||
| "github.com/golang/glog" | ||
|
|
||
| corev1 "k8s.io/api/core/v1" |
There was a problem hiding this comment.
This might conflict with @soltysh 's current PR :)
| from := buildapihelpers.GetInputReference(strategy) | ||
| func (p *pruner) addBuildStrategyImageReferencesToGraph(referrer *corev1.ObjectReference, strategy buildapi.BuildStrategy, predecessor gonum.Node) []error { | ||
| externalStrategy := buildv1.BuildStrategy{} | ||
| if err := legacyscheme.Scheme.Convert(&strategy, &externalStrategy, nil); err != nil { |
There was a problem hiding this comment.
Could we use pkg/build/apis/build/v1#Convert_build_BuildStrategy_To_v1_BuildStrategy instead here?
There was a problem hiding this comment.
both legacyscheme and this are ugly, I found legacyscheme a little less ugly as it allow us to track the usages
| } | ||
|
|
||
| if stateMatch && !buildutil.IsTerminalPhase(internalBuildStatus.Phase) { | ||
| if stateMatch && !buildapi.IsInternalTerminalPhase(internalBuildStatus.Phase) { |
There was a problem hiding this comment.
nit: s/IsInternalTerminalPhase/IsTerminalPhaseInternal
There was a problem hiding this comment.
that sounds like the intent of that check is to determine if the phase is "internal" ;-)
There was a problem hiding this comment.
"is internal terminal phase" sounds like that too. So let's go w/ @juanvallejo's suggestion so it's at least consistent w/ the other helpers, unless there's a third alternative.
pkg/oc/cli/set/env.go
Outdated
| continue | ||
| } | ||
|
|
||
| // TODO: For Maciej: the ConvertInteralPodSpecToExternal should not be needed? |
There was a problem hiding this comment.
I am removing the need for this in https://github.com/openshift/origin/pull/20645/files#diff-54f6ccf572703b420951c9249df04b84L522
|
|
||
| triggerExternal := &buildv1.BuildTriggerPolicy{} | ||
|
|
||
| if err := legacyscheme.Scheme.Convert(&trigger, triggerExternal, nil); err != nil { |
There was a problem hiding this comment.
Convert_build_BuildTriggerPolicy_To_v1_BuildTriggerPolicy?
| } | ||
|
|
||
| func printBuild(build *buildapi.Build, w io.Writer, opts kprinters.PrintOptions) error { | ||
| func printBuild(build *buildv1.Build, w io.Writer, opts kprinters.PrintOptions) error { |
There was a problem hiding this comment.
hm, does it make sense to have external handlers in the internalversion package? Might make more sense to duplicate externals into a package of their own within oc tree?
There was a problem hiding this comment.
agree, I don't like mixing these here as well, but I don't want to bloat this PR with that change. Will you be ok with follow up to fix this?
There was a problem hiding this comment.
Yep, followup PR is fine
|
left a few comments for cli pieces. A portion of the changes will overlap with Maciej's graph PR |
96c5791 to
ee165b5
Compare
560d071 to
f6c1d1c
Compare
|
@deads2k @bparees @soltysh this should get green tests and should merge immediately after tagged. There are couple follow ups here that we can distribute perhaps:
|
|
/retest |
3 similar comments
|
/retest |
|
/retest |
|
/retest |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mfojtik, soltysh The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Moves
pkg/buildto external clients and external types.Follow ups:
/cc @bparees
/cc @deads2k