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

refactor: extracted starter project code from create options #4369

Merged

Conversation

girishramnani
Copy link
Contributor

@girishramnani girishramnani commented Jan 18, 2021

What type of PR is this?
/kind code-refactoring
What does does this PR do / why we need it:

  • a subpackage shouldn't use its parent package like component/ui shouldn't use component package
  • refactoring starter project code in to component package so it can be unit tested

Which issue(s) this PR fixes:

Fixes #?

PR acceptance criteria:

How to test changes / Special notes to the reviewer:

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. Required by Prow. label Jan 18, 2021
@openshift-ci-robot
Copy link
Collaborator

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: girishramnani

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-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. label Jan 18, 2021
@girishramnani girishramnani marked this pull request as ready for review January 19, 2021 08:18
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. Required by Prow. label Jan 19, 2021

// Downloads first starter project from list of starter projects in devfile
// Currently type git with a non github url is not supported
func DownloadStarterProject(devObj parser.DevfileObj, starterProject *devfilev1.StarterProject, decryptedToken string, registryName string) error {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am sensing that this function could be part of devfilev1.StarterProject struct as a method, but it then needs to land in the api repo

return nil
}

func DecideAndDownloadStarterProject(devObj parser.DevfileObj, projectPassed string, token string, interactive bool) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add some comments here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we make this a private function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@mik-dass
Copy link
Contributor

        I0122 07:18:50.432981   50107 preference.go:222] The path for preference file is /tmp/010926755/preference.yaml
         ✗  Folder /tmp/010926755 contains one element and it's not the devfile used.
        
    to contain substring
        <string>: no starter project found in devfile.
    /go/src/github.com/openshift/odo/tests/helper/helper_generic.go:70

Some error occurred on the CI, please have a look.

@mik-dass
Copy link
Contributor

Some error occurred on the CI, please have a look.

Fix in #4384

Copy link
Contributor

@mik-dass mik-dass left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Jan 27, 2021
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit c88e7ba into redhat-developer:master Jan 28, 2021
@rm3l rm3l added the area/refactoring Issues or PRs related to code refactoring label Jun 19, 2023
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. Required by Prow. area/refactoring Issues or PRs related to code refactoring lgtm Indicates that a PR is ready to be merged. Required by Prow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants