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

CLI attempts to pull "local" Docker images (and fails) #119

Open
awrichar opened this issue Nov 5, 2021 · 1 comment
Open

CLI attempts to pull "local" Docker images (and fails) #119

awrichar opened this issue Nov 5, 2021 · 1 comment

Comments

@awrichar
Copy link
Contributor

awrichar commented Nov 5, 2021

If you point the CLI to a local manifest with -m manifest.json, and that manifest contains a local Docker definitions such as:

  "tokens-erc1155": {
    "image": "ghcr.io/hyperledger/firefly-tokens-erc1155",
    "local": true
  }

When running ff start, the CLI still pulls the latest image from the server, overwriting the local image.

This seems to be due to a duplication in the PullStack method here. It first iterates the images defined in the manifest, and does properly skip those tagged as local. But then it goes on to pull the latest for all images defined by the blockchain and token plugins, defeating the purpose of the earlier loop.

Side node: because it first pulls all the images defined in the manifest, it will pull images even if you're ultimately not using them (ie it pulls fabconnect even if your blockchain provider is Ethereum).

Conclusion from all this: we need better "pull" logic to intersect the info from these two places - it should only pull the Dockers actually used in the stack, but it should also honor the versions and "local" flag defined for those images in the manifest.

awrichar added a commit to kaleido-io/firefly-cli that referenced this issue Feb 8, 2022
With the addition of Stack.VersionManifest, that manifest is now the de facto
source of all images for the stack. There is no need to iterate over the
plugins' Docker service definitions a second time (which are now also generated
from the same VersionManifest).

Fixes hyperledger#119

Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
@awrichar
Copy link
Contributor Author

awrichar commented Feb 8, 2022

Came back to take a second look at this and uploaded a prospective fix in #144.

However, I wanted to note that the behavior has changed since I last looked. As of #111, it seems we don't pull at all during ff start <stack>. Previously the default was to pull all images explicitly during start, which could be overridden with --no-pull - but this option is gone now, and no pulls are done except with the new, separate ff pull <stack> command. The proposed fix will cause ff pull to work correctly now, and ff start will continue to not perform pulls (unless the underlying docker-compose command pulls automatically due to an image not being found).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant