-
Notifications
You must be signed in to change notification settings - Fork 99
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
Random checksum mismatch error with data.artifactory_file #858
Comments
@AbirHamzi Thanks for the report. I'll investigate. My initial guess is that something changed between different version of Go, as this data source checksum verification was working before. |
@AbirHamzi Can you share how your file is stored in Artifactory and an example of your HCL? We have acceptance test for verifying checksum (https://github.com/jfrog/terraform-provider-artifactory/blob/master/pkg/artifactory/datasource/artifact/datasource_artifactory_file_test.go#L88) and this has not failed. |
@alexhung as I mentioned, this is a random error that occurs when we run a pipeline. The first time the pipeline runs, it fails, and when we re-run it, the problem is resolved. An example:
|
@AbirHamzi I see that you are using the latest version of the provider. Is it 9.9.1 or later? If so, I wonder if this is related to this Resty PR. Since 2.10.0 has the CVE issue, I'm planning to downgrade Resty from 2.10.0 to 2.9.1. Can you downgrade your provider to 9.9.0 and see if your issue persists? |
@alexhung I tried provider v9.9.0 and v10.0.2, but we are still getting the same checksum error. |
@AbirHamzi Strange. Unfortunately I have not been able to reproduce it yet. |
@AbirHamzi The The Couple these with my inability to reproduce this locally, and this has not been reported until now, suggests to me this may be specific to your environment/setup? |
@alexhung Is it possible that the checksum is being calculated before the file is completely downloaded? |
@AbirHamzi Very unlikely as VerifySha256Checksum is called after the file downloading is completed at: https://github.com/jfrog/terraform-provider-artifactory/blob/master/pkg/artifactory/datasource/artifact/datasource_artifactory_file.go#L246 If you set env var |
@alexhung Thank you for your help.I am closing this issue because it is not a bug. I found another Terraform code that downloads the same file to the same path simultaneously, causing the problem .. |
Describe the bug
Randomly we get a checksum mismatch error.
Requirements for and issue
curl
it at$host/artifactory/api/system/version
Expected behavior
data.artifactory_file successfully downloads a file.
Additional context
Terraform: v1.4.2
Artifactory: v7.55.10
Artifactory provider: latest version
Steps to reproduce the issue:
It looks like this function here is not stable.
The text was updated successfully, but these errors were encountered: