-
Notifications
You must be signed in to change notification settings - Fork 4
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
Conversation
DnsRawEvent
dnsRawEvents
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
7a3e1b7
to
75d80b9
Compare
5a3f446
to
9c6ad30
Compare
9c6ad30
to
5c943f5
Compare
src/graphql/network.rs
Outdated
proto: u8, | ||
/// End time in nanoseconds. `time` + `rtt` (Default). |
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.
(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?
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.
@syncpark
Could you please review this comment? It suggests the following change.
- End time in nanoseconds. `time` + `rtt` (Default).
+ End time in nanoseconds.
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.
@danbi2990 Let's just make this part the same as we did in other events, such as https://github.com/aicers/giganto/pull/1021/files#diff-353689134b6a76113df88a614d4b93d4a96a3bcacf8bc163837255dbec1c2286R720-R722
src/graphql/network.rs
Outdated
/// Query type. | ||
/// | ||
/// - 1: Internet class | ||
/// - 2: CSNET class | ||
/// - 3: CHAOS class | ||
/// - 4: Hesiod class |
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.
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.
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.
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.
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.
Applied the suggested adjustment.
src/graphql/network.rs
Outdated
/// 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| |
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 only Response code
would be better. Could you remove the others?
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.
Applied the suggested adjustment.
src/graphql/network.rs
Outdated
rcode: u16, | ||
/// Authoritative answer flag. | ||
/// | ||
/// Only from DNS response message. |
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 this line is unnecessary.
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.
Applied the suggested adjustment.
src/graphql/network.rs
Outdated
aa_flag: bool, | ||
/// Truncated flag. | ||
/// | ||
/// Truncated flag of DNS query and response message. |
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 does 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.
Applied the suggested adjustment.
src/graphql/network.rs
Outdated
tc_flag: bool, | ||
/// Recursion desired flag. | ||
/// | ||
/// Recursion desired flag of DNS query and response message. |
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.
The same
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.
Applied the suggested adjustment.
src/graphql/network.rs
Outdated
rd_flag: bool, | ||
/// Recursion available flag. | ||
/// | ||
/// Only from DNS response message. |
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.
This one as well.
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.
Applied the suggested adjustment.
src/graphql/network.rs
Outdated
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) |
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.
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.
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.
Applied the suggested adjustment.
5f74fba
to
73d9034
Compare
73d9034
to
96aea48
Compare
respPort: Int! | ||
|
||
# Protocol number. TCP is 6, UDP is 17. |
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 we can modify this part similarly to other events as well.
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.
Updated the code like the others.
96aea48
to
a647475
Compare
raFlag: Boolean! | ||
|
||
# Time to live |
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.
# Time to live | |
# Time to Live |
as it was updated in the Notion.
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.
Applied the suggested adjustment.
b3422cb
to
9a3433e
Compare
9a3433e
to
49d7893
Compare
@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. |
Close: #964