Skip to content

Reports: remove partner_strings configuration parameter#12971

Merged
colton-lapp merged 12 commits intomainfrom
improve-sp-cred-config
Apr 20, 2026
Merged

Reports: remove partner_strings configuration parameter#12971
colton-lapp merged 12 commits intomainfrom
improve-sp-cred-config

Conversation

@astrogeco
Copy link
Copy Markdown
Contributor

@astrogeco astrogeco commented Mar 17, 2026

The sp_cred_metrics_report.rb previously utilized a config parameter partner_strings for logging and emailing purposes (purely cosmetic). This PR replaces all cosmetic uses of the partner_strings with the agency_abbreviation config parameter instead. This simplifies the credential metrics report and makes it more in line with other sp_* reports.

🎫 Ticket

Link to the relevant ticket:
https://gitlab.login.gov/lg-teams/Team-Data/reporting/-/issues/533

🛠 Summary of changes

  • Removed the use of partner_strings in sp_cred_metrics_report.rb
  • Updated the corresponding specs (sp_cred_metrics_report_spec.rb, sp_cred_metrics_report_orchestrator_spec.rb)
  • Updated spec/mailers/previews/report_mailer_preview.rb as well to use new config for cred_metrics preview
  • Updated the sp_config google doc

@astrogeco astrogeco force-pushed the improve-sp-cred-config branch from 67acf8e to b8e573a Compare March 23, 2026 19:33
Comment thread app/jobs/reports/sp_cred_metrics_report.rb Outdated
if to_emails.empty? && bcc_emails.empty?
Rails.logger.warn "No email addresses received - #{@partner_strings.first} Credential Report NOT SENT"
Rails.logger.warn "No email addresses received - #{partner_strings.first} Credential Report NOT SENT"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

use @agency_abbreviation here and in other places where we used to have partner_strings

@colton-lapp colton-lapp marked this pull request as ready for review March 26, 2026 16:30
@astrogeco
Copy link
Copy Markdown
Contributor Author

astrogeco commented Mar 30, 2026

@colton-lapp can you update the description of the PR and fill out the missing fields (they'll be visible once you click "edit")?

@astrogeco
Copy link
Copy Markdown
Contributor Author

Also add the gitlab ticket URL to one of the commits

@colton-lapp colton-lapp changed the title Remove partner_strings configuration parameter Reports: remove partner_strings configuration parameter Mar 30, 2026
@colton-lapp colton-lapp force-pushed the improve-sp-cred-config branch from 1e81ac9 to cfbb238 Compare April 6, 2026 18:35
Comment thread spec/jobs/reports/sp_cred_metrics_report_spec.rb

@report_name = "#{@partner_strings.first.downcase}_monthly_cred_metrics"
@agency_abbreviation = report_config['agency_abbreviation']
@report_name = "#{@agency_abbreviation.downcase}_monthly_cred_metrics"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks like @agency_abbreviation is expecting a list, should it be @agency_abbreviation.first.downcase

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actually, I'm not sure what's expected here. In spec/jobs/reports/sp_cred_metrics_report_orchestrator_spec.rb it's a list but in spec/mailers/previews/report_mailer_preview.rb it's a string value

Copy link
Copy Markdown
Contributor Author

@astrogeco astrogeco Apr 16, 2026

Choose a reason for hiding this comment

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

the orchestrator processes a nested JSON with multiple configs, each of those configs should have a single agency_abbreviation string, then the orchestrator spins up a single job per config

Copy link
Copy Markdown
Contributor

@MrNagoo MrNagoo left a comment

Choose a reason for hiding this comment

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

LGTM aside from typical style comments

config = {
'issuers' => ['Issuer_2', 'Issuer_3', 'Issuer_4'],
'partner_strings' => ['Partner_1'],
# 'partner_strings' => ['Partner_1'],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

remove commented code

@colton-lapp colton-lapp merged commit 345ab01 into main Apr 20, 2026
1 check passed
@colton-lapp colton-lapp deleted the improve-sp-cred-config branch April 20, 2026 17:20
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.

4 participants