main ← issue/missing-problem-check-target
merged 09:52PM - 15 Jul 26 UTC
ProblemCheck#run was calling translation_data with no args while
persisting tra…cker/admin notice details. For targeted checks like
`group_email_credentials` and `upcoming_change_stable_opted_out`,
`translation_data` requires the target, so scheduled runs crashed after
call returned a problem. This was causing an error like this in
production:
```
A scheduled admin dashboard problem check (group_email_credentials) errored. : ArgumentError : wrong number of arguments (given 0, expected 1)
/var/www/discourse/app/services/problem_check/group_email_credentials.rb:35:in 'translation_data'
/var/www/discourse/app/models/problem_check.rb:203:in 'ProblemCheck#run'
/var/www/discourse/app/jobs/regular/run_problem_check.rb:23:in 'Jobs::RunProblemCheck#execute'
/var/www/discourse/app/jobs/base.rb:313:in 'block (2 levels) in Jobs::Base#perform'
```
The intended flow after the fix now:
* targets provides the scheduler/tracker key.
* problem(target) is where target-specific translation data is computed.
* Problem#details carries that computed translation data plus override_data.
* run persists problem.details instead of recalculating translation_data.
c.f. https://meta.discourse.org/t/argumenterror-wrong-number-of-arguments-given-0-expected-1-in-upcoming-change-stable-opted-out-problem-check-flooding-logs/407351