Skip to content

OPECO-2735: initial update to avoid nested docker execution#1075

Merged
openshift-merge-robot merged 2 commits intooperator-framework:masterfrom
grokspawn:composite-private-registries
Mar 13, 2023
Merged

OPECO-2735: initial update to avoid nested docker execution#1075
openshift-merge-robot merged 2 commits intooperator-framework:masterfrom
grokspawn:composite-private-registries

Conversation

@grokspawn
Copy link
Copy Markdown
Contributor

Description of the change:

Motivation for the change:

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /docs
  • Commit messages sensible and descriptive

Signed-off-by: Jordan Keister <jordan@nimblewidget.com>
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 1, 2023
@openshift-ci-robot
Copy link
Copy Markdown

@grokspawn: This pull request references OPECO-2735 which is a valid jira issue.

Details

In response to this:

Description of the change:

Motivation for the change:

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /docs
  • Commit messages sensible and descriptive

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.

@openshift-ci openshift-ci Bot requested review from awgreene and kevinrizza March 1, 2023 16:31
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 1, 2023
@grokspawn
Copy link
Copy Markdown
Contributor Author

/hold while sorting out utest issues.

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 1, 2023
Comment thread alpha/template/composite/builder.go Outdated
Comment thread alpha/template/composite/builder.go Outdated
Comment thread alpha/template/composite/builder.go Outdated
Comment thread alpha/template/composite/builder.go Outdated
Comment thread alpha/template/composite/builder.go
Comment thread alpha/template/composite/builder.go Outdated
Comment thread alpha/template/composite/builder.go
Comment thread alpha/template/composite/builder.go
Comment thread alpha/template/composite/builder.go
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 9, 2023

Codecov Report

Merging #1075 (a74a8d4) into master (0a7ff74) will decrease coverage by 0.17%.
The diff coverage is 75.00%.

❗ Current head a74a8d4 differs from pull request most recent head 37817e3. Consider uploading reports for the commit 37817e3 to get more accurate results

@@            Coverage Diff             @@
##           master    #1075      +/-   ##
==========================================
- Coverage   52.75%   52.58%   -0.17%     
==========================================
  Files         106      107       +1     
  Lines        9378     9384       +6     
==========================================
- Hits         4947     4935      -12     
- Misses       3517     3522       +5     
- Partials      914      927      +13     
Impacted Files Coverage Δ
alpha/declcfg/write.go 75.38% <ø> (ø)
alpha/template/semver/types.go 60.00% <60.00%> (ø)
alpha/template/composite/builder.go 83.56% <62.06%> (-13.65%) ⬇️
alpha/template/semver/semver.go 66.16% <86.11%> (+1.63%) ⬆️
alpha/template/composite/composite.go 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@grokspawn grokspawn force-pushed the composite-private-registries branch from 5ef6c33 to 9a636a8 Compare March 10, 2023 15:55
Comment thread alpha/template/composite/builder.go Outdated

func (rb *RawBuilder) Validate(dir string) error {
return validate(rb.builderCfg.ContainerCfg, path.Join(rb.builderCfg.CurrentDirectory, dir))
return validate(rb.builderCfg.ContainerCfg, path.Join(rb.builderCfg.InputDirectory, dir))
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This namechange really illustrates how moving from container-in-container to container-less really moves us in the direction of re-examining the entire schema.

Logically, this should be builderCfg.ContainerCfg.WorkingDir unless CompositeConfig.Components[].Destination.Path (dir here) is canonical, in which case builderCfg.InputDirectory is superfluous.

I think we need to eliminate the WorkingDir element from the schema since it only really makes sense w/in a container.

Similar for InputDirectory where we really need to be able to rely on the input path from the author.

Still nibbling on this, but might just choose to leave as-is for this PR.

Copy link
Copy Markdown
Contributor Author

@grokspawn grokspawn Mar 13, 2023

Choose a reason for hiding this comment

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

On later thought, WorkingDir makes a lot of sense from the use-case from the maintainer of "I will look for contributions generated here".

I think InputDirectory is still obsolete, though. We'll remove and adjust the schema for fit in a later PR.

Signed-off-by: Jordan Keister <jordan@nimblewidget.com>
@grokspawn grokspawn force-pushed the composite-private-registries branch from 9a636a8 to 37817e3 Compare March 13, 2023 12:33
@grokspawn
Copy link
Copy Markdown
Contributor Author

/hold cancel

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 13, 2023
@grokspawn grokspawn requested a review from everettraven March 13, 2023 13:39
Copy link
Copy Markdown
Contributor

@everettraven everettraven left a comment

Choose a reason for hiding this comment

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

Looks good to me overall. Only nits I have is leaving in the BuilderConfig.InputDirectory field if it isn't going to be used and maybe simplifying the BuilderConfig struct by removing the ContainerConfig struct since we only use a string field from it. I'm OK with it going in like this as long as the plan is to clean it up in follow up PRs.

Comment thread alpha/template/composite/builder.go
Comment thread alpha/template/composite/builder_test.go
Comment thread cmd/opm/alpha/template/composite.go
Comment thread alpha/template/composite/builder.go
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Mar 13, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: everettraven, grokspawn

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@oceanc80
Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Mar 13, 2023
@openshift-merge-robot openshift-merge-robot merged commit 1149175 into operator-framework:master Mar 13, 2023
@grokspawn grokspawn deleted the composite-private-registries branch March 13, 2023 21:02
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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants