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

Error running pipeline after renaming default GitHub branch from 'master' to 'main' #606

Closed
jzabroski opened this issue Feb 8, 2024 · 3 comments

Comments

@jzabroski
Copy link

I recently changed my repository github.com/fluentmigrator/fluentmigrator to use "main" instead of "master". In Azure Pipelines, I am getting the following error when I click Run Pipeline from the web UI:

Encountered error(s) while parsing pipeline YAML:
Could not get the latest source version for repository fluentmigrator/fluentmigrator hosted on https://github.com/ using ref refs/heads/master. GitHub reported the error, "No commit found for SHA: refs/heads/master"

My pipeline file is https://github.com/fluentmigrator/fluentmigrator/blob/main/azure-pipelines.yml

When I click Validate on this pipeline, it returns OK.

The triggers are configured as:

trigger:
  branches:
    include:
    - release/*
    - main
  tags:
    include:
    - v1.*
    - v2.*
    - v3.*
    - v4.*
    - v5.*

pr: none

What's strange is Pull Requests in a separate yaml file are working correctly: https://github.com/fluentmigrator/fluentmigrator/blob/main/azure-pipelines-pullrequests.yml

I am honestly stumped as to what went wrong. It seems as though Azure Pipelines has cached my old default branch as master, hence why I am adding a comment here.

Originally posted by @jzabroski in microsoft/azure-pipelines-tasks#17552 (comment)

@aleksandrlevochkin
Copy link

Hi @jzabroski thank you for reporting. Your issue seems unrelated to the YAML itself, so I suggest that you open a ticket on Developer community

@jzabroski
Copy link
Author

Can you tell me how you determined that? It seems clearly a bug to me, not a community issue. I may have the wrong github repo but there are several and it's confusing

@aleksandrlevochkin
Copy link

Generally, issues for ADO are tracked on Dev Community (it is mentioned in this repo's README file), unless your issue is related to a more specific area for which a separate repository exists, such as pipeline agent, tasks, yaml templates, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants