-
Notifications
You must be signed in to change notification settings - Fork 5
Version stuff #558
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
Merged
Merged
Version stuff #558
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a41de25
add server version header to all responses
josephjclark 589306a
return version key on chat payloads
josephjclark ea9f2a8
add version to langfuse
josephjclark d3ac6f2
add has_code_attachment tag to langfuse
josephjclark a5ac341
changesets
josephjclark 4dae414
update template
josephjclark cc8fa4c
add an error to echo service for debugging
josephjclark 9646394
ensure services respond to HEAD requests
josephjclark File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| "apollo": patch | ||
| --- | ||
|
|
||
| Add version metadata to HTTP headers, chat payloads (meta key), and langfuse | ||
| traces |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "apollo": patch | ||
| --- | ||
|
|
||
| For langfuse traces with code, add a `has_code_attachment` tag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
onAfterHandleonly fires on the success path, so I'm not sure the header actually lands on all responses like the description says. Errors go throughonErrorwhich doesn't set it, so wouldn't 401s from the auth hook andApolloError/500s come back without the version? And for the streamed/services/*/streamresponses, aren't the headers already flushed by the time this runs?Not a blocker at all since the breaking-change guard rides on
meta.apollo_versionanyway. But should we set it somewhere that also covers the error/stream paths (mirror it inonError, or move it toonRequest/mapResponse)? And maybe add a test for an error response too, since the current one only checks the happy path?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch - thanks I'll take a close look at this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I've just added a 400 response from python and that includes the header
But in this case the typescript handler returns successfully. So if the handler threw an internal error for some reason we might not get the version number.
You make a good point about streaming though. I'm not actually sure where we'd return the version for a streaming API. I think I'll raise an issue for this.
One thing to note is that Lightning will make a HEAD call to the endpoint to get the version before it does anything. So the streaming thing is academic