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

publishImageInfo command should not fail if there are no changes to push #1515

Open
mthalman opened this issue Dec 11, 2024 · 2 comments
Open

Comments

@mthalman
Copy link
Member

When running a build that doesn't build any Dockerfiles due to everything being cached, the publish stage will fail when executing the publishImageInfo command:

Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> LibGit2Sharp.EmptyCommitException: No changes; nothing to commit.
   at LibGit2Sharp.Repository.Commit(String message, Signature author, Signature committer, CommitOptions options) in /_/LibGit2Sharp/Repository.cs:line 1081
   at LibGit2Sharp.RepositoryExtensions.Commit(IRepository repository, String message, Signature author, Signature committer) in /_/LibGit2Sharp/RepositoryExtensions.cs:line 200
   at Microsoft.DotNet.ImageBuilder.Commands.PublishImageInfoCommand.UpdateGitRepos(String repoPath, IRepository repo) in /image-builder/src/Commands/PublishImageInfoCommand.cs:line 91
   at Microsoft.DotNet.ImageBuilder.Commands.PublishImageInfoCommand.ExecuteAsync() in /image-builder/src/Commands/PublishImageInfoCommand.cs:line 58
   at Microsoft.DotNet.ImageBuilder.Commands.Command`2.<GetCliCommand>b__9_0(TOptions options) in /image-builder/src/Commands/Command.TOptions.cs:line 46

Instead, it should just provide a warning.

Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

1 similar comment
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@lbussell lbussell moved this from Backlog to Current Release in .NET Docker Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Current Release
Development

No branches or pull requests

2 participants