Skip to content

[SRE-26521] Add upload/download routes to script and datafile services#235

Merged
Zakaria-Kofiro merged 1 commit intomasterfrom
zkofiro/upload-download-v2
Mar 24, 2023
Merged

[SRE-26521] Add upload/download routes to script and datafile services#235
Zakaria-Kofiro merged 1 commit intomasterfrom
zkofiro/upload-download-v2

Conversation

@Zakaria-Kofiro
Copy link
Collaborator

@Zakaria-Kofiro Zakaria-Kofiro commented Mar 20, 2023

Add upload/download routes to script and datafile services

This change adds the following routes for uploading and downloading scripts and datafiles:

  • Scripts:

    • GET /v2/scripts/download/{scriptId} -> Downloads the Tank XML file for a script

    • GET /v2/scripts/harness/download/{scriptId} -> Downloads the Tank Harness file for a script

    • GET /v2/scripts/external/download/{externalScriptId} -> Downloads the Tank XML file for an external script

    • POST /v2/scripts/upload -> Uploads a script XML file output generated by the Tank Proxy Package

    • Optional query parameters for upload:
      • Existing Script ID: Overwrites existing script with an uploaded script file and creates a new script if existing script cannot be found
      • Script Name: Sets or overwrites the script name

  • Datafiles:

    • GET /v2/datafiles/download/{datafileId} -> Downloads a datafile

    • POST /v2/scripts/upload -> Uploads a datafile to Tank

    • Optional query parameters for upload:
      • Existing Datafile ID: Similar to scripts, overrides existing datafile with uploaded content if found, creates new if not

Please make sure these check boxes are checked before submitting

  • ** Squashed Commits **
  • ** All Tests Passed ** - mvn clean test -P default

** PR review process **

  • Requires one +1 from a reviewer
  • Repository owners will merge your PR once it is approved.

@Zakaria-Kofiro Zakaria-Kofiro marked this pull request as ready for review March 20, 2023 23:07
@shawn-h-park shawn-h-park self-requested a review March 23, 2023 23:55
@shawn-h-park shawn-h-park self-requested a review March 24, 2023 17:58
@shawn-h-park shawn-h-park self-requested a review March 24, 2023 22:51
fix: supports both normal and gzip file uploads

fix: updating get specific script to script JSON description, download handles content

fix: updated max file size and added exception handling for file exceptions

fix: set debug to false

fix: group all exception handlers

fix: updating prefix

fix: unneeded file

fix: reverting file change

Revert "fix: reverting file change"

This reverts commit 0ba90f6.

fix: revert file

fix: reverting file as well

fix: detailed error msg for incorrect request
@Zakaria-Kofiro Zakaria-Kofiro force-pushed the zkofiro/upload-download-v2 branch from 3601489 to 99d2e8c Compare March 24, 2023 23:27
@Zakaria-Kofiro Zakaria-Kofiro merged commit ea6683c into master Mar 24, 2023
@Zakaria-Kofiro Zakaria-Kofiro deleted the zkofiro/upload-download-v2 branch March 24, 2023 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants