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

Ensure shas retrieved by workflow are ordered by date #394

Merged
merged 1 commit into from
Jan 15, 2024

Conversation

adam-cattermole
Copy link
Member

The http-request-action@master is deprecated in favour of main/v1.

The response from this action does not seem to be ordered correctly (at least for the policy-controller), when curling locally the order of the tags is by date, but the action seems to be consistently returning the tags in the incorrect order:

"tags": {
    "2451921": {
        "name": "2451921",
        "size": 29951865,
        "last_modified": "Thu, 30 Nov 2023 16:44:16 -0000",
        "manifest_digest": "sha256:e2ea6a7340dd61e55dbef4f89fefc860f64b1b444f03a1ffd02058abaa667323"
    },
    "3019274": {
        "name": "3019274",
        "size": 28848877,
        "last_modified": "Mon, 13 Nov 2023 12:17:30 -0000",
        "manifest_digest": "sha256:861bd416069c8659c0d69e24f6b1ad6945b8c45a75a4efcef9f503f6cffeeac0"
    },
    "4390036": {
        "name": "4390036",
        "size": 29951865,
        "last_modified": "Thu, 30 Nov 2023 09:43:09 -0000",
        "manifest_digest": "sha256:f1fd29370141a33ac95c15e57cedbd9a93cb7ca2bae0aa9557e7dde01fc43ef1"
    },
    "5012370": {
        "name": "5012370",
        "size": 27952337,
        "last_modified": "Tue, 07 Nov 2023 09:31:24 -0000",
        "manifest_digest": "sha256:af33a04cb979273a4c835bb6bc793a2ea294a9828cced59dcbcaf940843ac465"
    },
    "5927261": {
        "name": "5927261",
        "size": 29951865,
        "last_modified": "Tue, 28 Nov 2023 11:42:59 -0000",
        "manifest_digest": "sha256:7bcba161ce28b6d7ff0e1c1ccb0acc13690815c56a6091232d71818d429771fb"
    },
    "9925934": {
        "name": "9925934",
        "size": 30035957,
        "last_modified": "Tue, 09 Jan 2024 12:00:24 -0000",
        "manifest_digest": "sha256:2df4aa4d851b1d6dcd0edafae54ac87d7c9b6bfc4cb9942f1b80561b4cf4bf86"
    },
    "main": {
        "name": "main",
        "size": 30036549,
        "last_modified": "Fri, 12 Jan 2024 15:44:43 -0000",
        "manifest_digest": "sha256:3d46a9c47beb89b1e1056b43c843150c473513023fa2af163efe5cf85c7e480e"
    },

...

Our nightly is therefore trying to use the policy-controller commit sha 2451921 - this commit was before the kustomization file was added and will fail due to short commit sha Kuadrant/multicluster-gateway-controller#761.

This PR sorts by the last_modified date and takes the last matching sha entry instead of using the default ordering taking the first matching sha entry. Once merged nightly builds should function again.

@adam-cattermole adam-cattermole requested a review from a team as a code owner January 12, 2024 17:04
@adam-cattermole adam-cattermole self-assigned this Jan 12, 2024
Copy link

codecov bot commented Jan 12, 2024

Codecov Report

Merging #394 (107927f) into main (ed590ec) will decrease coverage by 0.08%.
Report is 1 commits behind head on main.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #394      +/-   ##
==========================================
- Coverage   66.18%   66.11%   -0.08%     
==========================================
  Files          37       37              
  Lines        3842     3842              
==========================================
- Hits         2543     2540       -3     
- Misses       1113     1116       +3     
  Partials      186      186              
Flag Coverage Δ
integration 71.56% <ø> (-0.15%) ⬇️
unit 60.14% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
api/v1beta1 (u) ∅ <ø> (∅)
pkg/common (u) 78.59% <ø> (ø)
pkg/istio (u) 37.11% <ø> (ø)
pkg/log (u) 31.81% <ø> (ø)
pkg/reconcilers (u) 33.44% <ø> (ø)
pkg/rlptools (u) 56.46% <ø> (ø)
controllers (i) 71.56% <ø> (-0.15%) ⬇️

see 6 files with indirect coverage changes

Copy link
Member

@didierofrivia didierofrivia left a comment

Choose a reason for hiding this comment

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

🍔

@adam-cattermole adam-cattermole merged commit c9e8173 into Kuadrant:main Jan 15, 2024
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants