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

#3171: Errors on Domain Request Auditlogs - [MS] #3305

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Matt-Spence
Copy link
Contributor

@Matt-Spence Matt-Spence commented Jan 6, 2025

Ticket

Resolves #3171

Changes

  • Small fix on the filter for auditlogs in the domain request admin page

Context for reviewers

Error logs have been showing up on stable that we couldn't explain. Turns out they were caused by an insufficiently specific database query that was pulling in some auditlogs for unrelated objects that happened to have the same object id. The hard part for this PR is just testing, see below for details.

Setup

Code Review Verification Steps

This issue is caused by auditlogs existing for a domainrequest object and a domaininvitation object that have the same object_id. I have manually created such a situation for stay-year-relate.gov on MS. To test this, you must navigate to that domain in the domain request admin panel, and then observe logs (for example by searching on logs.fr.cloud.gov using the filter @cf.app: getgov-ms AND @source.type: APP over the last X minutes. Initially you should see no errors like "An error occurred during change_view: 'invited' is not a valid DomainRequest.DomainRequestStatus". Note that it can take a few minutes for logs to populate, so maybe get coffee or something first. The error should not be there because the fix is deployed. If you want to be thorough, deploy main to MS and repeat this behavior to prove that the log appears without the fix.

As the original developer, I have

Satisfied acceptance criteria and met development standards

  • Met the acceptance criteria, or will meet them in a subsequent PR
  • Created/modified automated tests
  • Update documentation in READMEs and/or onboarding guide

Ensured code standards are met (Original Developer)

  • If any updated dependencies on Pipfile, also update dependencies in requirements.txt.
  • Interactions with external systems are wrapped in try/except
  • Error handling exists for unusual or missing values

Validated user-facing changes (if applicable)

  • Tag @dotgov-designers in this PR's Reviewers for design review. If code is not user-facing, delete design reviewer checklist
  • Verify new pages have been added to .pa11yci file so that they will be tested with our automated accessibility testing
  • Checked keyboard navigability
  • Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)

As a code reviewer, I have

Reviewed, tested, and left feedback about the changes

  • Pulled this branch locally and tested it
  • Verified code meets all checks above. Address any checks that are not satisfied
  • Reviewed this code and left comments. Indicate if comments must be addressed before code is merged
  • Checked that all code is adequately covered by tests
  • Verify migrations are valid and do not conflict with existing migrations

Validated user-facing changes as a developer

Note: Multiple code reviewers can share the checklists above, a second reviewer should not make a duplicate checklist. All checks should be checked before approving, even those labeled N/A.

  • New pages have been added to .pa11yci file so that they will be tested with our automated accessibility testing
  • Checked keyboard navigability
  • Meets all designs and user flows provided by design/product
  • Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)
  • (Rarely needed) Tested as both an analyst and applicant user

As a designer reviewer, I have

Verified that the changes match the design intention

  • Checked that the design translated visually
  • Checked behavior. Comment any found issues or broken flows.
  • Checked different states (empty, one, some, error)
  • Checked for landmarks, page heading structure, and links

Validated user-facing changes as a designer

  • Checked keyboard navigability
  • Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)
  • Tested with multiple browsers (check off which ones were used)
    • Chrome
    • Microsoft Edge
    • FireFox
    • Safari
  • (Rarely needed) Tested as both an analyst and applicant user

References

Screenshots

@@ -71,6 +71,8 @@ jobs:
comment:
runs-on: ubuntu-latest
needs: [variables, deploy]
permissions:
Copy link
Contributor

Choose a reason for hiding this comment

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

was this causing an issue?

@erinysong erinysong self-assigned this Jan 7, 2025
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.

Troubleshoot error logs showing on stable
3 participants