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

[bug] Artifact overwrite doesn't always work #571

Open
dvd42 opened this issue May 31, 2024 · 2 comments
Open

[bug] Artifact overwrite doesn't always work #571

dvd42 opened this issue May 31, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@dvd42
Copy link

dvd42 commented May 31, 2024

What happened?

I run the following:

Run actions/upload-artifact@v4
  with:
    name: coverage-132-python_services_AI_PE
    path: coverage.xml
    overwrite: true
    retention-days: 15
    if-no-files-found: warn  
    compression-level: 6  

I get:

   With the provided path, there will be 1 file uploaded
Artifact 'coverage-132-python_services_AI_PE' (ID: 1554547722) deleted
Artifact name is valid!
Root directory input is valid!
Beginning upload of artifact content to blob storage
Uploaded bytes 2459
Finished uploading artifact content to blob storage!
SHA256 hash of uploaded artifact zip is ade371acd3b3694e3719d4f7e6a5e87d3d9f03ee3a9c4a7170c6f22ea588a488
Finalizing artifact upload
Artifact coverage-132-python_services_AI_PE.zip successfully finalized. Artifact ID 1554567367
Artifact coverage-132-python_services_AI_PE has been successfully uploaded! Final size is 2459 bytes. Artifact ID is 1554567367

I rerun it:

Run actions/upload-artifact@v4
with:
 name: coverage-132-python_services_AI_PE
 path: coverage.xml
 overwrite: true
 retention-days: 15
 if-no-files-found: warn
 compression-level: 6
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Beginning upload of artifact content to blob storage
Uploaded bytes 2459
Finished uploading artifact content to blob storage!
SHA256 hash of uploaded artifact zip is 66e88e2c255466f590048ad87d1ad78adc4547825a47df05bbab9a95dc10b56e
Finalizing artifact upload
Artifact coverage-132-python_services_AI_PE.zip successfully finalized. Artifact ID 155586
Artifact coverage-132-python_services_AI_PE has been successfully uploaded! Final size is 2459 bytes. Artifact ID is 1555861812

Why on earth doesn't the file get overwritten in both cases? What am I doing wrong?

What did you expect to happen?

I expected the file to be overwritten in both cases

How can we reproduce it?

Yesterday it worked but I cannot get it to work again, so I cannot go back to a state where it works as expected

Anything else we need to know?

No response

What version of the action are you using?

Tried both 4 and 4.3.1

What are your runner environments?

linux

Are you on GitHub Enterprise Server? If so, what version?

No response

@dvd42 dvd42 added the bug Something isn't working label May 31, 2024
@pauldraper
Copy link

pauldraper commented Jun 1, 2024

Same. overwrite: true doesn't prevent conflict from happening.

Screenshot 2024-06-01 at 3 29 50 PM

It seems to be non-deterministic; a re-run fixes it.


My money is on read-modify-write.

Will we ever improve?

@pauldraper
Copy link

My money is on read-modify-write

Will we ever improve?

async function deleteArtifactIfExists(artifactName: string): Promise<void> {

Though FWIW, I don't think this is sole source of the problem. I suspect@actions/artifact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants
@pauldraper @dvd42 and others