Skip to content

Commit

Permalink
Merge pull request #464 from DataRecce/hotfix/DRC-832-fix-recce-check…
Browse files Browse the repository at this point in the history
…-status-on-cloud

[Bug] DRC-832 Fix recce checks status doen't shown on Cloud page
  • Loading branch information
kentwelcome authored Oct 24, 2024
2 parents 8ff1462 + ed3718e commit cba1a04
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion recce/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from datetime import datetime
from hashlib import md5, sha256
from typing import List, Optional, Dict, Union, Tuple
from urllib.parse import urlencode

import botocore.exceptions
from pydantic import BaseModel
Expand Down Expand Up @@ -416,9 +417,10 @@ def _export_state_to_recce_cloud(self, metadata: dict = None) -> Union[str, None
presigned_url = RecceCloud(token=self.cloud_options.get('token')).get_presigned_url(
method=PresignedUrlMethod.UPLOAD, pr_info=self.pr_info, artifact_name=RECCE_STATE_COMPRESSED_FILE,
metadata=metadata)

compress_passwd = self.cloud_options.get('password')
headers = s3_sse_c_headers(compress_passwd)
if metadata:
headers['x-amz-tagging'] = urlencode(metadata)
with tempfile.NamedTemporaryFile() as tmp:
self._export_state_to_file(tmp.name, file_type=SupportedFileTypes.GZIP)
response = requests.put(presigned_url, data=open(tmp.name, 'rb').read(), headers=headers)
Expand Down

0 comments on commit cba1a04

Please sign in to comment.