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

Unexpected(?) behaviour when defining repo branch as an empty string #178

Open
orviz opened this issue Jan 13, 2022 · 1 comment
Open

Unexpected(?) behaviour when defining repo branch as an empty string #178

orviz opened this issue Jan 13, 2022 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@orviz
Copy link
Member

orviz commented Jan 13, 2022

Just noticed the following behaviour in JePL-2.1.1 (probably related to scm step). If I set repo's branch as an empty string:

config:
  project_repos:
    github.com/jupyter/nbgrader:
      repo: https://github.com/jupyter/nbgrader
      branch: ''     

the pipeline gets an origin/0.4.x branch, which surprisingly (at least for me) is not the default branch set for this repo (it is origin/master).

However, the default branch (origin/master) is indeed used when the property is removed, such as:

config:
  project_repos:
    github.com/jupyter/nbgrader:
      repo: https://github.com/jupyter/nbgrader
@samuelbernardolip samuelbernardolip self-assigned this Feb 3, 2022
@samuelbernardolip samuelbernardolip added the bug Something isn't working label Feb 3, 2022
@samuelbernardolip samuelbernardolip added this to the 2.1.2 milestone Feb 3, 2022
@orviz
Copy link
Member Author

orviz commented Mar 31, 2022

Update on this: found a repo where an error happens also in the case that branch is not defined. In config.yml:

  project_repos:
    github.com/lisc-tools/lisc:
      repo: https://github.com/lisc-tools/lisc

The exception message:

hudson.AbortException: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
	at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:1157)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1303)
	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:97)
	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:84)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants