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

odo init - cloning wrong branch of starterProject #6232

Closed
kadel opened this issue Oct 18, 2022 · 1 comment · Fixed by #6290
Closed

odo init - cloning wrong branch of starterProject #6232

kadel opened this issue Oct 18, 2022 · 1 comment · Fixed by #6290
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)).
Milestone

Comments

@kadel
Copy link
Member

kadel commented Oct 18, 2022

/kind bug

▶ odo init  --name vertx  --devfile java-vertx --starter vertx-http-example-redhat
  __
 /  \__     Initializing a new component
 \__/  \
 /  \__/    odo version: v3.0.0-rc2
 \__/

 ✓  Downloading devfile "java-vertx" [1s]
 ✗  Downloading starter project "vertx-http-example-redhat" [2s]
 ✗  unable to download starter project "vertx-http-example-redhat": couldn't find remote ref "refs/heads/master"
the command failed, the devfile has been removed from current directory

default branch in https://github.com/openshift-vertx-examples/vertx-http-example-redhat is main but odo is trying to clone master.

inside devfile.yaml starter project is defined as this

  - name: vertx-health-checks-example-redhat
    git:
      remotes:
        origin: https://github.com/openshift-vertx-examples/vertx-health-checks-example-redhat

which is correct. If there is no revision defined it should use the default branch as defined in repository. It looks like odo is always assuming master.

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 18, 2022
@rm3l rm3l added this to odo Project Oct 18, 2022
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. label Oct 18, 2022
@kadel kadel added the priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). label Oct 26, 2022
@valaparthvi
Copy link
Contributor

valaparthvi commented Oct 27, 2022

If the revision is empty, odo should determine the default branch for the repo and use it instead of master.

git clone by default uses the default branch, so there when downloaded with odo, it always uses master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)).
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants