Skip to content

Artifact upload can fail on empty files #1085

Description

@lemaitre-aneo

The upload artifact action fails on empty files. see

IT fails with an error like the following:

Error: Unexpected response. Unable to upload chunk to https://pipelines.actions.githubusercontent.com/oq3YkIwTlZnX0uwOgfA8QEu49jAShu3iBz6tYu0qnROylgYxEG/_apis/resources/Containers/19961148?itemPath=terraform-output%2Fall%2Fgenerated%2Finfra-modules%2F.git%2Fobjects%2Fpack%2Fpack-7e2d47d8371ade8d790e459bb77276d878a5b2c3.pack
##### Begin Diagnostic HTTP information #####
Status Code: 400
Status Message: Bad Request
Header Information: {
  "cache-control": "no-store,no-cache",
  "pragma": "no-cache",
  "transfer-encoding": "chunked",
  "content-type": "application/json; charset=utf-8",
  "strict-transport-security": "max-age=2592000",
  "x-tfs-processid": "a196c978-9c7b-4673-beda-bf6874791641",
  "activityid": "7b3d95fa-fc62-480b-b817-bf46781933a3",
  "x-tfs-session": "7b3d95fa-fc62-480b-b817-bf46781933a3",
  "x-vss-e2eid": "7b3d95fa-fc62-480b-b817-bf46781933a3",
  "x-vss-senderdeploymentid": "ac98198d-4d34-0364-420d-bafa6e51dce2",
  "x-frame-options": "SAMEORIGIN",
  "x-cache": "CONFIG_NOCACHE",
  "x-msedge-ref": "Ref A: 287D63F0625E429D9A7FF69C989D7158 Ref B: BN3EDGE1016 Ref C: 2023-05-22T08:11:01Z",
  "date": "Mon, 22 May 2023 08:11:01 GMT"
}
###### End Diagnostic HTTP information ######
Warning: Aborting upload for /home/runner/work/ArmoniK/ArmoniK/infrastructure/quick-deploy/localhost/all/generated/infra-modules/.git/objects/pack/pack-7e2d47d8371ade8d790e459bb77276d878a5b2c3.pack due to failure
Error: aborting artifact upload

We should ensure no empty files are part of artifacts to avoid action failures.
This can be done with the following command before upload the artifact

find . -type f -empty -delete
  • ArmoniK
  • ArmoniK.Core
  • Armonik.Api
  • Armonik.Utils
  • ArmoniK.Infra
  • ArmoniK.Extensions.Csharp
  • ArmoniK.Action.Deploy
  • ArmoniK.Samples

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions