Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: usdigitalresponse/usdr-gost
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1d5784b54bafe7cf553696d2fab9713d8a15aaca
Choose a base ref
..
head repository: usdigitalresponse/usdr-gost
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d1f3e96c01ec0faceda74891efd4113085f00b3e
Choose a head ref
40 changes: 20 additions & 20 deletions arpa-exporter/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion arpa-exporter/pyproject.toml
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ chevron="^0.14.0"

[tool.poetry.group.dev.dependencies]
pytest = "^8.3.5"
ruff = "^0.9.10"
ruff = "^0.10.0"
ipython = "^9.0.2"
pytest-cov = "^6.0.0"
mypy = "^1.15.0"
Original file line number Diff line number Diff line change
@@ -115,7 +115,7 @@ describe('FullFileExport', () => {
expect(command.Bucket).to.equal(process.env.AUDIT_REPORT_BUCKET);
});

it('shouldRecreateArchive raises an error if the S3 client throws an unknown error', async () => {
it('shouldRecreateArchive throw an error if the S3 client throws an unknown error', async () => {
const uploads = [
fixtures.uploads.upload1,
fixtures.uploads.upload2,
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { SendMessageCommand } = require('@aws-sdk/client-sqs');
const { HeadObjectCommand, PutObjectCommand, NotFound } = require('@aws-sdk/client-s3');
const {
HeadObjectCommand, PutObjectCommand, NotFound,
} = require('@aws-sdk/client-s3');
const converter = require('json-2-csv');
const path = require('path');
const moment = require('moment');
@@ -79,6 +81,7 @@ async function getMetadataLastModified(organizationId, logger = log) {
const s3 = aws.getS3Client();
const Key = metadataFileKey(organizationId);
const baseParams = { Bucket: process.env.AUDIT_REPORT_BUCKET, Key };
logger.child(baseParams);

let headObject;

@@ -89,7 +92,7 @@ async function getMetadataLastModified(organizationId, logger = log) {
logger.info('metadata file does not exist');
return null;
}
logger.error(error, 'failed to get existing metadata file');
logger.error(error, 'failed to get metadata file due to an exception with s3');
throw error;
}

16 changes: 15 additions & 1 deletion terraform/modules/gost_api/storage.tf
Original file line number Diff line number Diff line change
@@ -67,9 +67,23 @@ module "access_arpa_reports_bucket_policy" {
actions = [
"s3:PutObject",
"s3:GetObject",
"s3:HeadObject",
]
resources = ["${module.arpa_audit_reports_bucket.bucket_arn}/*"]
},
{
sid = "ListBucketObjects"
effect = "Allow"
actions = [
"s3:ListBucket",
]
resources = [module.arpa_audit_reports_bucket.bucket_arn]
conditions = [
{
test = "StringLike"
variable = "s3:prefix"
values = ["full-file-export/*"]
}
]
}
]
}
2 changes: 1 addition & 1 deletion terraform/prod.tfvars
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ website_feature_flags = {
newGrantsDetailPageEnabled = true,
shareTerminologyEnabled = true,
followNotesEnabled = false,
enableFullFileExport = false,
enableFullFileExport = true,
}

// Google Analytics Account ID: 233192355, Property ID: 321194851, Stream ID: 3802896350