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

Update protobuf #7411

Merged
merged 4 commits into from
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/violet-olives-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@apollo/usage-reporting-protobuf': minor
---

Update protobuf which includes updates for supporting (notably) ConditionNode in the gateway
1 change: 1 addition & 0 deletions cspell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ dictionaries:
useGitignore: true
ignorePaths:
- '**/generated/**'
- 'packages/usage-reporting-protobuf/src/reports.proto'
Copy link
Member

Choose a reason for hiding this comment

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

I guess flipside here is, if there are typos in this file then we should fix them at the source? (Perhaps with a temporary addition to local dictionary?)

Copy link
Member Author

Choose a reason for hiding this comment

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

Eh, the word is nestedness which seems reasonable / not something I'd fix over there. I do think this falls into the "generated" category and shouldn't be spell checked here going forward, but not opposed to just adding to dictionary too.

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe we do want to permit nestedness and catch future spelling problems here 🤷

- '**/*.sketch'
- '**/*.svg'
- cspell.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,6 @@ describe('sendHeaders makeHTTPRequestHeaders helper', () => {
function makeTestHTTP(): Trace.HTTP {
return new Trace.HTTP({
method: Trace.HTTP.Method.UNKNOWN,
host: null,
path: null,
});
}

Expand Down
9 changes: 0 additions & 9 deletions packages/server/src/plugin/usageReporting/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -425,15 +425,6 @@ export function ApolloServerPluginUsageReporting<TContext extends BaseContext>(
Trace.HTTP.Method[
http.method as keyof typeof Trace.HTTP.Method
] || Trace.HTTP.Method.UNKNOWN,
// Host and path are not used anywhere on the backend, so let's not bother
// trying to parse request.url to get them, which is a potential
// source of bugs because integrations have different behavior here.
// On Node's HTTP module, request.url only includes the path
// (see https://nodejs.org/api/http.html#http_message_url)
// The same is true on Lambda (where we pass event.path)
// But on environments like Cloudflare we do get a complete URL.
host: null,
path: null,
});

if (options.sendHeaders) {
Expand Down
2 changes: 2 additions & 0 deletions packages/server/src/plugin/usageReporting/stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export class SizeEstimator {
bytes = 0;
}
export class OurReport implements Required<IReport> {
tracesPreAggregated = false;
trevor-scheer marked this conversation as resolved.
Show resolved Hide resolved

constructor(readonly header: ReportHeader) {}
readonly tracesPerQuery: Record<string, OurTracesAndStats> =
Object.create(null);
Expand Down
1,525 changes: 1,294 additions & 231 deletions packages/usage-reporting-protobuf/generated/protobuf.cjs

Large diffs are not rendered by default.

Loading