supercharge / mongodb-github-action

Use MongoDB in GitHub Actions
MIT License
222 stars 46 forks source link

[BUG] Action does not fail in case of missing image #36

Closed Segelzwerg closed 2 years ago

Segelzwerg commented 2 years ago

Recently the mongo:6.0 was not released yet. The action logged it was missing, but it did not fail it.

However, failing it directly would greatly speed up the CI, because in our case we had to wait for the time out of the integration tests afterward.

Starting single-node instance, no replica set
    - port [27017]
    - version [6.0]
    - database []
    - credentials [:]

  Unable to find image 'mongo:6.0' locally
  docker: Error response from daemon: manifest for mongo:6.0 not found: manifest unknown: manifest unknown.
  See 'docker run --help'.

for reference: https://github.com/Whist-Team/Whist-Server/runs/7482969163?check_suite_focus=true#step:17:1618

marcuspoehls commented 2 years ago

@Segelzwerg Hey Marcel, the mongo:6.0 image should be available in the Docker registry. We’re testing this action against MongoDB 6.0 as well and it works fine.

The error you’re pointing out comes from docker. This action doesn’t catch Docker issues, yet. Is your pipeline in GitHub Actions (your linked pipeline) downloading Docker images when not finding them locally?

Segelzwerg commented 2 years ago

@Segelzwerg Hey Marcel, the mongo:6.0 image should be available in the Docker registry. We’re testing this action against MongoDB 6.0 as well and it works fine.

The error you’re pointing out comes from docker. This action doesn’t catch Docker issues, yet. Is your pipeline in GitHub Actions (your linked pipeline) downloading Docker images when not finding them locally?

@marcuspoehls thanks for the quick reply, Marcus, The CI is working, but I was merely pointing out that when the actions tries to retrieve an image, which doesn't exist it should rather fail instead be marked as completed. I hope described it better this time. Let me know if you require further information.

marcuspoehls commented 2 years ago

Ah, I see. Do you know how this action can check if Docker fails to pull a non-existent image? I appreciate a pull request if you can help me out here :)

Segelzwerg commented 2 years ago

Ah, I see. Do you know how this action can check if Docker fails to pull a non-existent image? I appreciate a pull request if you can help me out here :)

Currently, I don't know, but maybe I can look into it. However, I can't give you an estimate of how long it might take.

marcuspoehls commented 2 years ago

Unrelated: this action now supports MongoDB 6.0 in version 1.8.0. It needed an update to use mongosh and #35 solved it.

ecarruda commented 2 years ago

Hey @marcuspoehls I reported on my PR mentioned to this issue, but I don't know if you are still receiving notifications because it is closed, so, maybe something happened on publishing it to the marketplace, can you check it and tell us if you want some update on README or if you are going to update version tag on Marked? image

Segelzwerg commented 2 years ago

I think I found a way. I'll make PR over the weekend.

ecarruda commented 2 years ago

I think I found a way. I'll make PR over the weekend.

everything is working good now, what kind of issue are you still having @Segelzwerg ? image

ecarruda commented 2 years ago

Taking a look on your actions @Segelzwerg i think that you only need to update your tag to the latest one 1.8.0 and that is all man :)

ecarruda commented 2 years ago

just wait for the follow up from @marcuspoehls to check what kind of change he is going to do because of the market tag that i mentioned before.

Segelzwerg commented 2 years ago

@ecarruda my issue is not related to 6.0 specifically, but when a user tries to pull a non existing image. Then action shall fail and not be marked as completed

ecarruda commented 2 years ago

ahh yes. sure. just get the docker status on the creation and exit with error

On Fri, 26 Aug 2022 at 12:17 Marcel @.***> wrote:

@ecarruda https://github.com/ecarruda my issue is not related to 6.0 specifically, but when a user tries to pull a non existing image. Then action shall fail and not be marked as completed

— Reply to this email directly, view it on GitHub https://github.com/supercharge/mongodb-github-action/issues/36#issuecomment-1228624400, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFSZOE322KRBNF7GL57AYDV3DNXXANCNFSM57WXP4NA . You are receiving this because you were mentioned.Message ID: @.***>

-- Enviado do Gmail para celular

Segelzwerg commented 2 years ago

ahh yes. sure. just get the docker status on the creation and exit with error

On Fri, 26 Aug 2022 at 12:17 Marcel @.***> wrote:

@ecarruda https://github.com/ecarruda my issue is not related to 6.0 specifically, but when a user tries to pull a non existing image. Then action shall fail and not be marked as completed

— Reply to this email directly, view it on GitHub https://github.com/supercharge/mongodb-github-action/issues/36#issuecomment-1228624400, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFSZOE322KRBNF7GL57AYDV3DNXXANCNFSM57WXP4NA . You are receiving this because you were mentioned.Message ID: @.***>

-- Enviado do Gmail para celular

Yes right. I tried local already and can make PR later if you want. But have an appointment now.