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

Remove vitess/base and vitess/k8s Docker images #15620

Merged
merged 10 commits into from
Apr 3, 2024

Conversation

frouioui
Copy link
Member

@frouioui frouioui commented Apr 2, 2024

Description

This PR removes the vitess/base and vitess/k8s images. From now on and in most cases the "root" image is vitess/bootstrap for everything. Binary-specific images will be built from the vitess/lite image.

Related Issue(s)

Checklist

  • "Backport to:" labels have been added if this change should be back-ported to release branches
  • If this change is to be back-ported to previous releases, a justification is included in the PR description
  • Tests were added or are not required
  • Did the new or modified tests pass consistently locally and on CI?
  • Documentation was added or is not required

Signed-off-by: Florent Poinsard <[email protected]>
Copy link
Contributor

vitess-bot bot commented Apr 2, 2024

Review Checklist

Hello reviewers! 👋 Please follow this checklist when reviewing this Pull Request.

General

  • Ensure that the Pull Request has a descriptive title.
  • Ensure there is a link to an issue (except for internal cleanup and flaky test fixes), new features should have an RFC that documents use cases and test cases.

Tests

  • Bug fixes should have at least one unit or end-to-end test, enhancement and new features should have a sufficient number of tests.

Documentation

  • Apply the release notes (needs details) label if users need to know about this change.
  • New features should be documented.
  • There should be some code comments as to why things are implemented the way they are.
  • There should be a comment at the top of each new or modified test to explain what the test does.

New flags

  • Is this flag really necessary?
  • Flag names must be clear and intuitive, use dashes (-), and have a clear help text.

If a workflow is added or modified:

  • Each item in Jobs should be named in order to mark it as required.
  • If the workflow needs to be marked as required, the maintainer team must be notified.

Backward compatibility

  • Protobuf changes should be wire-compatible.
  • Changes to _vt tables and RPCs need to be backward compatible.
  • RPC changes should be compatible with vitess-operator
  • If a flag is removed, then it should also be removed from vitess-operator and arewefastyet, if used there.
  • vtctl command output order should be stable and awk-able.

@vitess-bot vitess-bot bot added NeedsBackportReason If backport labels have been applied to a PR, a justification is required NeedsDescriptionUpdate The description is not clear or comprehensive enough, and needs work NeedsIssue A linked issue is missing for this Pull Request NeedsWebsiteDocsUpdate What it says labels Apr 2, 2024
@frouioui frouioui added Type: Enhancement Logical improvement (somewhere between a bug and feature) Component: Docker and removed NeedsDescriptionUpdate The description is not clear or comprehensive enough, and needs work NeedsWebsiteDocsUpdate What it says NeedsIssue A linked issue is missing for this Pull Request NeedsBackportReason If backport labels have been applied to a PR, a justification is required labels Apr 2, 2024
@github-actions github-actions bot added this to the v20.0.0 milestone Apr 2, 2024
Comment on lines -368 to -370
# Release a version.
# This will generate a tar.gz file into the releases folder with the current source
release: docker_base
Copy link
Member Author

Choose a reason for hiding this comment

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

I removed docker/release and the corresponding make command as it seems to not be used and very ancient.

Copy link
Member

Choose a reason for hiding this comment

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

Agreed. It was being used by the pre-GH release process.

Copy link

codecov bot commented Apr 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.12%. Comparing base (37cc00a) to head (9bc5f23).
Report is 12 commits behind head on main.

❗ Current head 9bc5f23 differs from pull request most recent head a7d69df. Consider uploading reports for the commit a7d69df to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15620      +/-   ##
==========================================
+ Coverage   68.03%   68.12%   +0.08%     
==========================================
  Files        1561     1556       -5     
  Lines      195526   194984     -542     
==========================================
- Hits       133023   132827     -196     
+ Misses      62503    62157     -346     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Florent Poinsard <[email protected]>
@@ -139,7 +139,7 @@ endif
install: build
# binaries
mkdir -p "$${PREFIX}/bin"
cp "$${VTROOTBIN}/"{mysqlctl,mysqlctld,vtorc,vtadmin,vtctld,vtctlclient,vtctldclient,vtgate,vttablet,vtbackup} "$${PREFIX}/bin/"
cp "$${VTROOTBIN}/"{mysqlctl,mysqlctld,vtorc,vtadmin,vtctl,vtctld,vtctlclient,vtctldclient,vtgate,vttablet,vtbackup,vtexplain} "$${PREFIX}/bin/"
Copy link
Member Author

Choose a reason for hiding this comment

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

The image vitess/k8s now relies on vitess/lite, which runs make install. In vitess/k8s we copy these binaries so they are available for the binary-specific images. I had to add the missing binaries that we use in vitess/k8s.

Signed-off-by: Florent Poinsard <[email protected]>
Comment on lines -43 to -44
COPY --from=base /vt/bin/vtctl /vt/bin/
COPY --from=base /vt/bin/mysqlctl /vt/bin/
Copy link
Member Author

Choose a reason for hiding this comment

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

Those two binaries are already present in vitess/lite no need to copy them and no need for a base or bootstrap image.

@frouioui frouioui marked this pull request as ready for review April 3, 2024 18:22
Copy link
Member

@deepthi deepthi left a comment

Choose a reason for hiding this comment

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

I'm good with this. I believe historically the k8s images were never migrated to use lite instead of base and this just fixes that. I can't think of a reason why someone would want to use base any more.
Let's get @derekperkins's take on this before we merge.

@deepthi deepthi added the release notes (needs details) This PR needs to be listed in the release notes in a dedicated section (deprecation notice, etc...) label Apr 3, 2024
@deepthi
Copy link
Member

deepthi commented Apr 3, 2024

Going through the checklist - does this affect vitess-operator in any way?

Copy link
Member

@derekperkins derekperkins left a comment

Choose a reason for hiding this comment

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

LGTM. We could go even further I think and eliminate the k8s container, and build all of the subsequent containers from lite directly. It originally existed mostly because lite didn't have everything, and base was too large to work with. Probably best to do that in a separate PR

@deepthi
Copy link
Member

deepthi commented Apr 3, 2024

If no one is using these images we may be able to skip the release notes too.

@frouioui
Copy link
Member Author

frouioui commented Apr 3, 2024

Going through the checklist - does this affect vitess-operator in any way?

I don't think it does, even for our tests. But if it does we will know soon enough.

Signed-off-by: Florent Poinsard <[email protected]>
@frouioui
Copy link
Member Author

frouioui commented Apr 3, 2024

We could go even further I think and eliminate the k8s container, and build all of the subsequent containers from lite directly

Achieved via 0fa9fdb.

@frouioui frouioui changed the title Remove vitess/base Docker image Remove vitess/base and vitess/k8s Docker images Apr 3, 2024
Signed-off-by: Florent Poinsard <[email protected]>
@frouioui
Copy link
Member Author

frouioui commented Apr 3, 2024

If no one is using these images we may be able to skip the release notes too.

It does not hurt to add a mention in the release notes 😃 Done via a7d69df

@frouioui frouioui removed the release notes (needs details) This PR needs to be listed in the release notes in a dedicated section (deprecation notice, etc...) label Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Docker Type: Enhancement Logical improvement (somewhere between a bug and feature)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove vitess/base and build binary-specific images from vitess/lite
4 participants