-
Notifications
You must be signed in to change notification settings - Fork 73
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-4438]: Add component filtering for production builds in the Autobuilder #1025
Conversation
Your feature branch infrastructure has been deployed! Your webhook URL is: https://46zl6zyuea.execute-api.us-east-2.amazonaws.com/prod/webhook/githubEndpoint/trigger/build For more information on how to use this endpoint, follow these instructions. |
@@ -244,12 +238,6 @@ describe('ProductionJobHandler Tests', () => { | |||
jobHandlerTestHelper.setupForSuccess(); | |||
await jobHandlerTestHelper.jobHandler.execute(); | |||
jobHandlerTestHelper.verifyNextGenSuccess(); | |||
|
|||
expect(jobHandlerTestHelper.fileSystemServices.writeToFile).toBeCalledWith( | |||
`repos/${jobHandlerTestHelper.job.payload.repoName}/.env.production`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed this as I believe it's not providing a ton of value, and leads to additional overhead when making changes.
@@ -166,12 +166,6 @@ describe('ProductionJobHandler Tests', () => { | |||
jobHandlerTestHelper.setupForSuccess(); | |||
await jobHandlerTestHelper.jobHandler.execute(); | |||
jobHandlerTestHelper.verifyNextGenSuccess(); | |||
// TODO: Correct number of arguments | |||
expect(jobHandlerTestHelper.fileSystemServices.writeToFile).toBeCalledWith( | |||
`repos/${jobHandlerTestHelper.job.payload.repoName}/.env.production`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed this as I believe it's not providing a ton of value, and leads to additional overhead when making changes.
# get shared.mk | ||
RUN curl https://raw.githubusercontent.com/mongodb/docs-worker-pool/meta/makefiles/shared.mk -o shared.mk | ||
|
||
# install snooty frontend and docs-tools | ||
RUN git clone -b v${SNOOTY_FRONTEND_VERSION} --depth 1 https://github.com/mongodb/snooty.git \ | ||
&& cd snooty \ | ||
&& npm ci --legacy-peer-deps --omit=dev \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to remove omit dev as the filter functionality for the frontend depends on a dev dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering why it's a dev dependency then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had the same question! We should definitely consider moving the relevant dependencies to be installed for prod in the near future if possible
# get shared.mk | ||
RUN curl https://raw.githubusercontent.com/mongodb/docs-worker-pool/meta/makefiles/shared.mk -o shared.mk | ||
|
||
# install snooty frontend and docs-tools | ||
RUN git clone -b v${SNOOTY_FRONTEND_VERSION} --depth 1 https://github.com/mongodb/snooty.git \ | ||
&& cd snooty \ | ||
&& npm ci --legacy-peer-deps --omit=dev \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering why it's a dev dependency then?
// Setting this to always be true. It's one less SSM parameter to manage, | ||
// and it doesn't hurt to always do the filtering. The only reason | ||
// it exists here is so that we don't always filter when testing locally. | ||
// This is because the filter functionality updates the ComponentFactory.js file | ||
// which could be accidentally committed if run locally. | ||
USE_FILTER_BRANCH: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will there be an easy way to flip this variable if something goes wrong in prod though? Just wondering on a quick roll-back plan.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Reviewed live with @branberry
Stories/Links:
DOP-4438
Notes
This PR adds the component factory filter functionality to builds.
successful build
README updates