-
Notifications
You must be signed in to change notification settings - Fork 31
Description
Hi! When originRevision is configured for an artifact and changes are added to the monorepo that are outside the scope of the configured copy paths, the artifact content revision (sha256) does not change. However, org.opencontainers.image.revision is still updated to the latest commit, and the artifact’s Last Transition Time is updated as well.
As a result, the kustomization that consumes this artifact is applied on the next reconciliation interval, even though nothing has actually changed in the configured copy path.
As I understand it, since the files in scope did not change, the kustomization is not triggered immediately. However, on the next interval it detects a change in originRevision, which causes reconciliation to happen anyway.
In this situation, I would expect org.opencontainers.image.revision to be tied to the last commit that actually changed the artifact content—specifically, when the artifact’s sha256 revision changes. But this does not appear to be how it works.
Is this the expected behavior?
My main goal is to update git commit statuses in a monorepo only for the kustomization that are truly affected by a given commit, rather than triggering and updating the status of all kustomizations on every commit in the monorepo.
Thanks!
source-watcher version: ghcr.io/fluxcd/source-watcher:v2.0.3@sha256:9cd46c3c958dcfcd8a3c857fa09989f9df5d8396eae165f219cbb472343371a9
flux-operator: 0.37.1
before commit to monorepo with changes out of scope artifactgenerator:
oc describe externalartifact
Name: subdomaintest
Namespace: projecttest--domaintest--subdomaintest
Labels: app.kubernetes.io/managed-by=source-watcher
source.extensions.fluxcd.io/generator=166025df-c473-4b84-bde1-ff5446ae6db0
Annotations: <none>
API Version: source.toolkit.fluxcd.io/v1
Kind: ExternalArtifact
Metadata:
Creation Timestamp: 2025-12-27T20:57:20Z
Generation: 1
Resource Version: 33134954
UID: 08f52f4a-0ca0-497e-86fb-0ecb6ade0574
Spec:
Source Ref:
API Version: source.extensions.fluxcd.io/v1beta1
Kind: ArtifactGenerator
Name: projecttest--domaintest--subdomaintest
Namespace: projecttest--domaintest--subdomaintest
Status:
Artifact:
Digest: sha256:96d6316c481b83c73269efffbc3297f3bfe3751c3776d869772d4af380533d2b
Last Update Time: 2025-12-29T11:40:39Z
Metadata:
org.opencontainers.image.revision: main@sha1:83eafa9c6980a7558049084ec84c8d1dea043e2a
Path: externalartifact/projecttest--domaintest--subdomaintest/subdomaintest/1925372896.tar.gz
Revision: latest@sha256:96d6316c481b83c73269efffbc3297f3bfe3751c3776d869772d4af380533d2b
Size: 1759
URL: http://source-watcher.gitops--adm--flux-system.svc.cluster.local./externalartifact/projecttest--domaintest--subdomaintest/subdomaintest/1925372896.tar.gz
Conditions:
Last Transition Time: 2025-12-29T11:40:39Z
Message: Artifact is ready
Observed Generation: 1
Reason: Succeeded
Status: True
Type: Ready
Events: <none>
after:
oc describe externalartifact
Name: subdomaintest
Namespace: projecttest--domaintest--subdomaintest
Labels: app.kubernetes.io/managed-by=source-watcher
source.extensions.fluxcd.io/generator=166025df-c473-4b84-bde1-ff5446ae6db0
Annotations: <none>
API Version: source.toolkit.fluxcd.io/v1
Kind: ExternalArtifact
Metadata:
Creation Timestamp: 2025-12-27T20:57:20Z
Generation: 1
Resource Version: 33159140
UID: 08f52f4a-0ca0-497e-86fb-0ecb6ade0574
Spec:
Source Ref:
API Version: source.extensions.fluxcd.io/v1beta1
Kind: ArtifactGenerator
Name: projecttest--domaintest--subdomaintest
Namespace: projecttest--domaintest--subdomaintest
Status:
Artifact:
Digest: sha256:96d6316c481b83c73269efffbc3297f3bfe3751c3776d869772d4af380533d2b
Last Update Time: 2025-12-29T12:22:58Z
Metadata:
org.opencontainers.image.revision: main@sha1:80f6b1fdb851bcee9f2b1b7d1f28078bd93985d4
Path: externalartifact/projecttest--domaintest--subdomaintest/subdomaintest/1925372896.tar.gz
Revision: latest@sha256:96d6316c481b83c73269efffbc3297f3bfe3751c3776d869772d4af380533d2b
Size: 1759
URL: http://source-watcher.gitops--adm--flux-system.svc.cluster.local./externalartifact/projecttest--domaintest--subdomaintest/subdomaintest/1925372896.tar.gz
Conditions:
Last Transition Time: 2025-12-29T12:22:58Z
Message: Artifact is ready
Observed Generation: 1
Reason: Succeeded
Status: True
Type: Ready
Events: <none>
generator details
oc describe artifactgenerators
Name: projecttest--domaintest--subdomaintest
Namespace: projecttest--domaintest--subdomaintest
Labels: <none>
Annotations: <none>
API Version: source.extensions.fluxcd.io/v1beta1
Kind: ArtifactGenerator
Metadata:
Creation Timestamp: 2025-12-27T20:42:21Z
Finalizers:
source.extensions.fluxcd.io/finalizer
Generation: 20
Resource Version: 33159144
UID: 166025df-c473-4b84-bde1-ff5446ae6db0
Spec:
Artifacts:
Copy:
From: @projecttest--domaintest--subdomaintest/_kustomization/prod/subdomaintest/**
To: @artifact/_kustomization/prod/subdomaintest/
From: @projecttest--domaintest--subdomaintest/subdomaintest/app1/base/**
To: @artifact/subdomaintest/app1/base/
From: @projecttest--domaintest--subdomaintest/subdomaintest/app1/overlays/prod/**
To: @artifact/subdomaintest/app1/overlays/prod/
Name: subdomaintest
Origin Revision: @projecttest--domaintest--subdomaintest
Sources:
Alias: projecttest--domaintest--subdomaintest
Kind: GitRepository
Name: gitops--workspace--projecttest--domaintest--subdomaintest
Status:
Conditions:
Last Transition Time: 2025-12-29T12:22:58Z
Message: reconciliation succeeded, generated 1 artifact(s)
Observed Generation: 20
Reason: Succeeded
Status: True
Type: Ready
Inventory:
Digest: sha256:96d6316c481b83c73269efffbc3297f3bfe3751c3776d869772d4af380533d2b
Filename: 1925372896.tar.gz
Name: subdomaintest
Namespace: projecttest--domaintest--subdomaintest
Observed Sources Digest: sha256:a206b2157cc04c550fbd9dc4dbd1abd175fd991f2ae81325b75fbfc915d5f0a9
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Ready 89m source-watcher ExternalArtifact/projecttest--domaintest--subdomaintest/subdomaintest reconciled with revision latest@sha256:4a957be80508832074ec2d96d55f419816348e45d2c94027ae5a871621ac645d
Normal Ready 54m source-watcher ExternalArtifact/projecttest--domaintest--subdomaintest/subdomaintest reconciled with revision latest@sha256:2fba680d79ccd90112cb2d74d0d761353df8da406a2e47ce3acd7162431c8ce2
Normal Ready 42m source-watcher ExternalArtifact/projecttest--domaintest--subdomaintest/subdomaintest reconciled with revision latest@sha256:96d6316c481b83c73269efffbc3297f3bfe3751c3776d869772d4af380533d2b
Normal Ready 41m (x39 over 38h) source-watcher No drift detected, 1 artifact(s) up to date
Normal Ready 6s (x33 over 39h) source-watcher reconciliation succeeded, generated 1 artifact(s)