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

Fix unknown/unknown images #22

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/kuksa-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ jobs:
tags: |
${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# Provenance to solve that an unknown/unkown image is shown on ghcr.io
# Same problem as described in https://github.com/orgs/community/discussions/45969
provenance: false

- name: Build ephemeral KUKSA command line client docker and push to ttl.sh
if: needs.check_ghcr_push.outputs.push == 'false'
Expand All @@ -103,6 +106,9 @@ jobs:
push: true
tags: "ttl.sh/kuksa-python-sdk/kuksa-client-${{github.sha}}"
labels: ${{ steps.meta.outputs.labels }}
# Provenance to solve that an unknown/unkown image is shown on ghcr.io
# Same problem as described in https://github.com/orgs/community/discussions/45969
provenance: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it does not hurt but ttl.sh do we build for different archs?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see https://github.com/eclipse-kuksa/kuksa-python-sdk/actions/runs/8175139577 its just for one architecture so no need to add this line I guess. Does not hurt though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you look a few lines up we do build for both arm and amd. When I do an inspect of the old build you refer to I get four items:


erik@debian4:~/kuksa-gps-provider$ docker manifest inspect ttl.sh/kuksa-python-sdk/kuksa-client-a056076f650bfc8452a2651e5442d5bbd33acc51
{
   "schemaVersion": 2,
   "mediaType": "application/vnd.oci.image.index.v1+json",
   "manifests": [
      {
         "mediaType": "application/vnd.oci.image.manifest.v1+json",
         "size": 3136,
         "digest": "sha256:bf2003ec7078ff3eee2450210af448693c51b1d1097e4a90ebc9fc5a1bb84d83",
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.oci.image.manifest.v1+json",
         "size": 3136,
         "digest": "sha256:0af1532d22dcdc3509e6a9c4f3804af0009c8bcce794dd07a824ccbf8b83d11d",
         "platform": {
            "architecture": "arm64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.oci.image.manifest.v1+json",
         "size": 567,
         "digest": "sha256:ac2cc62babe4e524e7eee21c7dc7783cf561dbf7b3ad62abac30fd1464c91560",
         "platform": {
            "architecture": "unknown",
            "os": "unknown"
         }
      },
      {
         "mediaType": "application/vnd.oci.image.manifest.v1+json",
         "size": 567,
         "digest": "sha256:336855f6c320f11bf29a30dbbb85fc012af4b5622868a0dc7690ac0b97dde3c3",
         "platform": {
            "architecture": "unknown",
            "os": "unknown"
         }
      }
   ]
}

But if looking at the build for this PR I only see the two expected ones.


erik@debian4:~/kuksa-gps-provider$ docker manifest inspect ttl.sh/kuksa-python-sdk/kuksa-client-1b4b97f2a953ea0480fd9c2722535039b698be0f
{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
   "manifests": [
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 3628,
         "digest": "sha256:9350815044bb8a15a42b8c07716d77373f65f6a603e850c258527b6ded7a2829",
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 3628,
         "digest": "sha256:74a9f80effb9139a4f4ee5105c1b853a070e38c4cd48916862c3c4a6a7d92e70",
         "platform": {
            "architecture": "arm64",
            "os": "linux"
         }
      }
   ]
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, but then I do not know how to link more ttl.sh images in the summary page but wouldn't it be nice to use them both? I do not see which architecture it is at the moment https://github.com/eclipse-kuksa/kuksa-python-sdk/actions/runs/8325981073 I guess then this PR looks good.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "Moin!" message is quite stupid, see https://github.com/eclipse-kuksa/kuksa-actions/blob/main/post-container-location/action.yml

I guess it would be quite easy to manually specify/state architectures that are supposed to exist, by adding a parameter like

 - name: Posting temporary container location
      uses: eclipse-kuksa/kuksa-actions/post-container-location@2
      with:
        image: ttl.sh/kuksa-python-sdk/kuksa-client-${{github.sha}} 
        platforms: |
          linux/amd64
          linux/arm64

... possibly somewhat more complex if we want to handle it dynamically by queering ttl.sh for available architectures

Anyhow not part of this PR


# Shall later be a kuksa-actions call
- name: Posting temporary container location
Expand Down