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

Add document for GraphQL API dnsRawEvents #984

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

danbi2990
Copy link
Contributor

Close: #964

@danbi2990 danbi2990 changed the title Add document for DnsRawEvent Add document for GraphQL API dnsRawEvents Jan 21, 2025
Copy link

codecov bot commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.48%. Comparing base (5b643fa) to head (49d7893).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #984   +/-   ##
=======================================
  Coverage   77.48%   77.48%           
=======================================
  Files          32       32           
  Lines       25799    25799           
=======================================
  Hits        19990    19990           
  Misses       5809     5809           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@danbi2990 danbi2990 force-pushed the jake/add-graphql-doc-DNS branch 2 times, most recently from 7a3e1b7 to 75d80b9 Compare January 21, 2025 08:30
@danbi2990 danbi2990 force-pushed the jake/add-graphql-doc-DNS branch 2 times, most recently from 5a3f446 to 9c6ad30 Compare January 22, 2025 06:01
@danbi2990 danbi2990 force-pushed the jake/add-graphql-doc-DNS branch from 9c6ad30 to 5c943f5 Compare January 22, 2025 08:00
proto: u8,
/// End time in nanoseconds. `time` + `rtt` (Default).
Copy link
Contributor

Choose a reason for hiding this comment

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

(Default) looks confusing because it implies there might be other cases. I assume this last_time is not parsed but calculated from time + rtt by the software, and (Default) doesn't seem to describe it accurately. I also think the content from time might not be necessary. @syncpark, could you confirm this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@syncpark
Could you please review this comment? It suggests the following change.

- End time in nanoseconds. `time` + `rtt` (Default).
+ End time in nanoseconds.

Copy link
Contributor

Choose a reason for hiding this comment

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

Comment on lines 214 to 219
/// Query type.
///
/// - 1: Internet class
/// - 2: CSNET class
/// - 3: CHAOS class
/// - 4: Hesiod class
Copy link
Contributor

Choose a reason for hiding this comment

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

These values belong to qclass, not qtype. In the document where attributes are described, content other than my suggested titles has not been verified. Therefore, we should not copy it unless it has been strictly verified.

Copy link
Contributor

Choose a reason for hiding this comment

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

@sophie-cluml,

For now, I think it would be better to include just the titles, not the additional content written in the document. If such additional content is included in another context, we should either remove it or strictly verify it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Applied the suggested adjustment.

Comment on lines 221 to 247
/// Response code. Range: 0-11, 16-23.
///
/// |RCODE|Name|Description|
/// |-|-|-|
/// |0|NoError|No Error|
/// |1|FormErr|Format Error|
/// |2|ServFail|Server Failure|
/// |3|NXDomain|Non-Existent Domain|
/// |4|NotImp|Not Implemented|
/// |5|Refused|Query Refused|
/// |6|YXDomain|Name Exists when it should not|
/// |7|YXRRSet|RR Set Exists when it should not|
/// |8|NXRRSet|RR Set that should exist does not|
/// |9|NotAuth|Server Not Authoritative for zone|
/// |9|NotAuth|Not Authorized|
/// |10|NotZone|Name not contained in zone|
/// |11|DSOTYPENI|DSO-TYPE Not Implemented|
/// |12-15|Unassigned||
/// |16|BADVERS|Bad OPT Version|
/// |16|BADSIG|TSIG Signature Failure|
/// |17|BADKEY|Key not recognized|
/// |18|BADTIME|Signature out of time window|
/// |19|BADMODE|Bad TKEY Mode|
/// |20|BADNAME|Duplicate key name|
/// |21|BADALG|Algorithm not supported|
/// |22|BADTRUNC|Bad Truncation|
/// |23|BADCOOKIE|Bad/missing Server Cookie|
Copy link
Contributor

@sehkone sehkone Jan 22, 2025

Choose a reason for hiding this comment

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

I think only Response code would be better. Could you remove the others?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Applied the suggested adjustment.

rcode: u16,
/// Authoritative answer flag.
///
/// Only from DNS response message.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this line is unnecessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Applied the suggested adjustment.

aa_flag: bool,
/// Truncated flag.
///
/// Truncated flag of DNS query and response message.
Copy link
Contributor

Choose a reason for hiding this comment

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

So does this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Applied the suggested adjustment.

tc_flag: bool,
/// Recursion desired flag.
///
/// Recursion desired flag of DNS query and response message.
Copy link
Contributor

Choose a reason for hiding this comment

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

The same

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Applied the suggested adjustment.

rd_flag: bool,
/// Recursion available flag.
///
/// Only from DNS response message.
Copy link
Contributor

Choose a reason for hiding this comment

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

This one as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Applied the suggested adjustment.

rtt: StringNumberI64,
/// Query class. Range: 1-4.
///
/// For more information, refer to [Domain Name System Parameters.](https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4)
Copy link
Contributor

Choose a reason for hiding this comment

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

If we include a reference in one context, we should do the same in every context. Therefore, I think it would be better to remove it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Applied the suggested adjustment.

@danbi2990 danbi2990 force-pushed the jake/add-graphql-doc-DNS branch 6 times, most recently from 5f74fba to 73d9034 Compare February 6, 2025 04:29
@danbi2990 danbi2990 force-pushed the jake/add-graphql-doc-DNS branch from 73d9034 to 96aea48 Compare February 11, 2025 04:28
respPort: Int!

# Protocol number. TCP is 6, UDP is 17.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can modify this part similarly to other events as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the code like the others.

@danbi2990 danbi2990 force-pushed the jake/add-graphql-doc-DNS branch from 96aea48 to a647475 Compare February 19, 2025 06:15
raFlag: Boolean!

# Time to live
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Time to live
# Time to Live

as it was updated in the Notion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Applied the suggested adjustment.

@danbi2990 danbi2990 force-pushed the jake/add-graphql-doc-DNS branch 2 times, most recently from b3422cb to 9a3433e Compare February 19, 2025 08:57
@danbi2990 danbi2990 force-pushed the jake/add-graphql-doc-DNS branch from 9a3433e to 49d7893 Compare February 20, 2025 05:39
@sophie-cluml
Copy link
Contributor

@sehkone I believe this PR is well aligned with our policy regarding the GraphQL API documentation, since we have already synced in other similar PRs. And I also believe the points that you have raised in previous comments are all resolved. So let me merge this PR. If you think we should not merge, I'd appreciate if you could let us know.

@sophie-cluml sophie-cluml merged commit 779fb61 into main Feb 21, 2025
10 checks passed
@sophie-cluml sophie-cluml deleted the jake/add-graphql-doc-DNS branch February 21, 2025 01:39
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.

Add Documentation Comments for GraphQL APIs - Dns Related GraphQL APIs
3 participants