-
Notifications
You must be signed in to change notification settings - Fork 63
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
[FAI-13519] - GitHub Copilot usage recordedAt timestamp #1753
Conversation
@@ -34,6 +34,7 @@ Array [ | |||
}, | |||
Object { | |||
"vcs_UserToolUsage": Object { | |||
"recordedAt": "2024-06-20T09:54:42.836Z", |
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 updated this manually to match the value in the streams file; is there a better way?
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.
Make sure to build before running converter tests:
npm run build
Run faros_github converter tests and pass the flag to update the snapshot:
npm run test faros_github -- -u
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.
confirmed that npm run test faros_github -- -u
yields the same snapshot file as what's here
@@ -80,6 +80,7 @@ export class FarosCopilotSeats extends GitHubConverter { | |||
record: { | |||
userTool, | |||
usedAt: Utils.toDate(activeSeat.last_activity_at), | |||
recordedAt: Utils.toDate(record.record.emitted_at), |
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.
Is it safe to use the emitted_at
field from the stream here?
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.
You can safely assume that field is present (it's written by the CDK)
It represents the point in time at which the record was emitted by the source
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.
That's exactly what I want to capture here. But maybe I should have asked: Is it safe to use a system field like this or would it be better to write a value from the source as part of the record data
and pick that up in the destination?
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 wouldn't bother if it's effectively $now
Quality Gate passedIssues Measures |
Description
Populates the
recordedAt
field onvcs_UserToolUsage
from theemitted_at
timestamp on the source.Type of change