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

docker label io.artifacthub.package.readme-url not working for github #3975

Closed
jon-nfc opened this issue Aug 11, 2024 · 2 comments
Closed

docker label io.artifacthub.package.readme-url not working for github #3975

jon-nfc opened this issue Aug 11, 2024 · 2 comments

Comments

@jon-nfc
Copy link

jon-nfc commented Aug 11, 2024

Describe the bug

Artifact hub is reporting required metadata field not provided: io.artifacthub.package.readme-url which is incorrect.

navigating to https://raw.githubusercontent.com/nofusscomputing/centurion_erp/development/README.md does indeed return the markdown in plain text, however Github appears to be loading js as well. Unknown if the latter is causing the issue.

The image does contain the required tags. only change from working to not working is adjustment to the readme-url from gitlab raw to github raw.

To Reproduce
Steps to reproduce the behavior:

  1. using nofusscomputing/centurion-erp:dev as container on artifacthub
  2. artifacthub reports required metadata field not provided: io.artifacthub.package.readme-url

Expected behavior
A clear and concise description of what you expected to happen.

that the image be processed

Screenshots
If applicable, add screenshots to help explain your problem.

Screenshot from 2024-08-11 14-45-40

Screencast.from.2024-08-11.14-53-57.webm

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

from image docker inspect nofusscomputing/centurion-erp:dev

            "Labels": {
                "io.artifacthub.package.license": "MIT",
                "io.artifacthub.package.maintainers": "[{\"name\":\"No Fuss Computing\",\"email\":\"helpdesk@nofusscomputing.com\"}]",
                "io.artifacthub.package.readme-url": "https://raw.githubusercontent.com/nofusscomputing/centurion_erp/development/README.md",
                "org.opencontainers.image.created": "2024-08-10T11:23:34+00:00",
                "org.opencontainers.image.description": "An ERP with a focus on ITSM and automation",
                "org.opencontainers.image.revision": "40e3078a5838277d54a75c7211cd0700ec467108",
                "org.opencontainers.image.source": "https://github.com/nofusscomputing/centurion_erp",
                "org.opencontainers.image.title": "Centurion ERP",
                "org.opencontainers.image.vendor": "No Fuss Computing"
            }
@tegioz
Copy link
Collaborator

tegioz commented Aug 12, 2024

Hi @jon-nfc

Metadata for container images can be provided in different ways depending on if the image has an index or the manifest format used:

(from https://artifacthub.io/docs/topics/repositories/container-images/)

metadata

At the moment your situation is the highlighted one.

(no annotations at the index level)

% crane manifest nofusscomputing/centurion-erp:dev | jq                                    
{
  "schemaVersion": 2,
  "mediaType": "application/vnd.oci.image.index.v1+json",
  "manifests": [
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "digest": "sha256:0de931eb7db5b5fdff0d34d94554631c35f2846464ab17446455f91dd5097a03",
      "size": 2925,
      "platform": {
        "architecture": "amd64",
        "os": "linux"
      }
    },
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "digest": "sha256:4491e003b4e96ecc6a446c2ff3fe559b5a36fce858c377a3b2ecaa4cd37d483d",
      "size": 2925,
      "platform": {
        "architecture": "arm64",
        "os": "linux"
      }
    }
  ]
}

(annotations found in the image)

~ % crane manifest --platform linux/amd64 nofusscomputing/centurion-erp:dev | jq .annotations
{
  "org.opencontainers.image.created": "2024-08-12T06:02:21+00:00",
  "org.opencontainers.image.description": "a DESCRIPTION for multi-arch images",
  "org.opencontainers.image.revision": "9d5464b5a989f5095a099fcb081a9422b576cefa",
  "org.opencontainers.image.source": "https://github.com/nofusscomputing/centurion_erp"
}

(labels found in the image)

~ % crane config --platform linux/amd64 nofusscomputing/centurion-erp:dev | jq .config.Labels
{
  "io.artifacthub.package.license": "MIT",
  "io.artifacthub.package.maintainers": "[{\"name\":\"No Fuss Computing\",\"email\":\"helpdesk@nofusscomputing.com\"}]",
  "io.artifacthub.package.readme-url": "https://raw.githubusercontent.com/nofusscomputing/centurion_erp/development/README.md",
  "org.opencontainers.image.created": "2024-08-12T06:02:21+00:00",
  "org.opencontainers.image.description": "An ERP with a focus on ITSM and automation",
  "org.opencontainers.image.revision": "9d5464b5a989f5095a099fcb081a9422b576cefa",
  "org.opencontainers.image.source": "https://github.com/nofusscomputing/centurion_erp",
  "org.opencontainers.image.title": "Centurion ERP",
  "org.opencontainers.image.vendor": "No Fuss Computing"
}

In this case, as described in the docs, annotations take precedence. They are not merged, but even if they were, the result probably wouldn't be the expected one, as the description used would be the one present in the annotations.

Hope this helps 🙂

@tegioz tegioz closed this as completed Aug 12, 2024
@tegioz tegioz removed the bug label Aug 12, 2024
@jon-nfc
Copy link
Author

jon-nfc commented Aug 12, 2024

ah, thanks. missed that!

jon-nfc added a commit to nofusscomputing/action_docker that referenced this issue Aug 12, 2024
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

No branches or pull requests

2 participants