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

feat: new headers and payload ( connection id and interval) #346

Merged
merged 24 commits into from
Mar 5, 2025

Conversation

sjaanus
Copy link
Contributor

@sjaanus sjaanus commented Feb 27, 2025

Request updates

  • Fetch flag calls include the unleash-interval header.
  • Registration calls now have connectionId added to the payload (previously, it only had the unleash-connection-id header).

Metrics updates

  • Send metrics calls include the unleash-interval header.
  • Send metrics now have connectionId added to the payload (previously, it only had the unleash-connection-id header).



@responses.activate
def test_identification_values_are_passed_in():
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is testing all 3 requests, headers and body

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -110,6 +110,7 @@ def __init__(
self.unleash_app_name = app_name
self.unleash_environment = environment
self.unleash_instance_id = instance_id
self.connection_id = str(uuid.uuid4())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we had connection id before. is this code moved?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it was initialized only in headers before, now we can use it also in body if needed.

https://github.com/Unleash/unleash-client-python/pull/346/files#diff-d8684313c6cfe7bbd96df3385f5b28c7f337cd5159fc08f79b518df75cc13475L218

@coveralls
Copy link

coveralls commented Mar 4, 2025

Coverage Status

coverage: 95.455% (+0.1%) from 95.327%
when pulling c1eb4b4 on new-headers
into 9fb8d44 on main.

@sjaanus sjaanus enabled auto-merge (squash) March 5, 2025 07:05
@sjaanus sjaanus merged commit b2e7a98 into main Mar 5, 2025
42 of 43 checks passed
@sjaanus sjaanus deleted the new-headers branch March 5, 2025 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants