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

Fix codebuild build #235

Merged
merged 3 commits into from
Jun 28, 2023
Merged

Fix codebuild build #235

merged 3 commits into from
Jun 28, 2023

Conversation

mfitz
Copy link
Contributor

@mfitz mfitz commented Jun 28, 2023

The Problem

Although the Docker image builds locally, it has been failing consistently in CodeBuild for over a week in a way that I have been unable to reproduce outside of CodeBuild. The errors looked exactly like the ones described here, even though that is a CircleCI build rather than CodeBuild.

The Solution

Also as described here, the solution was to switch to a different base image from the same provider.

Validation of the Solution

  • Successfully built the Docker image locally
  • The CI/CD pipeline kicked in on the branch and ultimately led to our first successful CodeBuild build & push to ECR in a week or so: Screenshot 2023-06-28 at 02 22 23
  • The CodeBuild job spec includes a basic smoke test of the Docker image that involves launching a container from the image and then running the Elara unit tests inside the container, as a way to validate that the dependencies are all present and correct
  • The compressed size of the Docker image in ECR is very marginally bigger than it was with the previous base image: Screenshot 2023-06-28 at 02 33 55
  • I haven't run any Elara commands in a container launched from the new image; what would be some good commands I could use to verify that Elara runs properly in the container?

Copy link
Contributor

@KasiaKoz KasiaKoz left a comment

Choose a reason for hiding this comment

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

Not sure about good commands to run elara in container, maybe something from a matesto pipeline?

@fredshone
Copy link
Contributor

fredshone commented Jun 28, 2023

you could run smoke tests? sh scripts/example_configs_smoke_test.sh

@mfitz
Copy link
Contributor Author

mfitz commented Jun 28, 2023

@KasiaKoz I don't know why I didn't think of using Matesto for smoke testing this new Elara image in a pipeline, but that's exactly what I should have done. Anyway, I did it, and all was well:

Screenshot 2023-06-28 at 10 33 12 Screenshot 2023-06-28 at 10 33 23

@KasiaKoz
Copy link
Contributor

I forget about matesto too sometimes 😭

@mfitz
Copy link
Contributor Author

mfitz commented Jun 28, 2023

@fredshone good suggestion. I ran the smoke tests inside a container launched from the new Docker image (BTW the smoke test script must be run with bash, rather than sh, because it uses the popd and pushd commands and they are bash-specific):

Screenshot 2023-06-28 at 10 58 32

@mfitz mfitz merged commit 92a9d49 into main Jun 28, 2023
1 check passed
@mfitz mfitz deleted the fix_codebuild_build branch June 28, 2023 10:01
@mfitz
Copy link
Contributor Author

mfitz commented Jun 28, 2023

I forget about matesto too sometimes 😭

You'd think I'd remember it though, eh? 🤦

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.

None yet

4 participants