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

Log SignUpServiceUpdaterJob sidekiq package args #16724

Merged
merged 1 commit into from
May 14, 2024
Merged

Conversation

rileyanderson
Copy link
Contributor

@rileyanderson rileyanderson commented May 13, 2024

Summary

  • Clean up logging when job fails.
    • log attributes from sidekiq attr_package since it expires
    • move exception message to log payload
    • log package key for tracking purposes
    • remove job retry limit
    • bump attr_package expiration to match total possible job retry time (~21 days)

Related issue(s)

Testing

  • Test the retries_exhausted block functionality:
  • In rails console -rails c
# 1. Create attr package

require 'sidekiq/attr_package'

attr_package_key = Sidekiq::AttrPackage.create( icn: 'some-icn', signature_name: 'some-name', version: 'some-version' )

# 2. create sidekiq job and exception

job = { args: [attr_package_key] }.as_json
exception = StandardError.new('some-error')

# 3. call retries_exhausted block

TermsOfUse::SignUpServiceUpdaterJob.sidekiq_retries_exhausted_block.call(job, exception)

You should see a log like:

Rails -- [TermsOfUse][SignUpServiceUpdaterJob] retries exhausted -- { :icn => "some-icn", :exception_message => "some-error", :attr_package_key => "0c115b48be89fb8c5fc82c6ef4e10254e67274cab850b5a03ab6ec048e926b12" }

What areas of the site does it impact?

Terms of use

Acceptance criteria

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No error nor warning in the console.
  • Events are being sent to the appropriate logging solution
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Feature/bug has a monitor built into Datadog or Grafana (if applicable)
  • If app impacted requires authentication, did you login to a local build and verify all authenticated routes work as expected

@rileyanderson rileyanderson force-pushed the sus-update-logs branch 2 times, most recently from 26e9c91 to ac9a6a2 Compare May 13, 2024 19:20
@rileyanderson rileyanderson marked this pull request as ready for review May 13, 2024 19:23
@rileyanderson rileyanderson requested a review from a team as a code owner May 13, 2024 19:23
@va-vfs-bot va-vfs-bot temporarily deployed to sus-update-logs/main/main May 13, 2024 20:18 Inactive
@rileyanderson rileyanderson force-pushed the sus-update-logs branch 4 times, most recently from 198921c to 33d024f Compare May 13, 2024 21:57
@rileyanderson rileyanderson merged commit ef7f2f9 into master May 14, 2024
19 checks passed
@rileyanderson rileyanderson deleted the sus-update-logs branch May 14, 2024 14:21
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

3 participants