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

Vebt 479 sundown sweep script #18482

Merged
merged 19 commits into from
Oct 2, 2024
Merged

Vebt 479 sundown sweep script #18482

merged 19 commits into from
Oct 2, 2024

Conversation

nfstern02
Copy link
Contributor

Summary

  • *This work is behind a feature toggle (flipper): NO
  • Added code to delete nightly work files for the VYE process.
  • VEBT and we own maintaining this code.

Related issue(s)

Testing done

  • New code is covered by unit tests
  • Nightly work files were not being deleted in Amazon the S3 buckets we are using
  • Run the job manually once to confirm the expected files are removed in Staging
  • Push to Staging and run once manually to confirm script is behaving as expected.

What areas of the site does it impact?

VYE (Verify Your Enrollment)

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 (if applicable) N/A

@nfstern02 nfstern02 requested a review from a team as a code owner September 17, 2024 18:33
@nfstern02
Copy link
Contributor Author

Added tests for exception handling and logging.

end

it 'throws an exception when the bucket cannot be found on AWS' do
s3_client.stub_responses(:delete_object, 'NoSuchBucket')
Copy link
Contributor

Choose a reason for hiding this comment

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

I pulled it down to confirm, but these stub_responses lines aren't needed. The following line is already saying that "whenever s3_client.delete_object is called, raise ERROR". So I think you can just remove those 4 statements

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me take a look.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That was correct and I removed them and pushed. Thx for the knowledge drop.

Copy link

Backend-review-group approval confirmed.

@nfstern02 nfstern02 merged commit 905d58c into master Oct 2, 2024
23 of 24 checks passed
@nfstern02 nfstern02 deleted the VEBT-479-Sundown-Sweep-Script branch October 2, 2024 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants