Skip to content

feat: pass export service and jobid as HTTP headers in generic importer#1473

Merged
ameya9 merged 7 commits into
dtinit:masterfrom
alexeyqu:feat/pass-export-service-jobid-in-generic-importer
Sep 3, 2025
Merged

feat: pass export service and jobid as HTTP headers in generic importer#1473
ameya9 merged 7 commits into
dtinit:masterfrom
alexeyqu:feat/pass-export-service-jobid-in-generic-importer

Conversation

@alexeyqu
Copy link
Copy Markdown
Collaborator

@alexeyqu alexeyqu commented Sep 1, 2025

Add 2 HTTP headers to GenericImporter and GenericFileImporter:

  • X-DTP-Export-Service, passing the ExportService from the JobMetadata, i.e. the source of data;
  • X-DTP-Job-Id, passing the current job UUID as String.

This will help the receiving service in building the internal logic (i.e. if they want to know which service is sending the data).

TODO:

  • this PR: figure out tests (what is the currently recommended workflow with testing?)
  • next PR: add an optional recurringJobId field to PortabilityJob (populated from *JobStore) and JobMetadata -- to be sent for recurring transfers only via X-DTP-Recurring-Job-Id

@alexeyqu alexeyqu marked this pull request as draft September 1, 2025 11:06
@alexeyqu alexeyqu marked this pull request as ready for review September 2, 2025 14:57
@alexeyqu alexeyqu changed the title feat: pass export service jobid in generic importer feat: pass export service and jobid as HTTP headers in generic importer Sep 2, 2025
@alexeyqu alexeyqu requested a review from lisad September 2, 2025 15:00
@alexeyqu alexeyqu marked this pull request as draft September 2, 2025 18:47
@alexeyqu alexeyqu marked this pull request as ready for review September 3, 2025 01:10
@ameya9 ameya9 merged commit 7ed8262 into dtinit:master Sep 3, 2025
7 checks passed
@alexeyqu alexeyqu deleted the feat/pass-export-service-jobid-in-generic-importer branch September 3, 2025 14:58
alexeyqu added a commit that referenced this pull request Sep 5, 2025
…#1475)

Add the `recurringJobId` field to `JobMetadata` and `PortabilityJob`
classes.
When present, it means the current job is part of a recurring transfer
series, all sharing the same id.

When present, pass it in `X-DTP-Recurring-Job-Id` HTTP header from
`Generic*Importer` classes -- similarly to `X-DTP-Job-Id` header
introduced in #1473.
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.

3 participants