only use our homegrown downloader for BC images [WIP] #166
Conversation
images of snapshot builds are now pushed to docker.elastic.co, so we can use that. Also, only build services that are actually used in this run.
|
||
# pull any images | ||
image_services = [name for name, service in compose["services"].items() if 'image' in service] | ||
subprocess.call(["docker-compose", "-f", docker_compose_path.name, "pull"] + image_services) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why separate the build and pull commands? Won't build without specifying the list of services pull anything needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docker-compose build
doesn't do anything for image-only services. And docker-compose up
doesn't have a --pull
flag (docker/compose#3574 if you want to laugh/cry/despair). So AFAIK, separating it up is the only way we can do this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha! And this is needed because previously we didn't have images from a registry that would change but now we do - this is great then, thanks for explanation.
@@ -265,21 +265,15 @@ class StackService(object): | |||
|
|||
def image_download_url(self): | |||
# Elastic releases are public | |||
if self.release: | |||
if not self.bc: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to get this merged soon we could add a version limit here too, eg self.at_least_version('6.5')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6.3.3 and 6.4 snapshots are now also available in the registry. I guess that should be fine? For 6.2 we use --release
anyway, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's great news. Agreed this should be fine as-is.
images of snapshot builds are now pushed to docker.elastic.co, so we can
use that.
Also, only build services that are actually used in this run.
6.4 and 6.3 snapshots haven't been pushed so far, so waiting to merge this