-
Notifications
You must be signed in to change notification settings - Fork 20
FFS-4592: Fix NSC test scenarios in launcher #2012
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,17 @@ | ||
| class ApplicationJob < ActiveJob::Base | ||
| class SilencedError < StandardError; end | ||
|
|
||
| NON_RETRYABLE_ERRORS = [ | ||
| NameError, | ||
| TypeError, | ||
| ArgumentError, | ||
| ActiveRecord::RecordInvalid | ||
| ].freeze | ||
|
|
||
| around_perform :with_error_reporting | ||
|
|
||
| retry_on Exception, wait: :polynomially_longer, attempts: 5 | ||
| retry_on(*NON_RETRYABLE_ERRORS, attempts: 1) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps we should just |
||
|
|
||
| class_attribute :max_attempts, default: 5 | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,19 +66,23 @@ def update_education_activity(education_activity, response_data) | |
| def save_enrollment_terms(enrollment_details) | ||
| activity_flow = @education_activity.activity_flow | ||
|
|
||
| identity = activity_flow.identity | ||
|
|
||
| enrollment_details.each do |enrollment_detail| | ||
| next unless enrollment_detail["currentEnrollmentStatus"] == CURRENTLY_ENROLLED | ||
|
|
||
| name_on_school_record = enrollment_detail["nameOnSchoolRecord"] || {} | ||
|
|
||
| enrollment_detail["enrollmentData"].each do |enrollment_data| | ||
| term_begin = Date.parse(enrollment_data["termBeginDate"]) | ||
| term_end = Date.parse(enrollment_data["termEndDate"]) | ||
| next unless activity_flow.within_reporting_window?(term_begin, term_end) | ||
|
|
||
| @education_activity.nsc_enrollment_terms.create!( | ||
| school_name: enrollment_detail["officialSchoolName"], | ||
| first_name: enrollment_detail["nameOnSchoolRecord"]["firstName"], | ||
| middle_name: enrollment_detail["nameOnSchoolRecord"]["middleName"], | ||
| last_name: enrollment_detail["nameOnSchoolRecord"]["lastName"], | ||
| first_name: name_on_school_record["firstName"] || identity&.first_name, | ||
| middle_name: name_on_school_record["middleName"], | ||
| last_name: name_on_school_record["lastName"] || identity&.last_name, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm. I'm not sure we should fall back to saving the identity data again in the Can we just leave these fields blank if NSC returns nothing, and then handle it in whatever is reading the NSC enrollment term? Also, did you say NSC no longer returns this field, or only sometimes? Or do we think it will be returned in production but not in sandbox? |
||
| enrollment_status: enrollment_status(enrollment_data), | ||
| term_begin: term_begin, | ||
| term_end: term_end, | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. test-classifier: AI triage of failing tests AI Test Classifier — no action required
Ran the repo's own CI test path (rspec.yml + setup-project action): started Postgres 16, installed gems with bundler, loaded the test schema, ran npm install and rake assets:precompile, then executed rspec. The precomputed AI_REVIEW_DIFF_RANGE (origin/main HEAD) was verified to genuinely reflect PR #2012's change, so no base re-resolution was needed. Targeted run of the 10 changed spec files: 368 examples, 0 failures. Full CI-scope run (spec/ excluding e2e, as rspec.yml does): 2564 examples, 0 failures. An earlier run showed 101 view-rendering controller failures, but all were 'The asset @uswds/uswds/dist/img/sprite.svg is not present in the asset pipeline' caused by my not yet having run the CI bootstrap's npm install + assets:precompile; after completing that bootstrap every one of them passed, so they are a bootstrap artifact and not classified as failures. Nothing to triage. React 👍 if this is right (nothing needed triage) / 👎 if a real failure was missed, and on a 👎 please reply with a one-line reason. Advisory, non-blocking. |
Uh oh!
There was an error while loading. Please reload this page.