From 4c890061aa06265cefe73856f04aba64d9bad65c Mon Sep 17 00:00:00 2001 From: Alex Hung Date: Fri, 10 Jan 2025 11:11:35 -0800 Subject: [PATCH 1/2] Fix incorrect bit size for int parsing --- .../resource/artifact/resource_artifactory_artifact.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/artifactory/resource/artifact/resource_artifactory_artifact.go b/pkg/artifactory/resource/artifact/resource_artifactory_artifact.go index 7c6488e0..00b96351 100644 --- a/pkg/artifactory/resource/artifact/resource_artifactory_artifact.go +++ b/pkg/artifactory/resource/artifact/resource_artifactory_artifact.go @@ -86,7 +86,7 @@ func (r *ArtifactResourceModel) fromAPIModel(apiModel ArtifactAPIModel) diag.Dia r.DownloadURI = types.StringValue(apiModel.DownloadURI) r.MimeType = types.StringValue(apiModel.MimeType) - size, err := strconv.ParseInt(apiModel.Size, 10, 16) + size, err := strconv.ParseInt(apiModel.Size, 10, 64) if err != nil { return diag.Diagnostics{ diag.NewErrorDiagnostic( From 32b1d94401d1b868edb4b9092a149b3257c75a8e Mon Sep 17 00:00:00 2001 From: Alex Hung Date: Mon, 13 Jan 2025 10:12:22 -0800 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a376a2dc..565e9f37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 12.8.1 (January 13, 2025). Tested on Artifactory 7.98.13 with Terraform 1.10.4 and OpenTofu 1.9.0 + +BUG FIXES: + +* resource/artifactory_artifact: Fix incorrect integer parsing for `size` attribute. Issue: [#1169](https://github.com/jfrog/terraform-provider-artifactory/issues/1169) PR: [#1171](https://github.com/jfrog/terraform-provider-artifactory/pull/1171) + ## 12.8.0 (January 8, 2025). Tested on Artifactory 7.98.13 with Terraform 1.10.3 and OpenTofu 1.8.8 FEATURES: