Skip to content

Commit 92726a1

Browse files
authored
chore: deprecate gitRepoURL in API and UI (#3902)
Signed-off-by: Faeka Ansari <faeka6@gmail.com>
1 parent b7931fa commit 92726a1

19 files changed

+61
-18
lines changed

api/v1alpha1/generated.proto

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1alpha1/stage_types.go

+2
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,8 @@ type Image struct {
533533
// GitRepoURL specifies the URL of a Git repository that contains the source
534534
// code for the image repository referenced by the RepoURL field if Kargo was
535535
// able to infer it.
536+
//
537+
// Deprecated: Use OCI annotations instead. Will be removed in v1.7.0.
536538
GitRepoURL string `json:"gitRepoURL,omitempty" protobuf:"bytes,2,opt,name=gitRepoURL"`
537539
// Tag identifies a specific version of the image in the repository specified
538540
// by RepoURL.

api/v1alpha1/warehouse_types.go

+4
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ type ImageSubscription struct {
220220
// When this is specified, Kargo MAY be able to infer and link to the exact
221221
// revision of that source code that was used to build the image.
222222
//
223+
// Deprecated: Use OCI annotations instead. Will be removed in v1.7.0.
224+
//
223225
// +kubebuilder:validation:Optional
224226
// +kubebuilder:validation:Pattern=`^https?://(\w+([\.-]\w+)*@)?\w+([\.-]\w+)*(:[\d]+)?(/.*)?$`
225227
GitRepoURL string `json:"gitRepoURL,omitempty" protobuf:"bytes,2,opt,name=gitRepoURL"`
@@ -473,6 +475,8 @@ type DiscoveredImageReference struct {
473475
// GitRepoURL is the URL of the Git repository that contains the source
474476
// code for this image. This field is optional, and only populated if the
475477
// ImageSubscription specifies a GitRepoURL.
478+
//
479+
// Deprecated: Use OCI annotations instead. Will be removed in v1.7.0.
476480
GitRepoURL string `json:"gitRepoURL,omitempty" protobuf:"bytes,3,opt,name=gitRepoURL"`
477481
// CreatedAt is the time the image was created. This field is optional, and
478482
// not populated for every ImageSelectionStrategy.

charts/kargo/resources/crds/kargo.akuity.io_freights.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ spec:
131131
GitRepoURL specifies the URL of a Git repository that contains the source
132132
code for the image repository referenced by the RepoURL field if Kargo was
133133
able to infer it.
134+
135+
Deprecated: Use OCI annotations instead. Will be removed in v1.7.0.
134136
type: string
135137
repoURL:
136138
description: RepoURL describes the repository in which the image

charts/kargo/resources/crds/kargo.akuity.io_promotions.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,8 @@ spec:
348348
GitRepoURL specifies the URL of a Git repository that contains the source
349349
code for the image repository referenced by the RepoURL field if Kargo was
350350
able to infer it.
351+
352+
Deprecated: Use OCI annotations instead. Will be removed in v1.7.0.
351353
type: string
352354
repoURL:
353355
description: RepoURL describes the repository in which the
@@ -489,6 +491,8 @@ spec:
489491
GitRepoURL specifies the URL of a Git repository that contains the source
490492
code for the image repository referenced by the RepoURL field if Kargo was
491493
able to infer it.
494+
495+
Deprecated: Use OCI annotations instead. Will be removed in v1.7.0.
492496
type: string
493497
repoURL:
494498
description: RepoURL describes the repository in which

charts/kargo/resources/crds/kargo.akuity.io_stages.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,8 @@ spec:
589589
GitRepoURL specifies the URL of a Git repository that contains the source
590590
code for the image repository referenced by the RepoURL field if Kargo was
591591
able to infer it.
592+
593+
Deprecated: Use OCI annotations instead. Will be removed in v1.7.0.
592594
type: string
593595
repoURL:
594596
description: RepoURL describes the repository in which
@@ -736,6 +738,8 @@ spec:
736738
GitRepoURL specifies the URL of a Git repository that contains the source
737739
code for the image repository referenced by the RepoURL field if Kargo was
738740
able to infer it.
741+
742+
Deprecated: Use OCI annotations instead. Will be removed in v1.7.0.
739743
type: string
740744
repoURL:
741745
description: RepoURL describes the repository in
@@ -879,6 +883,8 @@ spec:
879883
GitRepoURL specifies the URL of a Git repository that contains the source
880884
code for the image repository referenced by the RepoURL field if Kargo was
881885
able to infer it.
886+
887+
Deprecated: Use OCI annotations instead. Will be removed in v1.7.0.
882888
type: string
883889
repoURL:
884890
description: RepoURL describes the repository
@@ -1183,6 +1189,8 @@ spec:
11831189
GitRepoURL specifies the URL of a Git repository that contains the source
11841190
code for the image repository referenced by the RepoURL field if Kargo was
11851191
able to infer it.
1192+
1193+
Deprecated: Use OCI annotations instead. Will be removed in v1.7.0.
11861194
type: string
11871195
repoURL:
11881196
description: RepoURL describes the repository in
@@ -1430,6 +1438,8 @@ spec:
14301438
GitRepoURL specifies the URL of a Git repository that contains the source
14311439
code for the image repository referenced by the RepoURL field if Kargo was
14321440
able to infer it.
1441+
1442+
Deprecated: Use OCI annotations instead. Will be removed in v1.7.0.
14331443
type: string
14341444
repoURL:
14351445
description: RepoURL describes the repository in which
@@ -1577,6 +1587,8 @@ spec:
15771587
GitRepoURL specifies the URL of a Git repository that contains the source
15781588
code for the image repository referenced by the RepoURL field if Kargo was
15791589
able to infer it.
1590+
1591+
Deprecated: Use OCI annotations instead. Will be removed in v1.7.0.
15801592
type: string
15811593
repoURL:
15821594
description: RepoURL describes the repository in
@@ -1720,6 +1732,8 @@ spec:
17201732
GitRepoURL specifies the URL of a Git repository that contains the source
17211733
code for the image repository referenced by the RepoURL field if Kargo was
17221734
able to infer it.
1735+
1736+
Deprecated: Use OCI annotations instead. Will be removed in v1.7.0.
17231737
type: string
17241738
repoURL:
17251739
description: RepoURL describes the repository

charts/kargo/resources/crds/kargo.akuity.io_warehouses.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,8 @@ spec:
292292
the source code for the image repository referenced by the RepoURL field.
293293
When this is specified, Kargo MAY be able to infer and link to the exact
294294
revision of that source code that was used to build the image.
295+
296+
Deprecated: Use OCI annotations instead. Will be removed in v1.7.0.
295297
pattern: ^https?://(\w+([\.-]\w+)*@)?\w+([\.-]\w+)*(:[\d]+)?(/.*)?$
296298
type: string
297299
ignoreTags:
@@ -601,6 +603,8 @@ spec:
601603
GitRepoURL is the URL of the Git repository that contains the source
602604
code for this image. This field is optional, and only populated if the
603605
ImageSubscription specifies a GitRepoURL.
606+
607+
Deprecated: Use OCI annotations instead. Will be removed in v1.7.0.
604608
type: string
605609
tag:
606610
description: Tag is the tag of the image.

docs/docs/50-user-guide/20-how-to-guides/30-working-with-warehouses.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@ fields:
8484
encountering rate limits -- decreasing this limit may improve performance.
8585
:::
8686

87-
- `gitRepoURL`: Optional metadata to inform Kargo of the Git repository that
88-
contains the image's Dockerfile or other build context.
87+
- `gitRepoURL`: (Deprecated as of version 1.5, will be removed in version 1.7)
88+
Optional metadata to inform Kargo of the Git repository that contains the
89+
image's Dockerfile or other build context.
8990

9091
- `insecureSkipTLSVerify`: Set to `true` to disable validation of the
9192
repository's TLS certificate.

docs/docs/50-user-guide/60-reference-docs/40-expressions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ The returned `Image` object has the following fields:
380380
| Field | Description |
381381
|-------|-------------|
382382
| `RepoURL` | The URL of the container image repository the image originates from. |
383-
| `GitRepoURL` | The URL of the Git repository which contains the source code for the image. Only present if Kargo was able to infer it from the URL. |
383+
| `GitRepoURL` | (Deprecated as of version 1.5, will be removed in version 1.7) The URL of the Git repository which contains the source code for the image. Only present if Kargo was able to infer it from the URL. |
384384
| `Tag` | The tag of the image. |
385385
| `Digest` | The digest of the image. |
386386
| `Annotations` | A map of [annotations](https://specs.opencontainers.org/image-spec/annotations/) discovered for the image. |

docs/old-docs/35-references/20-expression-language.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ first argument and returns a corresponding `Image` object from the `Promotion`'s
262262
| Field | Description |
263263
|-------|-------------|
264264
| `RepoURL` | The URL of the container image repository the image originates from. |
265-
| `GitRepoURL` | The URL of the Git repository which contains the source code for the image. Only present if Kargo was able to infer it from the URL. |
265+
| `GitRepoURL` | (Deprecated as of version 1.5, will be removed in version 1.7) The URL of the Git repository which contains the source code for the image. Only present if Kargo was able to infer it from the URL. |
266266
| `Tag` | The tag of the image. |
267267
| `Digest` | The digest of the image. |
268268

internal/controller/warehouses/images.go

-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ func (r *reconciler) discoverImages(
7979
Tag: img.Tag,
8080
Digest: img.Digest,
8181
Annotations: img.Annotations,
82-
GitRepoURL: r.getImageSourceURL(sub.GitRepoURL, img.Tag),
8382
}
8483
if img.CreatedAt != nil {
8584
discovery.CreatedAt = &metav1.Time{Time: *img.CreatedAt}

internal/controller/warehouses/warehouses.go

-1
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,6 @@ func (r *reconciler) buildFreightFromLatestArtifacts(
462462
latestImage := result.References[0]
463463
freight.Images = append(freight.Images, kargoapi.Image{
464464
RepoURL: result.RepoURL,
465-
GitRepoURL: latestImage.GitRepoURL,
466465
Tag: latestImage.Tag,
467466
Digest: latestImage.Digest,
468467
Annotations: latestImage.Annotations,

ui/src/features/assemble-freight/assemble-freight.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const constructFreight = (
6060
repoURL: artifact.repoURL,
6161
tag: imageRef.tag,
6262
digest: imageRef.digest,
63+
// Deprecated: Use OCI annotations instead. Will be removed in version 1.7.
6364
gitRepoURL: imageRef.gitRepoURL
6465
} as Image);
6566
} else if ('versions' in artifact) {

ui/src/features/assemble-freight/image-table.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export const ImageTable = ({
3737
title: 'Source Repo',
3838
render: (record: DiscoveredImageReference) =>
3939
record?.gitRepoURL ? (
40+
// Deprecated: Use OCI annotations instead. Will be removed in version 1.7.
4041
<a href={record?.gitRepoURL} target='_blank' rel='noreferrer'>
4142
{record?.gitRepoURL}
4243
</a>

ui/src/gen/api/v1alpha1/generated_pb.ts

+6
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,8 @@ export type DiscoveredImageReference = Message<"github.com.akuity.kargo.api.v1al
671671
* code for this image. This field is optional, and only populated if the
672672
* ImageSubscription specifies a GitRepoURL.
673673
*
674+
* Deprecated: Use OCI annotations instead. Will be removed in v1.7.0.
675+
*
674676
* @generated from field: optional string gitRepoURL = 3;
675677
*/
676678
gitRepoURL: string;
@@ -1451,6 +1453,8 @@ export type Image = Message<"github.com.akuity.kargo.api.v1alpha1.Image"> & {
14511453
* code for the image repository referenced by the RepoURL field if Kargo was
14521454
* able to infer it.
14531455
*
1456+
* Deprecated: Use OCI annotations instead. Will be removed in v1.7.0.
1457+
*
14541458
* @generated from field: optional string gitRepoURL = 2;
14551459
*/
14561460
gitRepoURL: string;
@@ -1555,6 +1559,8 @@ export type ImageSubscription = Message<"github.com.akuity.kargo.api.v1alpha1.Im
15551559
* When this is specified, Kargo MAY be able to infer and link to the exact
15561560
* revision of that source code that was used to build the image.
15571561
*
1562+
* Deprecated: Use OCI annotations instead. Will be removed in v1.7.0.
1563+
*
15581564
* +kubebuilder:validation:Optional
15591565
* +kubebuilder:validation:Pattern=`^https?://(\w+([\.-]\w+)*@)?\w+([\.-]\w+)*(:[\d]+)?(/.*)?$`
15601566
*

ui/src/gen/schema/freights.kargo.akuity.io_v1alpha1.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"type": "string"
8888
},
8989
"gitRepoURL": {
90-
"description": "GitRepoURL specifies the URL of a Git repository that contains the source\ncode for the image repository referenced by the RepoURL field if Kargo was\nable to infer it.",
90+
"description": "GitRepoURL specifies the URL of a Git repository that contains the source\ncode for the image repository referenced by the RepoURL field if Kargo was\nable to infer it.\n\nDeprecated: Use OCI annotations instead. Will be removed in v1.7.0.",
9191
"type": "string"
9292
},
9393
"repoURL": {

ui/src/gen/schema/promotions.kargo.akuity.io_v1alpha1.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@
254254
"type": "string"
255255
},
256256
"gitRepoURL": {
257-
"description": "GitRepoURL specifies the URL of a Git repository that contains the source\ncode for the image repository referenced by the RepoURL field if Kargo was\nable to infer it.",
257+
"description": "GitRepoURL specifies the URL of a Git repository that contains the source\ncode for the image repository referenced by the RepoURL field if Kargo was\nable to infer it.\n\nDeprecated: Use OCI annotations instead. Will be removed in v1.7.0.",
258258
"type": "string"
259259
},
260260
"repoURL": {
@@ -386,7 +386,7 @@
386386
"type": "string"
387387
},
388388
"gitRepoURL": {
389-
"description": "GitRepoURL specifies the URL of a Git repository that contains the source\ncode for the image repository referenced by the RepoURL field if Kargo was\nable to infer it.",
389+
"description": "GitRepoURL specifies the URL of a Git repository that contains the source\ncode for the image repository referenced by the RepoURL field if Kargo was\nable to infer it.\n\nDeprecated: Use OCI annotations instead. Will be removed in v1.7.0.",
390390
"type": "string"
391391
},
392392
"repoURL": {

0 commit comments

Comments
 (0)