Skip to content

Commit

Permalink
fix: support 'project' filter field for backwards-compatibility (argo…
Browse files Browse the repository at this point in the history
…proj#12594)

* fix: support 'project' filter field for backwards-compatibility

Signed-off-by: Michael Crenshaw <[email protected]>

* fix codegen

Signed-off-by: Michael Crenshaw <[email protected]>

* add upgrade notes

Signed-off-by: Michael Crenshaw <[email protected]>

* fix upgrade notes

Signed-off-by: Michael Crenshaw <[email protected]>

* tests

Signed-off-by: Michael Crenshaw <[email protected]>

---------

Signed-off-by: Michael Crenshaw <[email protected]>
  • Loading branch information
crenshaw-dev authored Mar 14, 2023
1 parent 0457ce1 commit b28f306
Show file tree
Hide file tree
Showing 9 changed files with 380 additions and 166 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,9 @@ help:
@echo 'debug:'
@echo ' list -- list all make targets'
@echo ' install-tools-local -- install all the tools below'
@echo ' install-codegen-tools-local --'
@echo ' install-go-tools-local'
@echo ' install-lint-tools(-local)'
@echo
@echo 'codegen:'
@echo ' codegen(-local) -- if using -local, run the following targets first'
@echo ' install-codegen-tools-local -- run this to install the codegen tools'
@echo ' install-go-tools-local -- run this to install go libraries for codegen'
30 changes: 30 additions & 0 deletions assets/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,16 @@
"description": "the application's namespace.",
"name": "appNamespace",
"in": "query"
},
{
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi",
"description": "the project names to restrict returned list applications (legacy name for backwards-compatibility).",
"name": "project",
"in": "query"
}
],
"responses": {
Expand Down Expand Up @@ -585,6 +595,16 @@
"description": "the application's namespace.",
"name": "appNamespace",
"in": "query"
},
{
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi",
"description": "the project names to restrict returned list applications (legacy name for backwards-compatibility).",
"name": "project",
"in": "query"
}
],
"responses": {
Expand Down Expand Up @@ -3670,6 +3690,16 @@
"description": "the application's namespace.",
"name": "appNamespace",
"in": "query"
},
{
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi",
"description": "the project names to restrict returned list applications (legacy name for backwards-compatibility).",
"name": "project",
"in": "query"
}
],
"responses": {
Expand Down
21 changes: 21 additions & 0 deletions docs/operator-manual/upgrading/2.3-2.4.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# v2.3 to 2.4

## Known Issues

### Broken `project` filter before 2.4.24

Argo CD 2.4.0 introduced a breaking API change, renaming the `project` filter to `projects`.

#### Impact to API clients

A similar issue applies to other API clients which communicate with the Argo CD API server via its REST API. If the
client uses the `project` field to filter projects, the filter will not be applied. **The failing project filter could
have detrimental consequences if, for example, you rely on it to list Applications to be deleted.**

#### Impact to CLI clients

CLI clients older that v2.4.0 rely on client-side filtering and are not impacted by this bug.

#### How to fix the problem

Upgrade to Argo CD >=2.4.24, >=2.5.12, or >=2.6.3. This version of Argo CD will accept both `project` and `projects` as
valid filters.

## KSonnet support is removed

Ksonnet was deprecated in [2019](https://github.com/ksonnet/ksonnet/pull/914/files) and is no longer maintained.
Expand Down
21 changes: 21 additions & 0 deletions docs/operator-manual/upgrading/2.4-2.5.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# v2.4 to 2.5

## Known Issues

### Broken `project` filter before 2.5.12

Argo CD 2.4.0 introduced a breaking API change, renaming the `project` filter to `projects`.

#### Impact to API clients

A similar issue applies to other API clients which communicate with the Argo CD API server via its REST API. If the
client uses the `project` field to filter projects, the filter will not be applied. **The failing project filter could
have detrimental consequences if, for example, you rely on it to list Applications to be deleted.**

#### Impact to CLI clients

CLI clients older that v2.4.0 rely on client-side filtering and are not impacted by this bug.

#### How to fix the problem

Upgrade to Argo CD >=2.4.24, >=2.5.12, or >=2.6.3. This version of Argo CD will accept both `project` and `projects` as
valid filters.

## Configure RBAC to account for new `applicationsets` resource

2.5 introduces a new `applicationsets` [RBAC resource](https://argo-cd.readthedocs.io/en/stable/operator-manual/rbac/#rbac-resources-and-actions).
Expand Down
21 changes: 21 additions & 0 deletions docs/operator-manual/upgrading/2.5-2.6.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# v2.5 to 2.6

## Known Issues

### Broken `project` filter before 2.6.3

Argo CD 2.4.0 introduced a breaking API change, renaming the `project` filter to `projects`.

#### Impact to API clients

A similar issue applies to other API clients which communicate with the Argo CD API server via its REST API. If the
client uses the `project` field to filter projects, the filter will not be applied. **The failing project filter could
have detrimental consequences if, for example, you rely on it to list Applications to be deleted.**

#### Impact to CLI clients

CLI clients older that v2.4.0 rely on client-side filtering and are not impacted by this bug.

#### How to fix the problem

Upgrade to Argo CD >=2.4.24, >=2.5.12, or >=2.6.3. This version of Argo CD will accept both `project` and `projects` as
valid filters.

## ApplicationSets: `^` behavior change in Sprig's semver functions
Argo CD 2.5 introduced [Go templating in ApplicationSets](https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/GoTemplate/). Go templates have access to the Sprig function library.

Expand Down
Loading

0 comments on commit b28f306

Please sign in to comment.