market
market copied to clipboard
Enforce docker container checksum in publish form
Fixes #1672 .
Changes proposed in this PR:
- get container checksum from docker hub api using the existing proxy
- allow users add manually the container checksum for images not hosted on docker hub and for private images where we can't fetch the value
- fetch the checksum for our default container images
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
market | ✅ Ready (Inspect) | Visit Preview | Oct 10, 2022 at 1:20PM (UTC) |
fetches everything correctly in some quick tests. Some findings:
-
When switching in UI between node:latest & python:latest, 4 of the same requests with the same response are happening. So let's double check if we can reduce those requests.
-
Tried with the example in the placeholder and got:
As latest
does not exist for this, let's use oceanprotocol/algo_dockers:node-vibrant
as placeholder example.
Because then all is good:

UI for success path is good enough considering this is advanced feature, one small addition could be that in above success case, the filled Docker Image Checksum becomes readOnly
.
- The always fun error states. This is really confusing for an image which does not exist, I typed in
oceanprotocol/hello
:

So in this case I would expect UI telling me this image does not exist. And no empty Image: & Tag: But not sure if we can reliably detect if there's a Docker image behind a URL? Easy for shortcut notation oceanprotocol/hello
but not with a full URL I suppose.
So we would need some error state for cases where we can detect that it's not a Docker image
fetches everything correctly in some quick tests. Some findings:
- When switching in UI between node:latest & python:latest, 4 of the same requests with the same response are happening. So let's double check if we can reduce those requests.
- Tried with the example in the placeholder and got:
As
latest
does not exist for this, let's useoceanprotocol/algo_dockers:node-vibrant
as placeholder example.Because then all is good:
UI for success path is good enough considering this is advanced feature, one small addition could be that in above success case, the filled Docker Image Checksum becomes
readOnly
.
- The always fun error states. This is really confusing for an image which does not exist, I typed in
oceanprotocol/hello
:So in this case I would expect UI telling me this image does not exist. And no empty Image: & Tag: But not sure if we can reliably detect if there's a Docker image behind a URL? Easy for shortcut notation
oceanprotocol/hello
but not with a full URL I suppose.So we would need some error state for cases where we can detect that it's not a Docker image
Think i cover most or all of the things mentioned above 😃
Deploy Preview for market-oceanprotocol ready!
Name | Link |
---|---|
Latest commit | c030f8ec7ea159a37ff6f2b14057a372f25cb4dc |
Latest deploy log | https://app.netlify.com/sites/market-oceanprotocol/deploys/63441bbc6df4e40008c286e0 |
Deploy Preview | https://deploy-preview-1696--market-oceanprotocol.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
The only issue that i found is that we don't specify that the validation works only for docker hub. So based on the placeholder i write my custom url and then click 'Use' . I get an error where it tells me tot check my url
The only issue that i found is that we don't specify that the validation works only for docker hub. So based on the placeholder i write my custom url and then click 'Use' . I get an error where it tells me tot check my url
this should have covered the following scenarios:
- if docker image inserted is a url : we we do a head query on that url to see if it is a valid url (think this is the most we can do in this case), if that succeeds we inform the user to add manually the container checksum, otherwise we display the error you've got
- if not an url, we hit docker-hub via our docker-hub-proxy, if image-tag not found we display that error, if found we add the checksum and disable that input field
But i think something is wrong with the url thingy, checking it
Ok, after further discussion there will be no checks/validation for images from custom repos. For example : docker pull quay.io/startx/mariadb
in the field you put just quay.io/startx/mariadb
a url doesn't work and you can't even check it. If it's custom we can't really validate, the user just need to input the right values for name and checksum.
Docker Image URL - > Custom Docker Image ( there is no url involved, never) Remove the url part from the placeholder.
Code Climate has analyzed commit c030f8ec and detected 0 issues on this pull request.
The test coverage on the diff in this pull request is 0.0% (50% is the threshold).
This pull request will bring the total coverage in the repository to 4.0% (0.0% change).
View more on Code Climate.