You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As stated in #2403 , the issue is happening because the LatestCommit function in the fetch.go file is using the provided branch to get the last commit or master if none is provided.
As this example is using a git repo with main as its default branch, and we're using a revision, fleet tries to find the last commit formaster. But master is not found and we get the error.
Expected Behavior
The default branch for git repositories should be configurable or, at least, fallback to main if master is not found (or we get an error)
At least the error message should mention what's the branch used so users (and fleet team) have pointers about what's going on. "commit not found for branch master" would give more information, pointing out that fleet is trying to access the master branch.
The actual error message is just "commit not found"
The text was updated successfully, but these errors were encountered:
#2410 implements a change in the error message shown to include the branch or revision used.
This way the user will be able to see, for example, that Fleet uses master as its default branch when not defining a branch explicitly in the gitrepo resource and having main as the default.
Is there an existing issue for this?
Current Behavior
This issue is related to #2403
Apply the followin
gitrepo
(The important bit is that we're using a revision and that the git repo's default branch ismain
)The
gitrepo
won't deploy successfully and we can observe the following error ingitjob
:As stated in #2403 , the issue is happening because the
LatestCommit
function in the fetch.go file is using the provided branch to get the last commit ormaster
if none is provided.As this example is using a git repo with
main
as its default branch, and we're using a revision, fleet tries to find the last commit formaster
. Butmaster
is not found and we get the error.Expected Behavior
The default branch for git repositories should be configurable or, at least, fallback to
main
ifmaster
is not found (or we get an error)At least the error message should mention what's the branch used so users (and fleet team) have pointers about what's going on.
"commit not found for branch master"
would give more information, pointing out thatfleet
is trying to access themaster
branch.The actual error message is just
"commit not found"
The text was updated successfully, but these errors were encountered: