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

[DOP-4170]: Create AWS ECS Task definition to process Snooty Parser cache updates #951

Merged
merged 69 commits into from
Jan 16, 2024

Conversation

branberry
Copy link
Contributor

@branberry branberry commented Dec 12, 2023

Ticket

DOP-4170

Notes

This ticket implements the cache update worker via an ECS task. This ticket also contains additional updates to the update-feature-branch.yml workflow to process jobs in parallel, as well as provide caching for node_modules between jobs.

Spike document for context

Verification

Here is a link to the CloudWatch logs that show a successful job run.

Here is a link of the uploaded cache file for docs-java.

Copy link

Your feature branch infrastructure has been deployed!

Your webhook URL is: https://l2yimj2j9d.execute-api.us-east-2.amazonaws.com/prod/webhook/githubEndpoint/trigger/build

For more information on how to use this endpoint, follow these instructions.

@branberry branberry changed the title [DOP-4170]: [DOP-4170]: Create AWS ECS Task definition to process Snooty Parser cache updates Jan 10, 2024
@branberry branberry marked this pull request as ready for review January 10, 2024 16:33
@@ -1,6 +1,6 @@
import { Duration } from 'aws-cdk-lib';
import { Cors, CorsOptions, LambdaIntegration, LambdaRestApi } from 'aws-cdk-lib/aws-apigateway';
import { Code, Function, Runtime } from 'aws-cdk-lib/aws-lambda';
import { Code, DockerImageCode, DockerImageFunction, Function, Runtime } from 'aws-cdk-lib/aws-lambda';
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these new imports needed still? I believe they're unused.

assumedBy: new ServicePrincipal('ecs-tasks.amazonaws.com'),
});

const snootyParseCacheBucket = Bucket.fromBucketName(this, 'snooty-parse-cache', 'snooty-parse-cache');
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Since snooty-parse-cache is already a constant here, should we change it to be a global variable we can utilize here? Not a blocker for merge.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey Matt! I think this is a great suggestion, but I am running into issues when importing it here. I believe it has to do with the fact that the cdk-infra is a separate project from the root project, and this leads to funky behavior.

What I'll do is define the constant here, and add that as an environment variable 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok! Def not a blocker!

src/cache-updater/Dockerfile.cacheUpdater Show resolved Hide resolved
@branberry branberry requested a review from mmeigs January 11, 2024 16:27
Copy link
Contributor

@seungpark seungpark left a comment

Choose a reason for hiding this comment

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

this mostly LGTM. waiting for changes in last review by Matt and left a minor comment about requiring version / branch / tag detail of doc repo

src/cache-updater/index.ts Show resolved Hide resolved
@branberry branberry requested a review from seungpark January 12, 2024 20:01
Copy link
Contributor

@seungpark seungpark left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@branberry branberry merged commit 67e7137 into master Jan 16, 2024
10 checks passed
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