-
Notifications
You must be signed in to change notification settings - Fork 21
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
fix: #2332 - fix audit report expenditures #2333
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix the audit report Project Summaries V2 expenditures. The issue is that we do not have a project ID for expenditures. To resove the issue, we create a map for the subaward to project id using the awards50k tab
github-actions
bot
added
bug
Something isn't working
javascript
Pull requests that update Javascript code
labels
Dec 9, 2023
QA Summary
Test CoverageCoverage report for `packages/client`
Coverage report for `packages/server`
Pusher: @as1729, Action: |
Terraform Summary
Hint: If "Terraform Format & Style" failed, run OutputValidation Output
Plan OutputNote: Objects have changed outside of Terraform
Terraform detected the following changes made outside of Terraform since the
last "terraform apply" which may have affected this plan:
# module.api.aws_ecs_task_definition.default[0] has changed
~ resource "aws_ecs_task_definition" "default" {
id = "gost-staging-api"
+ tags = {}
# (13 unchanged attributes hidden)
+ volume {
+ name = "data"
+ efs_volume_configuration {
+ file_system_id = "fs-08f95063c1cdbe191"
+ root_directory = "/"
+ transit_encryption = "ENABLED"
+ transit_encryption_port = 0
+ authorization_config {
+ access_point_id = "fsap-03bc0296928aade4f"
}
}
}
- volume {
- name = "data" -> null
- efs_volume_configuration {
- file_system_id = "fs-08f95063c1cdbe191" -> null
- root_directory = "/" -> null
- transit_encryption = "ENABLED" -> null
- authorization_config {
- access_point_id = "fsap-03bc0296928aade4f" -> null
}
}
}
# (1 unchanged block hidden)
}
# module.api.aws_iam_role.execution[0] has changed
~ resource "aws_iam_role" "execution" {
id = "gost-staging-api-ECSTaskExecution-20230217010414321500000009"
name = "gost-staging-api-ECSTaskExecution-20230217010414321500000009"
~ role_last_used = [
~ {
~ last_used_date = "2023-12-14T00:29:59Z" -> "2023-12-14T16:12:44Z"
# (1 unchanged element hidden)
},
]
tags = {}
# (11 unchanged attributes hidden)
# (2 unchanged blocks hidden)
}
# module.api.aws_iam_role.task[0] has changed
~ resource "aws_iam_role" "task" {
id = "gost-staging-api-ECSTask-2023021701041477300000000a"
name = "gost-staging-api-ECSTask-2023021701041477300000000a"
~ role_last_used = [
~ {
~ last_used_date = "2023-12-14T00:29:28Z" -> "2023-12-14T16:34:51Z"
# (1 unchanged element hidden)
},
]
tags = {}
# (11 unchanged attributes hidden)
# (6 unchanged blocks hidden)
}
Unless you have made equivalent changes to your configuration, or ignored the
relevant attributes using ignore_changes, the following plan may include
actions to undo or respond to these changes.
─────────────────────────────────────────────────────────────────────────────
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
~ update in-place
- destroy
+/- create replacement and then destroy
Terraform will perform the following actions:
# module.api.aws_ecs_service.default[0] will be updated in-place
~ resource "aws_ecs_service" "default" {
id = "arn:aws:ecs:us-west-2:357150818708:service/gost-staging/gost-staging-api"
name = "gost-staging-api"
tags = {}
~ task_definition = "arn:aws:ecs:us-west-2:357150818708:task-definition/gost-staging-api:69" -> (known after apply)
# (15 unchanged attributes hidden)
# (4 unchanged blocks hidden)
}
# module.api.aws_ecs_task_definition.default[0] must be replaced
+/- resource "aws_ecs_task_definition" "default" {
~ arn = "arn:aws:ecs:us-west-2:357150818708:task-definition/gost-staging-api:69" -> (known after apply)
~ arn_without_revision = "arn:aws:ecs:us-west-2:357150818708:task-definition/gost-staging-api" -> (known after apply)
~ container_definitions = jsonencode(
~ [ # forces replacement
~ {
~ dockerLabels = {
~ "com.datadoghq.tags.version" = "8323e28686aaa13a063af6af637779fae092a988" -> "c1ea1c32fb614a237394592099b1d18a8656e9b9"
# (2 unchanged elements hidden)
}
~ environment = [
# (7 unchanged elements hidden)
{
name = "DD_SERVICE"
value = "gost"
},
~ {
name = "DD_VERSION"
~ value = "8323e28686aaa13a063af6af637779fae092a988" -> "c1ea1c32fb614a237394592099b1d18a8656e9b9"
},
{
name = "ENABLE_GRANTS_DIGEST"
value = "false"
},
# (10 unchanged elements hidden)
]
~ image = "ghcr.io/usdigitalresponse/usdr-gost-api:8323e28686aaa13a063af6af637779fae092a988@sha256:21833bbcf95dcf3181d73dc705f2efde981013b5bf688e091b6c3bd554a0ddf5" -> "ghcr.io/usdigitalresponse/usdr-gost-api:c1ea1c32fb614a237394592099b1d18a8656e9b9@sha256:314cb6a7684bc7202054c4a96724e01a80b6285a102197dfb91f94bd867c925e"
name = "api"
- volumesFrom = [] -> null
# (9 unchanged elements hidden)
} # forces replacement,
~ {
~ dockerLabels = {
~ "com.datadoghq.tags.version" = "8323e28686aaa13a063af6af637779fae092a988" -> "c1ea1c32fb614a237394592099b1d18a8656e9b9"
# (2 unchanged elements hidden)
}
~ environment = [
# (3 unchanged elements hidden)
{
name = "DD_SERVICE"
value = "gost"
},
~ {
name = "DD_VERSION"
~ value = "8323e28686aaa13a063af6af637779fae092a988" -> "c1ea1c32fb614a237394592099b1d18a8656e9b9"
},
{
name = "ECS_FARGATE"
value = "true"
},
]
- mountPoints = [] -> null
name = "datadog"
- portMappings = [] -> null
- volumesFrom = [] -> null
# (6 unchanged elements hidden)
} # forces replacement,
]
)
~ id = "gost-staging-api" -> (known after apply)
~ revision = 69 -> (known after apply)
- tags = {} -> null
# (9 unchanged attributes hidden)
- volume {
- name = "data" -> null
- efs_volume_configuration {
- file_system_id = "fs-08f95063c1cdbe191" -> null
- root_directory = "/" -> null
- transit_encryption = "ENABLED" -> null
- transit_encryption_port = 0 -> null
- authorization_config {
- access_point_id = "fsap-03bc0296928aade4f" -> null
}
}
}
+ volume {
+ name = "data"
+ efs_volume_configuration {
+ file_system_id = "fs-08f95063c1cdbe191"
+ root_directory = "/"
+ transit_encryption = "ENABLED"
+ authorization_config {
+ access_point_id = "fsap-03bc0296928aade4f"
}
}
}
# (1 unchanged block hidden)
}
# module.arpa_audit_report.aws_ecs_service.default will be updated in-place
~ resource "aws_ecs_service" "default" {
id = "arn:aws:ecs:us-west-2:357150818708:service/gost-staging/gost-staging-arpa_audit_report"
name = "gost-staging-arpa_audit_report"
tags = {}
~ task_definition = "arn:aws:ecs:us-west-2:357150818708:task-definition/gost-staging-arpa_audit_report:38" -> (known after apply)
# (15 unchanged attributes hidden)
# (3 unchanged blocks hidden)
}
# module.arpa_audit_report.aws_ecs_task_definition.consumer must be replaced
+/- resource "aws_ecs_task_definition" "consumer" {
~ arn = "arn:aws:ecs:us-west-2:357150818708:task-definition/gost-staging-arpa_audit_report:38" -> (known after apply)
~ arn_without_revision = "arn:aws:ecs:us-west-2:357150818708:task-definition/gost-staging-arpa_audit_report" -> (known after apply)
~ container_definitions = (sensitive value) # forces replacement
~ id = "gost-staging-arpa_audit_report" -> (known after apply)
- ipc_mode = "" -> null
- pid_mode = "" -> null
~ revision = 38 -> (known after apply)
- tags = {} -> null
# (9 unchanged attributes hidden)
- volume {
- name = "data" -> null
- efs_volume_configuration {
- file_system_id = "fs-08f95063c1cdbe191" -> null
- root_directory = "/" -> null
- transit_encryption = "ENABLED" -> null
- transit_encryption_port = 0 -> null
- authorization_config {
- access_point_id = "fsap-03bc0296928aade4f" -> null
}
}
}
+ volume {
+ name = "data"
+ efs_volume_configuration {
+ file_system_id = "fs-08f95063c1cdbe191"
+ root_directory = "/"
+ transit_encryption = "ENABLED"
+ authorization_config {
+ access_point_id = "fsap-03bc0296928aade4f"
}
}
}
# (1 unchanged block hidden)
}
# module.arpa_treasury_report.aws_ecs_service.default will be updated in-place
~ resource "aws_ecs_service" "default" {
id = "arn:aws:ecs:us-west-2:357150818708:service/gost-staging/gost-staging-treasury_report"
name = "gost-staging-treasury_report"
tags = {}
~ task_definition = "arn:aws:ecs:us-west-2:357150818708:task-definition/gost-staging-treasury_report:27" -> (known after apply)
# (15 unchanged attributes hidden)
# (3 unchanged blocks hidden)
}
# module.arpa_treasury_report.aws_ecs_task_definition.consumer must be replaced
+/- resource "aws_ecs_task_definition" "consumer" {
~ arn = "arn:aws:ecs:us-west-2:357150818708:task-definition/gost-staging-treasury_report:27" -> (known after apply)
~ arn_without_revision = "arn:aws:ecs:us-west-2:357150818708:task-definition/gost-staging-treasury_report" -> (known after apply)
~ container_definitions = (sensitive value) # forces replacement
~ id = "gost-staging-treasury_report" -> (known after apply)
- ipc_mode = "" -> null
- pid_mode = "" -> null
~ revision = 27 -> (known after apply)
- tags = {} -> null
# (9 unchanged attributes hidden)
- volume {
- name = "data" -> null
- efs_volume_configuration {
- file_system_id = "fs-08f95063c1cdbe191" -> null
- root_directory = "/" -> null
- transit_encryption = "ENABLED" -> null
- transit_encryption_port = 0 -> null
- authorization_config {
- access_point_id = "fsap-03bc0296928aade4f" -> null
}
}
}
+ volume {
+ name = "data"
+ efs_volume_configuration {
+ file_system_id = "fs-08f95063c1cdbe191"
+ root_directory = "/"
+ transit_encryption = "ENABLED"
+ authorization_config {
+ access_point_id = "fsap-03bc0296928aade4f"
}
}
}
# (1 unchanged block hidden)
}
# module.consume_grants.aws_ecs_service.default will be updated in-place
~ resource "aws_ecs_service" "default" {
id = "arn:aws:ecs:us-west-2:357150818708:service/gost-staging/gost-staging-consume_grants"
name = "gost-staging-consume_grants"
tags = {}
~ task_definition = "arn:aws:ecs:us-west-2:357150818708:task-definition/gost-staging-consume_grants:54" -> (known after apply)
# (15 unchanged attributes hidden)
# (3 unchanged blocks hidden)
}
# module.consume_grants.aws_ecs_task_definition.consume_grants must be replaced
+/- resource "aws_ecs_task_definition" "consume_grants" {
~ arn = "arn:aws:ecs:us-west-2:357150818708:task-definition/gost-staging-consume_grants:54" -> (known after apply)
~ arn_without_revision = "arn:aws:ecs:us-west-2:357150818708:task-definition/gost-staging-consume_grants" -> (known after apply)
~ container_definitions = (sensitive value) # forces replacement
~ id = "gost-staging-consume_grants" -> (known after apply)
- ipc_mode = "" -> null
- pid_mode = "" -> null
~ revision = 54 -> (known after apply)
- tags = {} -> null
# (9 unchanged attributes hidden)
# (1 unchanged block hidden)
}
# module.website.aws_s3_object.deploy-config[0] will be updated in-place
~ resource "aws_s3_object" "deploy-config" {
~ content = <<-EOT
window.APP_CONFIG = window.APP_CONFIG || {};
window.APP_CONFIG.apiURLForGOST = 'https://api.staging.grants.usdr.dev/';
window.apiURLForGOST = window.APP_CONFIG.apiURLForGOST; // Legacy
window.APP_CONFIG.DD_RUM_ENABLED = true;
- window.APP_CONFIG.DD_RUM_CONFIG = {"allowedTracingUrls":["https://api.staging.grants.usdr.dev"],"applicationId":"15db471e-2ccb-4d3c-a6bf-99b750d748f5","clientToken":"pub50834fcc1999d53e546519b1a0f03934","defaultPrivacyLevel":"mask","env":"staging","service":"gost","sessionReplaySampleRate":1,"sessionSampleRate":10,"site":"datadoghq.com","trackLongTasks":true,"trackResources":true,"trackUserInteractions":true,"version":"8323e28686aaa13a063af6af637779fae092a988"};
+ window.APP_CONFIG.DD_RUM_CONFIG = {"allowedTracingUrls":["https://api.staging.grants.usdr.dev"],"applicationId":"15db471e-2ccb-4d3c-a6bf-99b750d748f5","clientToken":"pub50834fcc1999d53e546519b1a0f03934","defaultPrivacyLevel":"mask","env":"staging","service":"gost","sessionReplaySampleRate":1,"sessionSampleRate":10,"site":"datadoghq.com","trackLongTasks":true,"trackResources":true,"trackUserInteractions":true,"version":"c1ea1c32fb614a237394592099b1d18a8656e9b9"};
window.APP_CONFIG.featureFlags = {"myProfileEnabled":true,"newTerminologyEnabled":true};
window.APP_CONFIG.overrideFeatureFlag = (flagName, overrideValue) => {
const storageKey = 'featureFlags';
let overrides = {};
try {
overrides = JSON.parse(window.sessionStorage.getItem(storageKey)) || {};
} catch (e) {
console.error(`Error parsing window.sessionStorage.${storageKey} as JSON:`, e);
console.warn(`window.sessionStorage.${storageKey} will be replaced.`);
}
overrides[flagName] = overrideValue;
window.sessionStorage.setItem(storageKey, JSON.stringify(overrides));
console.log('New feature flag overrides in page session:',
window.sessionStorage.getItem(storageKey));
};
EOT
~ etag = "4ff1dc6206c3601b4304688c9c1d0d7c" -> "74c224219d9c85fd9716da6340669944"
id = "/config/deploy-config.js"
tags = {}
~ version_id = "wQDTjte5fbCVRrw2xcjExyp.dY7SyUub" -> (known after apply)
# (10 unchanged attributes hidden)
}
# module.website.aws_s3_object.origin_dist_artifact["index.html"] will be updated in-place
~ resource "aws_s3_object" "origin_dist_artifact" {
~ etag = "026d78c7e55f821514d7f42ca6d5d657" -> "741b24b056a028d04fe1c6119b85492a"
id = "dist/index.html"
~ source_hash = "026d78c7e55f821514d7f42ca6d5d657" -> "741b24b056a028d04fe1c6119b85492a"
tags = {}
~ version_id = "V8h1Joe.daNKbfw1n6iOXWxfYl2UOeYs" -> (known after apply)
# (11 unchanged attributes hidden)
}
# module.website.aws_s3_object.origin_dist_artifact["js/chunk-vendors.08d51b50.js.map"] will be updated in-place
~ resource "aws_s3_object" "origin_dist_artifact" {
~ etag = "5850091ba07ad354dada47f8ad6769bc-2" -> "f8baafd53ef0c4d6f839edb60cbecc4e"
id = "dist/js/chunk-vendors.08d51b50.js.map"
tags = {}
~ version_id = "H3J1zbz8xY5Gv9KVZl7qb8oa.B.pX8U5" -> (known after apply)
# (12 unchanged attributes hidden)
}
# module.website.aws_s3_object.origin_dist_artifact["js/main.51d9ee13.js"] will be destroyed
# (because key ["js/main.51d9ee13.js"] is not in for_each map)
- resource "aws_s3_object" "origin_dist_artifact" {
- acl = "private" -> null
- bucket = "gost-staging-origin-357150818708-us-west-2-website" -> null
- bucket_key_enabled = false -> null
- content_type = "text/javascript" -> null
- etag = "2fd3ff022612045b2cef2ec0daf4b49a" -> null
- force_destroy = false -> null
- id = "dist/js/main.51d9ee13.js" -> null
- key = "dist/js/main.51d9ee13.js" -> null
- metadata = {} -> null
- server_side_encryption = "AES256" -> null
- source = "/home/runner/work/usdr-gost/usdr-gost/packages/client/dist/js/main.51d9ee13.js" -> null
- source_hash = "2fd3ff022612045b2cef2ec0daf4b49a" -> null
- storage_class = "STANDARD" -> null
- tags = {} -> null
- tags_all = {
- "env" = "staging"
- "management" = "terraform"
- "owner" = "grants"
- "repo" = "usdr-gost"
- "service" = "gost"
- "usage" = "workload"
} -> null
- version_id = "qMZZ0zxXhY9molvm6rbxEhm13EB8gJxn" -> null
}
# module.website.aws_s3_object.origin_dist_artifact["js/main.51d9ee13.js.map"] will be destroyed
# (because key ["js/main.51d9ee13.js.map"] is not in for_each map)
- resource "aws_s3_object" "origin_dist_artifact" {
- acl = "private" -> null
- bucket = "gost-staging-origin-357150818708-us-west-2-website" -> null
- bucket_key_enabled = false -> null
- content_type = "application/json" -> null
- etag = "5722d9c661e441a31a8eaa74742cce8e" -> null
- force_destroy = false -> null
- id = "dist/js/main.51d9ee13.js.map" -> null
- key = "dist/js/main.51d9ee13.js.map" -> null
- metadata = {} -> null
- server_side_encryption = "AES256" -> null
- source = "/home/runner/work/usdr-gost/usdr-gost/packages/client/dist/js/main.51d9ee13.js.map" -> null
- source_hash = "5722d9c661e441a31a8eaa74742cce8e" -> null
- storage_class = "STANDARD" -> null
- tags = {} -> null
- tags_all = {
- "env" = "staging"
- "management" = "terraform"
- "owner" = "grants"
- "repo" = "usdr-gost"
- "service" = "gost"
- "usage" = "workload"
} -> null
- version_id = ".etB.QCqERtM.Ob1xoWbKFWiGcW5qlEc" -> null
}
# module.website.aws_s3_object.origin_dist_artifact["js/main.6e7cc89f.js"] will be created
+ resource "aws_s3_object" "origin_dist_artifact" {
+ acl = "private"
+ bucket = "gost-staging-origin-357150818708-us-west-2-website"
+ bucket_key_enabled = (known after apply)
+ content_type = "text/javascript"
+ etag = "4834d7f86df4e87d57b3140a736694ef"
+ force_destroy = false
+ id = (known after apply)
+ key = "dist/js/main.6e7cc89f.js"
+ kms_key_id = (known after apply)
+ server_side_encryption = "AES256"
+ source = "/home/runner/work/usdr-gost/usdr-gost/packages/client/dist/js/main.6e7cc89f.js"
+ source_hash = "4834d7f86df4e87d57b3140a736694ef"
+ storage_class = (known after apply)
+ tags_all = {
+ "env" = "staging"
+ "management" = "terraform"
+ "owner" = "grants"
+ "repo" = "usdr-gost"
+ "service" = "gost"
+ "usage" = "workload"
}
+ version_id = (known after apply)
}
# module.website.aws_s3_object.origin_dist_artifact["js/main.6e7cc89f.js.map"] will be created
+ resource "aws_s3_object" "origin_dist_artifact" {
+ acl = "private"
+ bucket = "gost-staging-origin-357150818708-us-west-2-website"
+ bucket_key_enabled = (known after apply)
+ content_type = "application/json"
+ etag = "368249fd310a6ed0ffa90c9b2b92c1ec"
+ force_destroy = false
+ id = (known after apply)
+ key = "dist/js/main.6e7cc89f.js.map"
+ kms_key_id = (known after apply)
+ server_side_encryption = "AES256"
+ source = "/home/runner/work/usdr-gost/usdr-gost/packages/client/dist/js/main.6e7cc89f.js.map"
+ source_hash = "368249fd310a6ed0ffa90c9b2b92c1ec"
+ storage_class = (known after apply)
+ tags_all = {
+ "env" = "staging"
+ "management" = "terraform"
+ "owner" = "grants"
+ "repo" = "usdr-gost"
+ "service" = "gost"
+ "usage" = "workload"
}
+ version_id = (known after apply)
}
Plan: 6 to add, 7 to change, 6 to destroy. Pusher: @as1729, Action: |
as1729
approved these changes
Dec 14, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ticket #2332
Fix the audit report Project Summaries V2 expenditures. The issue is that we do not have a project ID for expenditures. To resove the issue, we create a map for the subaward to project id using the awards50k tab
Screenshots / Demo Video
Testing
Run the audit report and check the expenditures on the Project Summaries V2 tab.
Automated and Unit Tests
Manual tests for Reviewer
Checklist