Skip to content
This repository has been archived by the owner on Jan 30, 2025. It is now read-only.

Tiny refactoring for file uploading code #1423

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

inancgumus
Copy link
Member

@inancgumus inancgumus commented Sep 10, 2024

What?

Improve file persister naming.

  • Move checkStatus utility to the bottom to reduce noise while reading
  • pre-signed to presigned and preSigned to presigned for consistency
  • getPresignedURL to requestPresignedURL for saying it's a request
  • newUploadRequest to newFileUploadRequest for specificity
  • readResponseBody generic naming to specific readPresignedURLResponse
  • preSignedURLGetterURL to presignedURLRequestURL for consistency

Why?

For consistency and readability (hopefully).

Checklist

  • I have performed a self-review of my code
  • I have added tests for my changes
  • I have commented on my code, particularly in hard-to-understand areas

Related PR(s)/Issue(s)

Updates grafana/k6-cloud#2539

@inancgumus inancgumus self-assigned this Sep 10, 2024
@inancgumus inancgumus marked this pull request as ready for review September 10, 2024 19:32
@inancgumus inancgumus requested a review from ankur22 September 10, 2024 19:32
ankur22
ankur22 previously approved these changes Sep 11, 2024
@inancgumus inancgumus force-pushed the add/screenshot-upload-v2 branch from fcb6d5c to 827263c Compare September 11, 2024 15:01
Base automatically changed from add/screenshot-upload-v2 to main September 11, 2024 15:08
@inancgumus inancgumus dismissed ankur22’s stale review September 11, 2024 15:08

The base branch was changed.

Some small changes to make it more readable (subjectively!)

- Move checkStatus utility to bottom to reduce noise while reading
- pre-signed to presigned and preSigned to presigned for consistency
- getPresignedURL to requestPresignedURL for saying it's a request
- newUploadRequest to newFileUploadRequest for specificity
- readResponseBody generic naming to specific readPresignedURLResponse
- preSignedURLGetterURL to presignedURLRequestURL for consistency
@inancgumus inancgumus force-pushed the refactor/screenshot-uploading branch from 63a303b to b8d6418 Compare September 11, 2024 15:09
@inancgumus inancgumus requested a review from ankur22 September 11, 2024 15:09
@inancgumus inancgumus merged commit cc94235 into main Sep 11, 2024
23 checks passed
@inancgumus inancgumus deleted the refactor/screenshot-uploading branch September 11, 2024 15:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants