Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: persistent headers #215

Merged
merged 4 commits into from
May 29, 2023
Merged

Feature: persistent headers #215

merged 4 commits into from
May 29, 2023

Conversation

psrok1
Copy link
Member

@psrok1 psrok1 commented May 24, 2023

Reasons to implement that:

Few design details:

  • They follow the same semantics as persistent payloads, but both persistent and non-persistent headers are available from the same dict to keep it easier for users. Both internal and service code tends to directly modify self.headers collection so it was important also for compatibility.
  • Copy of headers_persistent goes to the serialized JSON as well. Values contained there always take precedence over headers, so it should be consistent.
  • For compatibility: we need to keep a copy in payload_persistent, because older consumer making a new Task(...) will pass headers without persistent ones so they will be lost. As we keep it in payload_persistent, they will be placed back in headers_persistent during deserialization made by karton.system

@psrok1 psrok1 requested a review from nazywam May 24, 2023 13:29
docs/task_headers_payloads.rst Outdated Show resolved Hide resolved
docs/task_headers_payloads.rst Outdated Show resolved Hide resolved
docs/task_headers_payloads.rst Outdated Show resolved Hide resolved
docs/task_headers_payloads.rst Outdated Show resolved Hide resolved
karton/core/task.py Outdated Show resolved Hide resolved
@psrok1 psrok1 force-pushed the feature/persistent-headers branch from f1b7ac7 to f9ad661 Compare May 29, 2023 13:01
psrok1 and others added 3 commits May 29, 2023 15:01
@psrok1 psrok1 merged commit 2c93c1b into master May 29, 2023
@psrok1 psrok1 deleted the feature/persistent-headers branch May 29, 2023 14:35
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