-
Notifications
You must be signed in to change notification settings - Fork 13
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
Fixed sessionToken installer analytics. #2823
Conversation
mitchell-as
commented
Oct 16, 2023
•
edited by github-actions
bot
Loading
edited by github-actions
bot
DX-2228 Investigate missing session ID in state tool analytics |
441814d
to
bedb894
Compare
bedb894
to
e96ba60
Compare
Test failures are not due to this PR. They are due to existing, known issues and the usual timeouts. |
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.
Looks good to me, just a couple of nits.
cmd/state-installer/cmd.go
Outdated
} | ||
err := cfg.Set(anaConst.CfgSessionToken, sessionToken) | ||
if err != nil { | ||
logging.Error("Unable to set session token: " + errs.JoinMessage(err)) |
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.
We may want to report this to rollbar so we can more easily diagnose if the issue of a missing session token comes up again.
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.
Yes, that's a good idea.
suite.Require().NotEmpty(events) | ||
for _, event := range events { | ||
if event.Category == anaConst.CatInstallerFunnel && event.Dimensions != nil { | ||
suite.Assert().NotEmpty(*event.Dimensions.SessionToken) |
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.
nit: We could assert the equality of the token value, not just is presence, as the comment above suggests.
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've updated the comment. I am guilty of copy-pasting the code from another test :/ The important thing is that it's not empty because this value will ultimately depend on the session ID coming from the Platform.