Skip to content

ImageRepository status.lastScanResult.latestTags not sorted acc. to semver #443

@heubeck

Description

@heubeck

Hey there,
thank you very much for you great effort with flux.

Now the 'bug' 😇 : my ImageRepository status looks like:

status:
  lastScanResult:
    latestTags:
      - 2.9.5
      - 2.9.4
      - 2.9.3
      - 2.9.2
      - 2.9.1
      - 2.9.0
      - 2.8.9
      - 2.8.8
      - 2.8.7
      - 2.8.6
    tagCount: 50

but actually there are newer tags 2.10.x, also the related ImagePolicy is fine with status.latestImage: my-image:2.10.14.

Sorting of the latestTags is alphabetical, ref.: https://github.com/fluxcd/image-reflector-controller/blob/main/internal/controller/imagerepository_controller.go#L626

As the ImageRepository doesn't know the tag semantics, maybe sorting by freshness (image date desc) would make more sense?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions