Skip to content

Deserialize JSON in multipart#3854

Merged
cbeauchesne merged 1 commit intomainfrom
cbeauchesne/deserialize-json-multipart
Jan 20, 2025
Merged

Deserialize JSON in multipart#3854
cbeauchesne merged 1 commit intomainfrom
cbeauchesne/deserialize-json-multipart

Conversation

@cbeauchesne
Copy link
Copy Markdown
Collaborator

@cbeauchesne cbeauchesne commented Jan 20, 2025

Motivation

When the content of a payload is a multipart, each part is exported to a separated file. Though, this file may be a json file. In that situation, having the content directly inside the data will allow to :

  • make schema validations
  • directly make assertion on the content, without the need to read and load another file

Changes

Before :

      {
        "headers": {
          "Content-Type": "application/gzip",
          "Content-Disposition": "form-data; name=\"file\"; filename=\"symbols_34.json.gz\""
        },
        "system-tests-information": "File exported to a separated file",
        "system-tests-file-path": "logs_debugger_symdb/interfaces/library/files/aa69f5aba727cfc64324b3956098f242_symbols_34.json"
}

After :

      {
        "headers": {
          "Content-Type": "application/gzip",
          "Content-Disposition": "form-data; name=\"file\"; filename=\"symbols_34.json.gz\""
        },
        "system-tests-filename": "symbols_34.json.gz",
        "content": {
          "schema_version": 1,
          "service": "weblog",
          ...
        }
    }

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes (if something not related to your task is failing, you can ignore it)
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner. We're working on refining the codeowners file quickly.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • If PR title starts with [<language>], double-check that only <language> is impacted by the change
  • No system-tests internal is modified. Otherwise, I have the approval from R&P team
  • CI is green, or failing jobs are not related to this change (and you are 100% sure about this statement)
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added (or removed)?

@cbeauchesne cbeauchesne mentioned this pull request Jan 20, 2025
7 tasks
@cbeauchesne
Copy link
Copy Markdown
Collaborator Author

Note : needed for #3761

@cbeauchesne cbeauchesne force-pushed the cbeauchesne/deserialize-json-multipart branch from a536775 to 938f22f Compare January 20, 2025 11:01
@cbeauchesne cbeauchesne marked this pull request as ready for review January 20, 2025 12:36
@cbeauchesne cbeauchesne requested a review from a team as a code owner January 20, 2025 12:36
@cbeauchesne cbeauchesne merged commit 2067ebf into main Jan 20, 2025
@cbeauchesne cbeauchesne deleted the cbeauchesne/deserialize-json-multipart branch January 20, 2025 12:36
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.

1 participant