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

PROD-2839 Better handling of empty storage secrets in aws_util #5347

Merged
merged 4 commits into from
Oct 8, 2024

Conversation

adamsachs
Copy link
Contributor

@adamsachs adamsachs commented Oct 3, 2024

Closes PROD-2839

Description Of Changes

Added better handling for an empty storage secrets dictionary in the get_aws_session method.

Steps to Confirm

  • Add the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY env variables to your .env file (creds in 1pass sandboxProgrammaticUserS3)
  • Run fides, the admin UI, and the privacy center
  • Go to http://localhost:3000/privacy-requests/configure/storage and configure the storage as shown in the image below
  • Click Save
  • Go to the Privacy Center and submit an access request
  • Privacy request should complete successfully
storage config

Before, this would raise an AttributeError: 'NoneType' object has no attribute 'get' , now you should be able to submit a privacy request and have results sent to the S3 bucket.

Pre-Merge Checklist

  • All CI Pipelines Succeeded
  • Documentation:
    • documentation complete, PR opened in fidesdocs
    • documentation issue created in fidesdocs
    • if there are any new client scopes created as part of the pull request, remember to update public-facing documentation that references our scope registry
  • Issue Requirements are Met
  • Relevant Follow-Up Issues Created
  • Update CHANGELOG.md
  • For API changes, the Postman collection has been updated
  • If there are any database migrations:
    • Ensure that your downrev is up to date with the latest revision on main
    • Ensure that your downgrade() migration is correct and works
      • If a downgrade migration is not possible for this change, please call this out in the PR description!

Copy link

vercel bot commented Oct 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fides-plus-nightly ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 8, 2024 11:13pm

Copy link

cypress bot commented Oct 3, 2024

fides    Run #10359

Run Properties:  status check passed Passed #10359  •  git commit d9aae8f722 ℹ️: Merge 977bba69709383d1a2dea317ff309d856b30eaeb into b54090bc5f46b0e26549c3dbda94...
Project fides
Run status status check passed Passed #10359
Run duration 00m 38s
Commit git commit d9aae8f722 ℹ️: Merge 977bba69709383d1a2dea317ff309d856b30eaeb into b54090bc5f46b0e26549c3dbda94...
Committer Adam Sachs
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 4
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

@erosselli erosselli changed the title better handling of empty storage secrets in aws_util PROD_2839 Better handling of empty storage secrets in aws_util Oct 8, 2024
@erosselli erosselli changed the title PROD_2839 Better handling of empty storage secrets in aws_util PROD-2839 Better handling of empty storage secrets in aws_util Oct 8, 2024
Copy link

codecov bot commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.32%. Comparing base (b54090b) to head (977bba6).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5347   +/-   ##
=======================================
  Coverage   85.32%   85.32%           
=======================================
  Files         378      378           
  Lines       23994    23996    +2     
  Branches     3218     3219    +1     
=======================================
+ Hits        20472    20474    +2     
  Misses       2932     2932           
  Partials      590      590           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@erosselli erosselli marked this pull request as ready for review October 8, 2024 23:06
Copy link
Contributor

@andres-torres-marroquin andres-torres-marroquin left a comment

Choose a reason for hiding this comment

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

Checked this manually, works perfectly!

@erosselli erosselli merged commit c294fb5 into main Oct 8, 2024
39 checks passed
@erosselli erosselli deleted the asachs/PROD-2839 branch October 8, 2024 23:43
Copy link

cypress bot commented Oct 8, 2024

fides    Run #10363

Run Properties:  status check passed Passed #10363  •  git commit c294fb532a: PROD-2839 Better handling of empty storage secrets in aws_util (#5347)
Project fides
Run status status check passed Passed #10363
Run duration 00m 40s
Commit git commit c294fb532a: PROD-2839 Better handling of empty storage secrets in aws_util (#5347)
Committer Adam Sachs
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 4
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

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.

3 participants