Skip to content

argocd-update: accept a Freight commit's tag as desiredRevision #8225

In progress

Description

@korenperetz

Pre-submission checklist

  • I have searched existing issues and confirmed this is not a duplicate.
  • I understand that submitting a feature request does not guarantee it will be implemented.

Proposed Feature

Let argocd-update accept a Git tag as desiredRevision when that tag belongs to a commit in the Freight being promoted.

When checking whether a Git source is observably synced (in the step and in the Stage health check), resolve such a tag to the commit ID recorded in the Freight before comparing it with status.operationState.syncResult.revision. The tag is still what gets written to targetRevision when updateTargetRevision: true.

- uses: argocd-update
  config:
    apps:
      - name: my-app
        sources:
          - repoURL: https://github.com/example/repo.git
            desiredRevision: ${{ commitFrom(vars.repo).Tag }}
            updateTargetRevision: true

No new config. Chart sources and values that match no Freight commit's tag are compared as today.

Motivation and Use Case

A Warehouse subscribes to a Git repo with commitSelectionStrategy: NewestTag, and Applications are pinned to release tags (targetRevision: v1.2.3). We want promotions to keep pinning Applications to the tag, not the commit ID, so the Application spec stays readable and matches how the same Applications are deployed outside Kargo.

Today neither combination works:

  • desiredRevision: <tag> with updateTargetRevision: true writes the tag correctly, but mustPerformUpdate compares the tag to the commit ID Argo CD reports. They never match, so the step re-syncs the Application on every reconcile until it times out (sync result revisions [<sha>] do not match desired revisions [v1.2.3]). The Stage health check has the same mismatch.
  • desiredRevision: <commit ID> with updateTargetRevision: true completes, but pins the Application to a commit ID instead of the tag.

Resolving through the Freight keeps the check exact: the tag must map to the specific commit Kargo promoted, so a tag that was moved still fails the check.

Alternatives Considered

  1. New targetRevision field. Written to the source and never compared; desiredRevision stays a commit ID. Explicit, but adds a field that overlaps with updateTargetRevision and more config for users.
  2. updateTargetRevisionToTag: true. desiredRevision stays a commit ID, and the step writes the Freight commit's tag. Git-only and limited to the Freight's tag.
  3. Compare against Argo CD's resolved revision. Treat the sync as successful if Argo CD resolved targetRevision to the synced commit. Works for any ref, but also accepts a moved branch, which fix(step)!: tighten validation desiredRevision #4846 aimed to prevent.
  4. Document the limitation. State that updateTargetRevision requires desiredRevision to be a commit ID for Git sources.

If #5031 is picked up, a Freight-backed tag could be treated as an allowed value for Git sources alongside commit IDs.

Related: #4846, #5031, #8100, #8111.

Activity

  1. added
    needs/area
    needs/kind
    needs/priority
    on Nov 29, 2026
  2. kargo-governance-bot commented on Nov 29, 2026

    @kargo-governance-bot

    Before Starting Work

    Thank you for opening this issue.

    Please do not start work on this issue, and please do not ask to be assigned to it, until a maintainer has triaged it and cleared it for contribution. This applies to bug reports too. A maintainer needs to confirm a bug, and usually reproduce it, before a fix is worth writing.

    An issue is cleared for contribution when none of the blocking labels remain on it. Pull requests that reference an issue that has not been cleared are automatically converted to drafts, which maintainers do not routinely review.

    Maintainers triage issues on a best-effort basis. See the Contributor Guide for details.

  3. changed the title [-]argocd-update: set targetRevision to a Git tag while verifying against the commit ID[/-] [+]argocd-update: accept a Freight commit's tag as desiredRevision[/+] on Nov 29, 2026
  4. korenperetz commented on Nov 29, 2026

    @korenperetz
    Author

    @fuskovic @jsbroks @krancour
    Hi! I've opened #8226 with a small implementation of the proposed approach (resolving a Freight commit's tag to its commit ID for the sync check). Happy to adjust it if you prefer a different direction.
    Thanks!

  5. korenperetz commented on Nov 29, 2026

    @korenperetz
    Author
  6. added
    needs discussion
    kind/proposal
    on Nov 29, 2026
  7. krancour commented on Nov 29, 2026

    @krancour
    Member

    @korenperetz some patience would be appreciated. You opened this just five hours ago and in that time, opened a PR, despite the automated notice on this issue asking that no work be done until the issue has been triaged, and have made multiple comments pinging specific maintainers directly -- on a Sunday. The PR itself was automatically converted to a draft, by our governance bot, because the required triaging and discussion has not taken place. You made two attempts to override the bot's enforcement of that policy. The impatience that's been demonstrated here is offputting.

    I will say also that maintainers are all busy with other priorities right now. Do not expect that we're going to drop everything to discuss it or to review a PR just because you are anxious to have the feature. Reviewing PRs is effort and maintainer time is a scarce resource.

    Last, the code you're proposing changes to is some of the trickiest in Kargo. Integrating with Argo CD isn't easy because there are so many nuances to it. This section of code is the source of many bugs and a lot of frustration. To be frank, I am uncomfortable with anyone but a maintainer touching this area of the code in the first place, and I certainly would not allow modification to this part of the code that was pushed through so impatiently as you're attempting. Greater care is required here.

    Please be patient.

  8. krancour commented on Nov 29, 2026

    @krancour
    Member

    /low

  9. added
    priority/low
    and removed
    needs/priority
    on Nov 29, 2026
  10. kargo-governance-bot commented on Nov 29, 2026

    @kargo-governance-bot

    Low Priority

    A maintainer has determined this issue to be low priority.

    The maintainer team has its own priorities, and those cannot be displaced. We respectfully ask for your understanding. Patience will be required, as it may be some time before a maintainer is able to give this issue further attention.

  11. korenperetz commented on Nov 30, 2026

    @korenperetz
    Author

    @krancour
    I had no intention to interrupt your weekend.
    Some people in the world are working on Sundays because its their weekday FYI
    As for the draft conversion and automated messages, I was just trying to help you guys to review it without making a big effort designing it yourself with the very detailed multiple paths described in this issue, wasn't aware of the repo policies as every repo im contributing to has its own complicated policies and schemas.
    Its just tagging, you are very welcome to discard/abort this if you think its unnecessary or impatience. I've seen issues here are opened for years so I thought it may need an extra attention to not get lost.
    Anyway, closed the PR.
    Again, didn't mean to bother y'all, will wait.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/proposalneeds discussionneeds/areaneeds/kindpriority/low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions