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

CI builds fail with an error regarding uploading of an artifact #144

Closed
6 tasks done
gep13 opened this issue Apr 16, 2024 · 2 comments
Closed
6 tasks done

CI builds fail with an error regarding uploading of an artifact #144

gep13 opened this issue Apr 16, 2024 · 2 comments
Assignees
Labels
5 - Released The issue has been resolved, and released to the public for consumption Bug Issues where something has happened which was not expected or intended
Milestone

Comments

@gep13
Copy link
Member

gep13 commented Apr 16, 2024

Checklist

  • I confirm there are no unresolved issues reported on the Chocolatey Status page.
  • I have verified this is the correct repository for opening this issue.
  • I have verified no other issues exist related to my problem.
  • I have verified this is not an issue for a specific package.
  • I have verified this issue is not security related.
  • I confirm I am using official, and not unofficial, or modified, Chocolatey products.

What You Are Seeing?

When running a CI Build, we are seeing the following error when trying to upload an artifact:

Failed to publish artifacts: Failed to upload artifact MsBuild.log: Got response code 400. Response: 'The Content-MD5 you specified did not match what we received. (Service: null; Status Code: 400; Error Code: BadDigest...

This is an intermittent problem, sometimes it happens, sometimes it doesn't.

What is Expected?

The build should complete without any errors.

How Did You Get This To Happen?

  1. After making a commit onto the develop branch, wait for the CI build to run to completion.

NOTE: Unfortunately, this doesn't happen on every build, but it is happening on the majority of them.

System Details

N/A

Installed Packages

N/A

Output Log

N/A

Additional Context

N/A

@gep13 gep13 added the Bug Issues where something has happened which was not expected or intended label Apr 16, 2024
@gep13 gep13 added this to the 0.26.5 milestone Apr 16, 2024
@gep13 gep13 self-assigned this Apr 16, 2024
@gep13
Copy link
Member Author

gep13 commented Apr 16, 2024

Looking further into this problem, it appears to be an issue with when the upload of the artifact is being attempted. In some cases, i.e. when building a Web Application project, the MSBuild.log file is used later in the build process, after the instruction has been given to upload the artifact.

The suspicion is that the additional usage of the file is causing there to be a different in the hash of the file, and therefore it can't be uploaded.

By moving the upload of the artifact to later in the build process should make it so it can be uploaded.

@gep13 gep13 closed this as completed Apr 16, 2024
@gep13 gep13 added the 4 - Done Code has been added to the repository, and has been reviewed by a team member label Apr 16, 2024
gep13 added a commit that referenced this issue Apr 16, 2024
WIthin the CopyBuildOutput method, when it is a Web Application that is
being built, the MSBuild.log file is used again to capture some
additional output.  This means that there will sometimes be a change to
the file, and therefore the artitfact upload can't be completed.

By moving the upload to be the last thing that is done in the task, it
should be able to complete successfully.
gep13 added a commit that referenced this issue Apr 16, 2024
* hotfix/0.26.5:
  (#144) Ensure artifact upload is the last action
gep13 added a commit that referenced this issue Apr 16, 2024
* master:
  (#144) Ensure artifact upload is the last action
@choco-bot
Copy link

🎉 This issue has been resolved in version 0.26.5 🎉

The release is available on:

Your GitReleaseManager bot 📦 🚀

@gep13 gep13 added 5 - Released The issue has been resolved, and released to the public for consumption and removed 4 - Done Code has been added to the repository, and has been reviewed by a team member labels Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Released The issue has been resolved, and released to the public for consumption Bug Issues where something has happened which was not expected or intended
Projects
None yet
Development

No branches or pull requests

2 participants