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

Make HTTPTransport compatible with multiple API versions #228

Merged
merged 1 commit into from
Nov 14, 2017

Conversation

p-lambert
Copy link
Member

No description provided.

@p-lambert p-lambert requested a review from ufoot October 20, 2017 18:41
ufoot
ufoot previously approved these changes Oct 20, 2017
Copy link
Contributor

@ufoot ufoot left a comment

Choose a reason for hiding this comment

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

GTM, left a comment about how to test if we're at the lowest protocol version available, other than that it's OK I think (this is clearly not tested in detail on CI as we do not yet support old or beta agent versions, @palazzem has queued work about this AFAIR). Side note: looks like on CI test failed...

@@ -119,6 +137,8 @@ def server_error?(code)
# endpoint. In both cases, we're going to downgrade the transporter encoder so that
# it will target a stable API.
def downgrade?(code)
return if @api.fetch(:compatibility_mode)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we test compatibility_mode here or the existence of a fallback? Both are equivalent with our data, so this is just a nitpick but I was worried because I could not see the check on the existence of an available fallback.

Copy link
Member Author

@p-lambert p-lambert Oct 20, 2017

Choose a reason for hiding this comment

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

humn, makes sense. I think I'll get rid of the compatibility_mode altogether and just check for the existence of a fallback!

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes the compatibility_mode was added to the Python client because at that time we had a different data model + JSON/Msgpack encoders. Now, nobody uses such old trace-agent. We can just use the fallback.

@p-lambert p-lambert force-pushed the pedro/multiple-api-versions branch from 6c51291 to f95170a Compare October 20, 2017 20:40
@palazzem palazzem added the core Involves Datadog core libraries label Oct 23, 2017
@palazzem palazzem added this to the 0.10.0 milestone Oct 23, 2017
Copy link
Contributor

@palazzem palazzem left a comment

Choose a reason for hiding this comment

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

good to me!

@palazzem palazzem merged commit a677a26 into master Nov 14, 2017
@palazzem palazzem deleted the pedro/multiple-api-versions branch November 14, 2017 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Involves Datadog core libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants