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

feat(braze): allowing braze content proxy to access lists #705

Merged
merged 7 commits into from
Aug 29, 2024

Conversation

bassrock
Copy link
Member

@bassrock bassrock commented Aug 28, 2024

Goal

Enable future work for digest emails

Accomplishes

  • Moves JWT generation to it's own package
  • Adds a digest endpoint that allows Braze to get a digest of data for a user for email or push. Right now its just the most recent 3 saves

https://mozilla-hub.atlassian.net/browse/POCKET-10480

Copy link

github-actions bot commented Aug 28, 2024

Plan Result (braze-content-proxy-cdk-production)

CI link

⚠️ Resource Deletion will happen ⚠️

This plan contains resource delete operation. Please check the plan result very carefully!

Plan: 1 to add, 0 to change, 1 to destroy.
  • Replace
    • aws_ecs_task_definition.application_ecs_service_ecs-task_461CC9D4
Change Result (Click me)
  # aws_ecs_task_definition.application_ecs_service_ecs-task_461CC9D4 must be replaced
-/+ resource "aws_ecs_task_definition" "application_ecs_service_ecs-task_461CC9D4" {
      ~ arn                      = "arn:aws:ecs:us-east-1:996905175585:task-definition/BrazeContentProxy-Prod:254" -> (known after apply)
      ~ arn_without_revision     = "arn:aws:ecs:us-east-1:996905175585:task-definition/BrazeContentProxy-Prod" -> (known after apply)
      ~ container_definitions    = jsonencode(
          ~ [
              ~ {
                    name                   = "app"
                  ~ secrets                = [
                        {
                            name      = "BRAZE_API_KEY"
                            valueFrom = "arn:aws:secretsmanager:us-east-1:996905175585:secret:BrazeContentProxy/Prod/BRAZE_API_KEY:key::"
                        },
                      + {
                          + name      = "BRAZE_PRIVATE_KEY"
                          + valueFrom = "arn:aws:secretsmanager:us-east-1:996905175585:secret:BrazeContentProxy/Prod/PRIVATE_KEY:::"
                        },
                      + {
                          + name      = "CHARACTER_MAP"
                          + valueFrom = "arn:aws:secretsmanager:us-east-1:996905175585:secret:Shared/IntMask:characterMap::"
                        },
                      + {
                          + name      = "CONTACT_HASH"
                          + valueFrom = "arn:aws:secretsmanager:us-east-1:996905175585:secret:Shared/IntMask:contactHash::"
                        },
                      + {
                          + name      = "LETTER_INDEX"
                          + valueFrom = "arn:aws:secretsmanager:us-east-1:996905175585:secret:Shared/IntMask:letterIndex::"
                        },
                      + {
                          + name      = "MD5_RANDOMIZER"
                          + valueFrom = "arn:aws:secretsmanager:us-east-1:996905175585:secret:Shared/IntMask:md5Randomizer::"
                        },
                      + {
                          + name      = "POSITION_MAP"
                          + valueFrom = "arn:aws:secretsmanager:us-east-1:996905175585:secret:Shared/IntMask:positionMap::"
                        },
                      + {
                          + name      = "SALT_1"
                          + valueFrom = "arn:aws:secretsmanager:us-east-1:996905175585:secret:Shared/IntMask:salt1::"
                        },
                      + {
                          + name      = "SALT_2"
                          + valueFrom = "arn:aws:secretsmanager:us-east-1:996905175585:secret:Shared/IntMask:salt2::"
                        },
                        {
                            name      = "SENTRY_DSN"
                            valueFrom = "arn:aws:ssm:us-east-1:996905175585:parameter/BrazeContentProxy/Prod/SENTRY_DSN"
                        },
                    ]
                    # (10 unchanged attributes hidden)
                },
            ] # forces replacement
        )
      ~ id                       = "BrazeContentProxy-Prod" -> (known after apply)
      ~ revision                 = 254 -> (known after apply)
      - tags                     = {} -> null
        # (12 unchanged attributes hidden)
    }

Plan: 1 to add, 0 to change, 1 to destroy.

Changes to Outputs:
  ~ ecs-task-arn           = "arn:aws:ecs:us-east-1:996905175585:task-definition/BrazeContentProxy-Prod:254" -> (known after apply)

@bassrock bassrock marked this pull request as ready for review August 29, 2024 20:25
@bassrock bassrock requested a review from a team as a code owner August 29, 2024 20:25
@bassrock bassrock requested review from kschelonka and removed request for a team August 29, 2024 20:25
@github-actions github-actions bot deployed to client-api-dev August 29, 2024 20:28 Active
@github-actions github-actions bot deployed to user-list-search-dev August 29, 2024 20:28 Active
@github-actions github-actions bot deployed to image-api-dev August 29, 2024 20:28 Active
@github-actions github-actions bot deployed to braze-content-proxy-dev August 29, 2024 20:28 Active
@github-actions github-actions bot deployed to v3-proxy-api-dev August 29, 2024 20:29 Active
@github-actions github-actions bot deployed to account-data-deleter-dev August 29, 2024 20:29 Active
@github-actions github-actions bot deployed to list-api-dev August 29, 2024 20:29 Active
@github-actions github-actions bot deployed to user-api-dev August 29, 2024 20:29 Active
@github-actions github-actions bot deployed to annotations-api-dev August 29, 2024 20:29 Active
@github-actions github-actions bot deployed to shared-snowplow-consumer-dev August 29, 2024 20:29 Active
@github-actions github-actions bot deployed to shares-api-dev August 29, 2024 20:29 Active
@github-actions github-actions bot deployed to parser-graphql-wrapper-dev August 29, 2024 20:29 Active
@github-actions github-actions bot deployed to feature-flags-dev August 29, 2024 20:29 Active
@github-actions github-actions bot deployed to shareable-lists-api-dev August 29, 2024 20:30 Active
@github-actions github-actions bot deployed to braze-content-proxy-dev August 29, 2024 20:40 Active
@github-actions github-actions bot deployed to braze-content-proxy-dev August 29, 2024 20:49 Active
@github-actions github-actions bot deployed to braze-content-proxy-dev August 29, 2024 20:58 Active
.filter((edge) => edge.node.item.__typename == 'Item')
.map((edge) => {
const item = edge.node.item;
if (item.__typename == 'Item') {
Copy link
Contributor

Choose a reason for hiding this comment

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

is the typescript compiler not inferring this?

Copy link
Member Author

Choose a reason for hiding this comment

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

no its not. and its very annoying

@bassrock bassrock merged commit 2142851 into main Aug 29, 2024
197 checks passed
@bassrock bassrock deleted the feat/braze-lists branch August 29, 2024 21:21
Copy link

🎉 This issue has been resolved in version @pocket-tools/terraform-modules-v5.14.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

2 participants