Comments (5)
Can you explain in more detail what you think it's doing versus what it's actually doing?
from linkerd2.
This comment at the top of docker_maybe_build
:
If the tag is 'latest', an image will always be built.
...but my reading of that function, where DOCKER_FORCE_BUILD
is not set, is that it will always rely on already built images if available:
if [ -z "${DOCKER_FORCE_BUILD:-}" ]; then
docker pull "${repo}:${tag}" >/dev/null 2>&1 || true
for t in $(docker_tags "${repo}:${tag}") ; do
if [ "$t" = "$tag" ]; then
docker tag "${repo}:${tag}" "${repo}:latest" >/dev/null
echo "${repo}:${tag}"
return 0
fi
done
fi
from linkerd2.
Ahh yeah, the latest behavior was changed without updating the comment, I believe.
Relying only on docker caching would be nice, though I think that's going to be a bit tricky.
In the short-term, i'd suggest that we ensure the scripts are commented appropriately -- I'm happy to help with that.
If we're going to retool all of the build stuff, we need to be clear in scoping/motivating that work. I don't think it should be a priority unless the current tools are actively causing problems.
from linkerd2.
Am not sure @siggy is suggesting retooling all of our build stuff, but it would be nice to fix the script with regard to the latest tag. I do think it always makes sense to rebuild the latest tag, instead of potentially pulling whatever's currently tagged as latest on gcr.io.
from linkerd2.
Okay, I think I understand now. Please confirm this is the problem:
When running bin/docker-build latest
without DOCKER_FORCE_BUILD
, we'll pull latest from gcr.io, which probably isn't what's intended.
The behavior changed when we stopped using latest as the default tag; and so the check was a bit pointless, since you have to try to do this.
The intended workflow is bin/docker-build && bin/docker-retag-all $(bin/root-tag) latest
, which builds images with the git tag and then sets latest to that.
if you don't want to commit between builds, the recommendation would be DOCKER_FORCE_BUILD=1 bin/docker-build latest
If we find that there are larger automatable common workflows around these scripts, we should definitely script it up.
I'm not sure that we should treat latest as a special tag at this point in the code, as there can be other symbolic/floating tags that we can't account for here, and so i think we need to make those determinations in the place where we choose the tag and not down in the guts of the helpers.
from linkerd2.
Related Issues (20)
- After node restart linkerd-cni pod hast to be restarted sometimes HOT 4
- Default Server policy on linkerd-jaeger prohibits jaeger-ui access HOT 1
- Headless endpoint mirrors are incorrectly cleaned up as part of GC
- timestamp is in weird format HOT 2
- BadSignature error when using ec with key_bits 512 (works with 256) HOT 1
- CPU Spikes when upgrading to 2.4.10 from 2.4.0 HOT 3
- Linkerd CNI pods not aware about the OIDC signing key auto-rotation by AKS|
- PodMonitor linkerd-proxy - Creates duplicate timestamp metric labels
- `linkerd-destination` OOMKilled due to discovery spike in linkerd P2P multicluster, renders cluster inoperable HOT 5
- HTTPRoute intermittently fails to distribute traffic HOT 6
- Intermittent routing failures with HTTPRoute HOT 12
- Linkerd-proxy logging full header contents of incoming http requests for log level debug and trace. HOT 3
- Allow port ranges in dynamic authorization policy resources
- Prometheus metrics scrapes of `linkerd-proxy` are not TLS protected (occassionally) HOT 6
- Change default `cr.l5d.io` to `ghcr.io`? HOT 1
- Linkerd Multi-Cluster service-mirroring to give option to mirror EndpointSlices as well HOT 3
- Helm upgrade always changing due to trust root? HOT 2
- Connection refused randomly for pairs of pods HOT 4
- Destination container in the linkerd-destination pod panics when using deployments with headless services
- Connection refused (os error 111) error.sources=[Connection refused (os error 111)] HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linkerd2.