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

SubDir non-existent destination bug fix #124

Merged
merged 6 commits into from
Jun 24, 2022

Conversation

michael-valdron
Copy link
Member

@michael-valdron michael-valdron commented Jun 23, 2022

Signed-off-by: Michael Valdron mvaldron@redhat.com

Please specify the area for this PR
registry-support/index/generator

What does does this PR do / why we need it:

Changes in this PR provides the extra process of creating the base directory, if non-existent, for the operation performed by copyFileWithFs on index/generator/libraryutil.go#L223. Without this, certain starter project downloads such as Java Wildfly fail with an error seen in devfile/api#867.

Additional changes include an additional test case which includes the Java Wildfly starter project to perform further testing on starter project downloads using the subDir property.

Which issue(s) this PR fixes:

Fixes #?
partially fixes devfile/api#867

PR acceptance criteria:

  • Test (WIP)

Documentation (WIP)

How to test changes / Special notes to the reviewer:

cd index/generator
go test -v ./...

Signed-off-by: Michael Valdron <mvaldron@redhat.com>
…enamed to 'Maven Java'. 'Maven Java (with subdir)' rewritten to test 'Wildfly Java - microprofile-config subdirectory'.

Signed-off-by: Michael Valdron <mvaldron@redhat.com>
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
Copy link
Member

@johnmcollier johnmcollier left a comment

Choose a reason for hiding this comment

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

I'm a little confused about what will be in the cached zip:

Will the cached starter project be (folders included):

quickstart/microprofile-config

Or just

microprofile-config

index/generator/library/util_test.go Outdated Show resolved Hide resolved
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
@michael-valdron
Copy link
Member Author

I'm a little confused about what will be in the cached zip:

Will the cached starter project be (folders included):

quickstart/microprofile-config

Or just

microprofile-config

It will be in the end quickstart/microprofile-config, the process for downloading git goes through a multi-step process before archiving. In the last step, it appears that it is archiving the entire quickstart but it is the contents of quickstart/microprofile which have been separated.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 24, 2022
@openshift-ci
Copy link

openshift-ci bot commented Jun 24, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: johnmcollier, michael-valdron

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-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 24, 2022
@michael-valdron michael-valdron merged commit e7282a4 into devfile:main Jun 24, 2022
michael-valdron added a commit to michael-valdron/devfile-registry-support that referenced this pull request Jun 24, 2022
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
michael-valdron added a commit that referenced this pull request Jun 27, 2022
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
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
2 participants