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

🐛 Ensure external plugin can scaffold files in new directories #3519

Merged

Conversation

Eileen-Yu
Copy link
Member

Description:

Ensure the path specified in PluginResponse.Universe is created before the real scaffolding logic.

Example:
For the Universe:

universe["some/dir/file.yaml"] = `...`

Create /home/user/foo-test/some/dir before scaffolding so as to avoid errors like:

2023/08/02 11:56:23 failed to initialize project: unable to scaffold with "foo/v1": open /home/user/foo-test/some/dir/file.yaml: no such file or directory

Motivation:

Aims to fix the corresponding issue #3518

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 3, 2023
@Eileen-Yu Eileen-Yu force-pushed the fix/create-path-in-ep-universe branch from c5ea4d5 to 08c43bc Compare August 3, 2023 20:00
Copy link
Contributor

@Kavinjsir Kavinjsir left a comment

Choose a reason for hiding this comment

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

lgtm 👍🏼

Copy link
Contributor

@rashmigottipati rashmigottipati left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 3, 2023
Copy link
Member

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

That shows great for me

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 4, 2023
@camilamacedo86
Copy link
Member

/hold

Fo @everettraven give their review either.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 4, 2023
Copy link
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.

Functionally this looks good - thanks @Eileen-Yu for the PR! I do have one nit:

pkg/plugins/external/helpers.go Outdated Show resolved Hide resolved
@Eileen-Yu Eileen-Yu force-pushed the fix/create-path-in-ep-universe branch from 08c43bc to 7cdcfa3 Compare August 7, 2023 19:36
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 7, 2023
@Kavinjsir
Copy link
Contributor

/test pull-kubebuilder-e2e-k8s-1-27-1

Copy link
Member

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

It seems that is good to fly now that the recommendation from @everettraven is either attended.

/lgtm

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 10, 2023
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 10, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86, Eileen-Yu, everettraven, Kavinjsir, rashmigottipati

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

@Kavinjsir
Copy link
Contributor

/test pull-kubebuilder-e2e-k8s-1-26-0

@k8s-ci-robot k8s-ci-robot merged commit 32720bc into kubernetes-sigs:master Aug 10, 2023
9 checks passed
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants