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

Fixed sessionToken installer analytics. #2823

Merged
merged 2 commits into from
Oct 17, 2023

Conversation

mitchell-as
Copy link
Contributor

@mitchell-as mitchell-as commented Oct 16, 2023

BugDX-2228 Investigate missing session ID in state tool analytics

@mitchell-as mitchell-as force-pushed the mitchell/dx-2228 branch 2 times, most recently from 441814d to bedb894 Compare October 17, 2023 15:00
@mitchell-as
Copy link
Contributor Author

Test failures are not due to this PR. They are due to existing, known issues and the usual timeouts.

@mitchell-as mitchell-as requested a review from MDrakos October 17, 2023 16:14
@mitchell-as mitchell-as marked this pull request as ready for review October 17, 2023 16:14
MDrakos
MDrakos previously approved these changes Oct 17, 2023
Copy link
Member

@MDrakos MDrakos left a 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.

}
err := cfg.Set(anaConst.CfgSessionToken, sessionToken)
if err != nil {
logging.Error("Unable to set session token: " + errs.JoinMessage(err))
Copy link
Member

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.

Copy link
Contributor Author

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)
Copy link
Member

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.

Copy link
Contributor Author

@mitchell-as mitchell-as Oct 17, 2023

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.

@mitchell-as mitchell-as reopened this Oct 17, 2023
@mitchell-as mitchell-as merged commit 96be607 into version/0-42-0-RC1 Oct 17, 2023
9 of 12 checks passed
@mitchell-as mitchell-as deleted the mitchell/dx-2228 branch October 17, 2023 20:25
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.

2 participants