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

perf(docker): build executable #764

Merged
merged 14 commits into from
Mar 4, 2023
Merged

perf(docker): build executable #764

merged 14 commits into from
Mar 4, 2023

Conversation

kanadgupta
Copy link
Member

@kanadgupta kanadgupta commented Feb 15, 2023

🧰 Changes

I initially opened this PR with the goal of automatically publishing these docker images to the GitHub Container Registry, but in testing it I discovered that these images were so large that the GitHub Action time savings were basically a wash (the benefits were only realized in workflows that ran rdme more than once due to the image caching).

I decided to try and use this PR to instead optimize our images as much as possible, so now we create an executable using pkg and create a tiny image that only runs that. Was able to reduce our image size by ~90% 🥳 the build time is higher now, but once we publish to the registry our users shouldn't have to deal with that.

Old image size: 639.63267 MB

New image size1: 71.004255 MB 📉

🧬 QA & Testing

If the GitHub Action dry runs continue to work, we should be good to go!

Footnotes

  1. This is the size of the image when I built it on my Mac but I imagine the GitHub Action runner image is roughly the same?

@kanadgupta kanadgupta changed the title perf: container registry perf(docker): build executable Mar 3, 2023
@kanadgupta kanadgupta added the performance Issues with performance label Mar 4, 2023
@kanadgupta kanadgupta marked this pull request as ready for review March 4, 2023 00:06
Copy link
Member

@erunion erunion left a comment

Choose a reason for hiding this comment

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

nice

@kanadgupta kanadgupta merged commit af2dbce into next Mar 4, 2023
@kanadgupta kanadgupta deleted the container-registry branch March 4, 2023 00:27
kanadgupta pushed a commit that referenced this pull request Mar 4, 2023
# [8.6.0-next.13](v8.6.0-next.12...v8.6.0-next.13) (2023-03-04)

### Performance Improvements

* **docker:** build executable ([#764](#764)) ([af2dbce](af2dbce))

[skip ci]
kanadgupta pushed a commit that referenced this pull request Mar 29, 2023
# [8.6.0](v8.5.0...v8.6.0) (2023-03-29)

### Bug Fixes

* bad merge ([e15c574](e15c574))
* bump node version in release workflow ([7f3158f](7f3158f))
* does this work? ([c81e432](c81e432))
* memory leak in large file handling within openapi-parser ([#784](#784)) ([1b1cc00](1b1cc00))
* next channel ([ce4e494](ce4e494))
* **openapi:** yaml strings would be improperly parsed as Date objects ([#779](#779)) ([72e75cb](72e75cb))
* rebuild prior to npm publish ([29b9ec6](29b9ec6))
* reformat github release header ([38c5625](38c5625))
* reformat header again ([bd2e1a2](bd2e1a2))
* remove some of the package scripts ([3eb52fd](3eb52fd))
* remove unnecessary config ([c22889c](c22889c))
* run tests but NOT release workflow on release commits ([24f885e](24f885e))
* temporarily disable release workflow ([a935268](a935268))
* try rearranging steps like this ([cac0c1d](cac0c1d))
* try this approach to lifecycle events ([4e5ecff](4e5ecff))
* try this as an alternative to @semantic-release/github ([8c343a0](8c343a0))
* try this to see if branch protections work ([f314c3f](f314c3f))
* turns out these rules weren't redundant ([f9f82f1](f9f82f1))
* upgrading `oas-normalize` to move to our `postman-to-openapi` fork ([#776](#776)) ([ee8ce0a](ee8ce0a))

### Features

* add git + changelog plugins ([85e4bfd](85e4bfd))
* container registry ([#777](#777)) ([d193416](d193416)), closes [/github.com//pull/777#discussion_r1145516673](https://github.com//github.com/readmeio/rdme/pull/777/issues/discussion_r1145516673) [/github.com//pull/777#discussion_r1145528308](https://github.com//github.com/readmeio/rdme/pull/777/issues/discussion_r1145528308)
* docker (again) ([#763](#763)) ([2144572](2144572)), closes [#746](#746)
* empty commit to trigger release ([3e3c112](3e3c112))
* fix comment ([076cfbf](076cfbf))

### Performance Improvements

* **docker:** build executable ([#764](#764)) ([af2dbce](af2dbce))

### Reverts

* Revert "feat: drop duplicative tag" ([f9fe6c6](f9fe6c6))
* bring workflow name back ([c07495a](c07495a))
* don't set header for changelog ([194489e](194489e))
* restore release workflow ([9f6bbc9](9f6bbc9))
* ugh here we go again ([0b1e429](0b1e429))

[skip ci]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Issues with performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants