cisagov / manage.get.gov

A Django-based domain name registrar used by the .gov domain to communicate with an EPP registry
https://get.gov
Other
53 stars 14 forks source link

Ticket #2235: Email domain request metadata alongside domain metadata #2343

Closed zandercymatics closed 4 days ago

zandercymatics commented 1 week ago

Ticket

Resolves #2235

Changes

Context for reviewers

This PR adds another domain report to our email current metadata script. This script runs every 24 hours and emails an encrypted zip to help@get.gov.

Previously, the report assumed that it would only be uploading one file. However, since we now want to include both, this PR had to take that into account.

As it turns out, though, doing so actually dramatically simplified the logic flow.

Tests are excluded from this PR as we would primarily need to test a github action. As the file content itself is encrypted, we'd basically be checking on if the email contains a zip which we already test for elsewhere (attachments).

The logic to a) get it from an email, b) enter a password + extract it, and c) compare each attached file would take a script in and of it self. For a unit test, there isn't much benefit to that. We test all of these steps (minus B, but we don't need to test a third party library like that) independently.

Setup

  1. Either on a sandbox or locally, Run the command docker-compose exec app ./manage.py email_current_metadata_report --emailTo {desired email address}
  2. You should receive the encrypted file in an email. This report should contain the domain metadata and the domain request metadata reports.
  3. For local development, the password will be devpwd

Code Review Verification Steps

As the original developer, I have

Satisfied acceptance criteria and met development standards

Ensured code standards are met (Original Developer)

Validated user-facing changes (if applicable)

As a code reviewer, I have

Reviewed, tested, and left feedback about the changes

Ensured code standards are met (Code reviewer)

Validated user-facing changes as a developer

Note: Multiple code reviewers can share the checklists above, a second reviewers should not make a duplicate checklist

As a designer reviewer, I have

Verified that the changes match the design intention

Validated user-facing changes as a designer

Screenshots

github-actions[bot] commented 1 week ago

🥳 Successfully deployed to developer sandbox za.

github-actions[bot] commented 1 week ago

🥳 Successfully deployed to developer sandbox za.

github-actions[bot] commented 4 days ago

🥳 Successfully deployed to developer sandbox za.

zandercymatics commented 4 days ago

@CocoByte Got that fixed, it looks like in a recent commit I was overriding the record variable accidentally. Ez fix

github-actions[bot] commented 4 days ago

🥳 Successfully deployed to developer sandbox za.

github-actions[bot] commented 4 days ago

🥳 Successfully deployed to developer sandbox za.

github-actions[bot] commented 4 days ago

🥳 Successfully deployed to developer sandbox za.