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
AFE: move submit logging to server #35723
Conversation
@@ -43,13 +58,13 @@ export default class AmazonFutureEngineerAccountConfirmation extends React.Compo | |||
if you already have one. | |||
</div> | |||
<div style={styles.body}> | |||
Already have a Code.org account? <a href={SIGN_IN_URL}>Sign in.</a> | |||
Already have a Code.org account?{' '} | |||
<a onClick={this.signInButtonPress}>Sign in.</a> |
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.
Removing the href may have changed the style of this link. I think, in this case, you could avoid that with href="#"
or something - I don't feel bad about changing the hash since we're about to navigate.
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.
Nice, good to know will update! Main difference I see is that when you hover it gives you the clicky finger with an href, and the text cursor without 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.
fwiw, you can use cursor: pointer
to show the clicky finger again.
formData: submission_body | ||
}.to_json | ||
} | ||
) |
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.
Right now we're tracking this event if we successfully submit to AFE or if submitting to AFE is disabled for that environment. (But not if we skip submission or submission fails for some other reason.) That seems okay - is it the desired behavior?
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.
Yeah it was sort of for testing purposes, so I could see what would be sent to Firehose in development (since it sends Firehose requests to your logfile). Seems maybe useful in the future as well, to have the entire payload returned to the controller in development (instead of just immediately returning)?
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.
Please add unit tests that check whether we call firehose in the expected circumstances on the server.
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.
👍
Testing Story
Tested manually. I did have some issues where my
amazon_future_engineer_submit
request would hang (and, as a result, the "Please wait..." message would show forever and the network request continued indefinitely), but I think that was a result of syntax errors I had in the controller logging action. Did not see that issue in several runs through the flow subsequently. But, keep an eye out when reviewing for anything that looks suspect.Reviewer Checklist: