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

Remove question from Amazon Future Engineers form #50224

Merged
merged 2 commits into from Mar 10, 2023

Conversation

megcrenshaw
Copy link
Contributor

@megcrenshaw megcrenshaw commented Feb 12, 2023

Removes the AWS Educate checkbox on the Amazon Future Engineers form. In development:
image

In prod, it's the last checkbox before the required privacy policy checkbox:
image

Links

Testing story

Tested this manually:

  • Seeded schools:
    • bundle exec rake seed:schools
  • Added school info to my account:
    • UserSchoolInfo.create!(user_id: user.id, school_info_id: SchoolInfo.last.id, start_date: Time.now, last_confirmation_date: Time.now)
  • Changed prop schoolEligible to hardcode to true in amazon_future_engineer_eligibility.js
  • Navigated to http://localhost.code.org:3000/afe, filled out form, submitted successfully:

image

Deployment strategy

Follow-up work

Privacy

Security

Caching

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@megcrenshaw megcrenshaw marked this pull request as ready for review February 22, 2023 20:32
@megcrenshaw megcrenshaw changed the title Remove question from afe Remove question from Amazon Future Engineers form Feb 22, 2023
@megcrenshaw megcrenshaw requested a review from a team February 22, 2023 20:33
@@ -47,7 +45,6 @@ def self.submit(first_name:, last_name:, email:, nces_id:, street_1:, street_2:,
'school-zip' => zip,
'inspirational-marketing-kit' => booleanize(marketing_kit),
'csta-plus' => booleanize(csta_plus),
'aws-educate' => booleanize(aws_educate),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks like this data gets posted to pardot.com. are you able to verify that pardot can handle this field being removed? it might be necessary to sign in to pardot and see what we have configured there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see. Yes, I wasn't able to get to the "Congratulations" that I screenshotted when I tried to "break" the form, but I agree that I didn't actually check what gets sent to Pardot. I'll look into this –– thanks!

@davidsbailey
Copy link
Member

I'm a bit skeptical of this verification step because we bail here if CDO.afe_pardot_form_handler_url is not defined:

return submission_body unless CDO.afe_pardot_form_handler_url

CDO.afe_pardot_form_handler_url is defined in prod, but not anywhere else:

so, I'm afraid this suggests we haven't really verified what will happen when this reaches prod (where the data will get sent to pardot).

@megcrenshaw
Copy link
Contributor Author

megcrenshaw commented Mar 9, 2023

Since AFE has their own Pardot URL that we use in our form submission, I did the following to validate this –– a bit janky, but I'm feeling confident that it worked

  1. Retrieved the AWS Secret and hard-coded it in my config.yml.erb file:
afe_pardot_form_handler_url: https://go.pardot.com/l/**/*
  1. In afe_enrollment.rb we return submission body if we do and do not have the URL
    return submission_body unless CDO.afe_pardot_form_handler_url
    raise Error.new('AFE submission skipped: Terms and conditions were not accepted') unless amazon_terms
    response = Net::HTTP.post_form(
    URI(CDO.afe_pardot_form_handler_url),
    submission_body
    )
    raise Error.new("AFE submission failed with HTTP #{response.code}") unless response.code == '200'
    raise Error.new("AFE submission failed with a validation error") if /Cannot find error page/.match?(response.body)
    submission_body
    So, I added some puts to see what response we got. After submitting the form, I get a 200 response code, and the response body does not contain Cannot find error page. Plus, I got emails from AFE (I put in my actual code.org email to check) verifying I'm now an "Amazon Future Engineer."

image

@davidsbailey
Copy link
Member

nice job verifying! receiving the email from AFE seems to seal the deal.

Friendly reminder to please remove afe_pardot_form_handler_url from your locals before you forget :-)

@megcrenshaw megcrenshaw merged commit 5675ddc into staging Mar 10, 2023
@megcrenshaw megcrenshaw deleted the remove-question-from-afe branch March 10, 2023 18:52
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.

None yet

2 participants