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-4306: Remove legacy build code from autobuilder #985

Merged
merged 13 commits into from
Feb 12, 2024
Merged

Conversation

anabellabuckvar
Copy link
Contributor

@anabellabuckvar anabellabuckvar commented Feb 5, 2024

Context

DOP-4306

Going forward, we will only support builds on Snooty so we can remove all of the not isNextGen code paths, and remove the checking logic

Using feature branch webhook, deployed README changes in cloud-docs. Built successfully
Link to build logs
Link to preprd site

Pushed branch to preprd, used standard webhook to deploy README changes in cloud-docs. Built successfully without errors.
Link to build logs
Link to preprd site

Copy link

github-actions bot commented Feb 6, 2024

Your feature branch infrastructure has been deployed!

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

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

1 similar comment
Copy link

github-actions bot commented Feb 6, 2024

Your feature branch infrastructure has been deployed!

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

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

Copy link
Contributor

@branberry branberry left a comment

Choose a reason for hiding this comment

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

Hey Anabella! Looks good so far, we just need to make some more changes where we reference legacy build commands and whatnot.

@@ -49,14 +49,12 @@ export class StagingJobHandler extends JobHandler {
prepDeployCommands(): void {
// TODO: Can we make this more readable?
this.currJob.deployCommands = ['. /venv/bin/activate', `cd repos/${getDirectory(this.currJob)}`, 'make stage'];
Copy link
Contributor

Choose a reason for hiding this comment

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

We should remove '. /ven/bin/activate' as that will cause errors when removing the legacy dependencies from the Dockerfile. We can also remove 'make stage' as this now will never be used. In fact, this could be simplified even more by simply doing something like:

this.currJob.deployCommands = [`cd repos/${getDirectory(this.currJob)}`, `make next-gen-stage ${this.currJob.payload.pathPrefix ? `MUT_PREFIX=${this.currJob.payload.mutPrefix}` : '' }`];

}
} else {
this.currJob.payload.isNextGen = false;
this.prepStageSpecificNextGenCommands();
Copy link
Contributor

@branberry branberry Feb 7, 2024

Choose a reason for hiding this comment

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

We should update the prepStageSpecificNextGenCommands();. That method contains stuff that we can clean up/simplify. More specifically, that function depends on mutations made to the this.currJob.buildCommands property in the this.prepBuildCommands method.

Anywhere we see . /venv/bin/activate or make (parse/html/stage/deploy) we should remove that as those are meant for legacy builds.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

should make (parse/html/stage/deploy) be replaced with something else?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, should make publish be removed as well?

Copy link
Contributor

Choose a reason for hiding this comment

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

Good question. They should be replaced with the next-gen equivalent e.g. make parse should be replaced with next-gen-parse. make publish should be removed as well, good catch!

@caesarbell
Copy link
Collaborator

Probably unrelated, but figure I would ask, for my own learning purposes. With these changes would buildsWithSnooty in the pool.repo_branches collection still serve a purpose?

@anabellabuckvar
Copy link
Contributor Author

Probably unrelated, but figure I would ask, for my own learning purposes. With these changes would buildsWithSnooty in the pool.repo_branches collection still serve a purpose?

We still use it to make sure that branches that have buildWithSnooty=false doesn't show up in the Slack deploy modal

Copy link
Contributor

@branberry branberry left a comment

Choose a reason for hiding this comment

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

Looks great!

@anabellabuckvar anabellabuckvar merged commit 1a41ce3 into main Feb 12, 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