allow features option live reloading#37692
Conversation
|
ptal @thaJeztah @tiborvass |
There was a problem hiding this comment.
remove this if to be able to unset features ?
ad3d477 to
2472170
Compare
Codecov Report
@@ Coverage Diff @@
## master #37692 +/- ##
=========================================
Coverage ? 36.03%
=========================================
Files ? 609
Lines ? 45063
Branches ? 0
=========================================
Hits ? 16240
Misses ? 26592
Partials ? 2231 |
97a1f12 to
f634ae4
Compare
|
@tiborvass I've updated the PR and verified this would actually work. |
f634ae4 to
c11a34e
Compare
c11a34e to
ac14e27
Compare
|
@tonistiigi or @thaJeztah can you help review this? |
thaJeztah
left a comment
There was a problem hiding this comment.
one nit, but looks good otherwise
There was a problem hiding this comment.
Better to name this Features() instead of GetFeatures(); golang convention is to not use a Get prefix for getters; https://golang.org/doc/effective_go.html#Getters
Signed-off-by: Anda Xu <anda.xu@docker.com>
ac14e27 to
58a75ce
Compare
| builderVersion := BuilderVersion(*br.features) | ||
| // check if the builder feature has been enabled from daemon as well. | ||
| if buildOptions.Version == types.BuilderBuildKit && br.builderVersion != "" && br.builderVersion != types.BuilderBuildKit { | ||
| if buildOptions.Version == types.BuilderBuildKit && builderVersion != "" && builderVersion != types.BuilderBuildKit { |
There was a problem hiding this comment.
@tiborvass As discussed offline, this value should only apply as a hint to the client on negotiation on ping, not override a daemon behavior.
- What I did
reloadFeaturesso that the changes offeaturesfield in daemon.json can be live reloaded.featuresto the rest of places where it is being used.- How I did it
- How to verify it
First with
buildkitturned on indaemon.jsonwe hit the

/_pingendpoint to verify,Builder-Version: 2Now turn
buildkitoffand run
sudo kill -s SIGHUP <dockerd-PID>then verify with

/_pingagain, it showsBuilder-Version: 1- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)
Signed-off-by: Anda Xu anda.xu@docker.com