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: dockerfile and ci improvements #989

Merged
merged 12 commits into from
Jun 26, 2023

Conversation

jonaro00
Copy link
Member

@jonaro00 jonaro00 commented Jun 9, 2023

Description of change

  • Cleanup and upgrades in Dockerfiles and CI.
  • Minor fixes in builder code.

How has this been tested? (if applicable)

Tested some deploys with a minimal service.

Copy link
Contributor

@iulianbarbu iulianbarbu left a comment

Choose a reason for hiding this comment

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

Looks good @jonaro00 ! Only have a few comments with regards to some features that might become throw away work pretty soon (1/2 weeks timeframe at most). We can either merge the PR without them or wait a bit merging it until we'll be able to test it (and by that time we'll probably be really close with the the new builder). I think the best thing we can do is to address the comments and avoid merging the additional sscache and protoc from the deployer. What do you think?

deployer/prepare.sh Show resolved Hide resolved
deployer/prepare.sh Outdated Show resolved Hide resolved
@jonaro00 jonaro00 requested a review from iulianbarbu June 17, 2023 15:41
@jonaro00
Copy link
Member Author

jonaro00 commented Jun 17, 2023

I found a major optimization in caching in the Containerfile when building deployer.
I moved the handling of prepare.sh to before any shuttle code is copied, which means it is not re-run every time you change the code.
For me, this took the docker build time of "change 1 line -> make shuttle-deployer" from 4m20s to 40s! 😄

EDIT: I overlooked that the shuttle-next installation needs to be after src cache layer, so I moved that part. The improvement is ~20s now. 😕

@jonaro00 jonaro00 changed the title fix: deployer sccache, dockerfile and ci improvements fix: dockerfile and ci improvements Jun 18, 2023
@jonaro00 jonaro00 added the S label Jun 20, 2023
Copy link
Contributor

@chesedo chesedo left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @jonaro00!!

}
let profile = if release_mode { "release" } else { "dev" };
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice one 😄

Copy link
Contributor

@oddgrd oddgrd left a comment

Choose a reason for hiding this comment

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

Looks good to me two! 🥳 Just two very minor questions

Containerfile Outdated Show resolved Hide resolved
Containerfile Outdated Show resolved Hide resolved
@oddgrd oddgrd merged commit 947d6a7 into shuttle-hq:main Jun 26, 2023
@jonaro00 jonaro00 deleted the fix/docker-ci-deployer branch June 26, 2023 10:35
AlphaKeks pushed a commit to AlphaKeks/shuttle that referenced this pull request Jul 21, 2023
* cleanup in dockerfiles and ci

* minor builder fixes

* add sccache to deployer + cleanup

* fmt

* docs: install with --locked

* Add comments, move arg statements

* Leave out the sccache

* clarify

* Run prepare script before loading src cache

* Delay src-dependent preparation to after cache

* explicit docker.io, move curl installation

---------

Co-authored-by: oddgrd <[email protected]>
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.

4 participants