Skip to content

Commit

Permalink
feat: UI write support CMP (argoproj#11754) (argoproj#12137)
Browse files Browse the repository at this point in the history
* argoproj#11602 fix : Object options menu truncated when selected in ApplicationListView.

Signed-off-by: schakradari <[email protected]>

* CMP parameter changes

Signed-off-by: schakradari <[email protected]>

* fix: pointers to param values

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

better?

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

fix silliness

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

terrible hacks

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

maybe better codegen

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

fix tests

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

* same prefix issue fixed

Signed-off-by: schakradari <[email protected]>

* fix for delete param name

Signed-off-by: schakradari <[email protected]>

* lint changes

Signed-off-by: schakradari <[email protected]>

* lint fix

Signed-off-by: schakradari <[email protected]>

* lint fix

Signed-off-by: schakradari <[email protected]>

* finalChanges

Signed-off-by: schakradari <[email protected]>

* Delete application-resource-list.tsx

Not needed for this PR.

Signed-off-by: schakrad <[email protected]>

* added file which was deleted as it was not the change needed for this feature.

Signed-off-by: schakradari <[email protected]>

* refactored MapValuField and added fix for some edge cases

Signed-off-by: schakradari <[email protected]>

* Update application-resource-list.tsx

Reverting the change as this is not related to this PR.

Signed-off-by: schakrad <[email protected]>

* Reverting the change in application-resource-list

Signed-off-by: schakradari <[email protected]>

* Showing application parameter values irrespective of parameter present or not in plugin.yaml

Signed-off-by: schakradari <[email protected]>

* fix for lint errors

Signed-off-by: schakradari <[email protected]>

* fix false source mismatch

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

* fix equals

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

* fix swagger doc

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

* Tooltip description change.

Signed-off-by: schakrad <[email protected]>

* fixed lint

Signed-off-by: schakrad <[email protected]>

* CMP fix for empty array.

Signed-off-by: schakrad <[email protected]>

---------

Signed-off-by: schakradari <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
Signed-off-by: schakrad <[email protected]>
Signed-off-by: schakrad <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
  • Loading branch information
2 people authored and xiaowu.zhu committed Aug 9, 2023
1 parent 56e0b18 commit f9e3795
Show file tree
Hide file tree
Showing 15 changed files with 2,021 additions and 947 deletions.
2 changes: 1 addition & 1 deletion controller/appcontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1479,7 +1479,7 @@ func currentSourceEqualsSyncedSource(app *appv1.Application) bool {
if app.Spec.HasMultipleSources() {
return app.Spec.Sources.Equals(app.Status.Sync.ComparedTo.Sources)
}
return app.Spec.Source.Equals(app.Status.Sync.ComparedTo.Source)
return app.Spec.Source.Equals(&app.Status.Sync.ComparedTo.Source)
}

// needRefreshAppStatus answers if application status needs to be refreshed.
Expand Down
9 changes: 8 additions & 1 deletion hack/generate-proto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,13 @@ EOF
rm -f "${SWAGGER_OUT}"

find "${SWAGGER_ROOT}" -name '*.swagger.json' -exec swagger mixin --ignore-conflicts "${PRIMARY_SWAGGER}" '{}' \+ > "${COMBINED_SWAGGER}"
jq -r 'del(.definitions[].properties[]? | select(."$ref"!=null and .description!=null).description) | del(.definitions[].properties[]? | select(."$ref"!=null and .title!=null).title)' "${COMBINED_SWAGGER}" > "${SWAGGER_OUT}"
jq -r 'del(.definitions[].properties[]? | select(."$ref"!=null and .description!=null).description) | del(.definitions[].properties[]? | select(."$ref"!=null and .title!=null).title) |
# The "array" and "map" fields have custom unmarshaling. Modify the swagger to reflect this.
.definitions.v1alpha1ApplicationSourcePluginParameter.properties.array = {"description":"Array is the value of an array type parameter.","type":"array","items":{"type":"string"}} |
del(.definitions.v1alpha1OptionalArray) |
.definitions.v1alpha1ApplicationSourcePluginParameter.properties.map = {"description":"Map is the value of a map type parameter.","type":"object","additionalProperties":{"type":"string"}} |
del(.definitions.v1alpha1OptionalMap)
' "${COMBINED_SWAGGER}" > "${SWAGGER_OUT}"

/bin/rm "${PRIMARY_SWAGGER}" "${COMBINED_SWAGGER}"
}
Expand All @@ -128,3 +134,4 @@ clean_swagger server
clean_swagger reposerver
clean_swagger controller
clean_swagger cmpserver

2 changes: 1 addition & 1 deletion pkg/apis/api-rules/violation_exceptions.list
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ API rule violation: list_type_missing,github.com/argoproj/argo-cd/v2/pkg/apis/ap
API rule violation: list_type_missing,github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1,ApplicationSourceJsonnet,ExtVars
API rule violation: list_type_missing,github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1,ApplicationSourceJsonnet,Libs
API rule violation: list_type_missing,github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1,ApplicationSourceJsonnet,TLAs
API rule violation: list_type_missing,github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1,ApplicationSourcePluginParameter,Array
API rule violation: list_type_missing,github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1,ApplicationSpec,IgnoreDifferences
API rule violation: list_type_missing,github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1,ApplicationSpec,Info
API rule violation: list_type_missing,github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1,ApplicationStatus,Conditions
Expand All @@ -48,6 +47,7 @@ API rule violation: list_type_missing,github.com/argoproj/argo-cd/v2/pkg/apis/ap
API rule violation: list_type_missing,github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1,MergeGenerator,MergeKeys
API rule violation: list_type_missing,github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1,NestedMergeGenerator,MergeKeys
API rule violation: list_type_missing,github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1,Operation,Info
API rule violation: list_type_missing,github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1,OptionalArray,Array
API rule violation: list_type_missing,github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1,OrphanedResourcesMonitorSettings,Ignore
API rule violation: list_type_missing,github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1,OverrideIgnoreDiff,JQPathExpressions
API rule violation: list_type_missing,github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1,OverrideIgnoreDiff,JSONPointers
Expand Down
1,985 changes: 1,167 additions & 818 deletions pkg/apis/application/v1alpha1/generated.pb.go

Large diffs are not rendered by default.

16 changes: 14 additions & 2 deletions pkg/apis/application/v1alpha1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

88 changes: 57 additions & 31 deletions pkg/apis/application/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f9e3795

Please sign in to comment.