Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Provide Edit support in Sources tab for multi-source app (#17588) #17589

Closed

Conversation

keithchong
Copy link
Contributor

@keithchong keithchong commented Mar 21, 2024

Fixes #17588

This PR builds upon #17275

This PR adds/enables the "Edit" button to the Source and Parameter sections of each collapsible panel under the new Sources tab added from #17275.

There are a few noteworthy design points to this:

  • Two Edit buttons are added. One for the 'core' source information including Repo URL, path, etc. See the discussion in the proposal as to why two edit buttons are needed
  • The repo details are not loaded until the source panel is expanded. This will reduce 'flickering' if all repo sources were loaded at once, and if the UI needs to be updated if underlying data is changed. This will also help with performance.
LoadingOneSource
  • The collapse state of each source panel is 'remembered' if the user traverses the Resource details tabs. It is also recalled if the details sliding panel is closed and opened back up again
  • The existing support for the single source field can be easily removed with minimal changes. Did not want to change the behavior of that.
  • Validation of a field seems to be broken (even without this change, and on single source apps). It appears there needs to be a change in the argo UI. I added new validation for just the repo URL to show that the validation works:
Screenshot 2024-03-26 at 4 20 05 PM

Testing:

  • I tested multiple source apps with 2, 3 and 4 sources. I edited and changed the repo URL or path, and subsequently, the parameters ( the bottom panel) changes to reflect the new source type
  • I tested modifying and saving Helm parameter values changes, and the override behavior looks the same compared to using a single source app.
  • After saving, the source panel may 'load' several times (due to model changes), but I think that is probably acceptable.
  • If you are in Edit mode, and wait for some time, the page will refresh and will kick you out of edit mode. This is similar behavior to what is happening currently with single source apps.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

@keithchong keithchong requested a review from a team as a code owner March 21, 2024 22:20
@keithchong keithchong force-pushed the 17106-MultiSourceApps-EditSupport branch from 11260d0 to ca36fa4 Compare March 22, 2024 01:56
@keithchong keithchong force-pushed the 17106-MultiSourceApps-EditSupport branch from ca36fa4 to 422c6f6 Compare March 26, 2024 20:04
danqixu and others added 23 commits March 27, 2024 09:22
…rgoproj#17541)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.15.5...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Add arturia as users

Signed-off-by: olivier beyler <[email protected]>
Bumps [express](https://github.com/expressjs/express) from 4.17.3 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](expressjs/express@4.17.3...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* sec: limit helm index max size

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

* sec: limit helm index max size

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

* feat: fix tests and linter

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

---------

Signed-off-by: pashakostohrys <[email protected]>
* Update security.md

fix RBAC link

Signed-off-by: Deniz Erdogan <[email protected]>

* Update security.md

Signed-off-by: Deniz Erdogan <[email protected]>

* Update security.md

fix link to application-controller role

Signed-off-by: Deniz Erdogan <[email protected]>

* Update security.md

Signed-off-by: Deniz Erdogan <[email protected]>

---------

Signed-off-by: Deniz Erdogan <[email protected]>
* docs: added warning for multiple sources

Signed-off-by: Kostis (Codefresh) <[email protected]>

* docs: minor spelling

Signed-off-by: Kostis (Codefresh) <[email protected]>

---------

Signed-off-by: Kostis (Codefresh) <[email protected]>
…nd --refresh Flags (argoproj#17613)

* add const key value for ComponentRepoServer

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

* update NewRepoServerClient() to look for service with  ComponentRepoServer labels , if the label exist construct label selector PortForward

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

* add comment for the new constants

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

* instead of passing nil which leads to  nil ptr referance error, pass empty ClusterSharding{}

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

* check for operator install repo server name

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

* handle empty nil ptr dereference error

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

* handle  nil prt dereference

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

* typo correction

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

* run clidocsgen

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

---------

Signed-off-by: Mangaal <[email protected]>
…7452)

* metadata.annotations: too long

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

* added as a default case

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

---------

Signed-off-by: Surajyadav <[email protected]>
Add Shield.com as one of the users in the USER.md file

Signed-off-by: suhas-chikkanna <[email protected]>
…proj#17704 (argoproj#17706)

* Fix color generation for pod name in logs viewer

Signed-off-by: Philipp Trulson <[email protected]>

* Add rebuy to users.md

Signed-off-by: Philipp Trulson <[email protected]>

---------

Signed-off-by: Philipp Trulson <[email protected]>
…mand with `revisions` flag (argoproj#17650)

* Add support for multiple source to manifests --revision command

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

* Update GetManifests to support multiple sources

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

* remove testing logs

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

* update cli docs

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

* add extra validation for diff command

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

* fix lint

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

* Empty-Commit

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

* revert apimachinery version

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

* Update docs based on comments

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

---------

Signed-off-by: ishitasequeira <[email protected]>
…17693)

* test: unit test for respectIgnoreDifferences bug

Signed-off-by: Jesse Suen <[email protected]>

* test: simplify unit test

Signed-off-by: Jesse Suen <[email protected]>

* fix: fix calculating patch for respect ignore diff feature

Signed-off-by: Alexander Matyushentsev <[email protected]>

---------

Signed-off-by: Jesse Suen <[email protected]>
Signed-off-by: Alexander Matyushentsev <[email protected]>
Co-authored-by: Jesse Suen <[email protected]>
Bumps library/golang from 1.21.8 to 1.21.9.

---
updated-dependencies:
- dependency-name: library/golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps library/golang from 1.21.3 to 1.21.9.

---
updated-dependencies:
- dependency-name: library/golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…rgoproj#17664)

Bumps library/busybox from `650fd57` to `c3839dd`.

---
updated-dependencies:
- dependency-name: library/busybox
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: pasha-codefresh <[email protected]>
alexymantha and others added 2 commits April 4, 2024 16:01
…roj#14242) (argoproj#15636)

* squash commits

Signed-off-by: Alexy Mantha <[email protected]>

* Update util/git/client.go

Co-authored-by: Michael Crenshaw <[email protected]>
Signed-off-by: Alexy Mantha <[email protected]>

* fix error message

Signed-off-by: Alexy Mantha <[email protected]>

* add git client options

Signed-off-by: Alexy Mantha <[email protected]>

* Update generated code

Signed-off-by: Alexy Mantha <[email protected]>

* run fmt

Signed-off-by: Alexy Mantha <[email protected]>

* fix tests

Signed-off-by: Alexy Mantha <[email protected]>

* failed gen

Signed-off-by: Alexy Mantha <[email protected]>

* tweak logs and rename cache

Signed-off-by: Alexy Mantha <[email protected]>

* validate revisions

Signed-off-by: Alexy Mantha <[email protected]>

* fix tests

Signed-off-by: Alexy Mantha <[email protected]>

* fix tests

Signed-off-by: Alexy Mantha <[email protected]>

* fmt

Signed-off-by: Alexy Mantha <[email protected]>

* fix linting

Signed-off-by: Alexy Mantha <[email protected]>

* fixes from review

Signed-off-by: Alexy Mantha <[email protected]>

* generate

Signed-off-by: Alexy Mantha <[email protected]>

* fix

Signed-off-by: Alexy Mantha <[email protected]>

* use log context

Signed-off-by: Alexy Mantha <[email protected]>

---------

Signed-off-by: Alexy Mantha <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
antonhornquist and others added 9 commits April 11, 2024 09:37
…y fields in swagger (argoproj#17804)

* use arrays instead of map to display ApplicationManifetQuery fields in swagger

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

* fix equality conditions for souce-position check

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

---------

Signed-off-by: ishitasequeira <[email protected]>
This PR adds Metacore Games to USERS.md. Metacore Games uses ArgoCD as part of our Kubernetes Platform and IDP.

Signed-off-by: Juho Syrjänen <[email protected]>
* chore: Update USERS.md (argoproj#17683)

Add Shield.com as one of the users in the USER.md file

Signed-off-by: suhas-chikkanna <[email protected]>

sec: validate project before execute action

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

* sec: validate a project before execute an action

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

---------

Signed-off-by: pashakostohrys <[email protected]>
Co-authored-by: suhas-chikkanna <[email protected]>
…ackports Release' does not have a Release file. (argoproj#17836)

* fix: docker build fails due to "The repository 'http://deb.debian.org/debian buster-backports Release' does not have a Release file."

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

* fix: linter issue

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

* fix codegen issue

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

* fix e2e tests

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

* fix linter

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

---------

Signed-off-by: pashakostohrys <[email protected]>
Signed-off-by: pullmerge <[email protected]>
Co-authored-by: pasha-codefresh <[email protected]>
Signed-off-by: CI <[email protected]>
Co-authored-by: CI <[email protected]>
Co-authored-by: pasha-codefresh <[email protected]>
gdsoumya and others added 16 commits April 15, 2024 20:37
…er (argoproj#17816)

Bumps library/node from 21.7.1 to 21.7.3.

---
updated-dependencies:
- dependency-name: library/node
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…oproj#17815)

Bumps library/node from 21.7.1 to 21.7.3.

---
updated-dependencies:
- dependency-name: library/node
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…j#17794)

Bumps library/golang from `7d0dcbe` to `ff6cfbd`.

---
updated-dependencies:
- dependency-name: library/golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Upgrade to latest stable 7.0.x version to fix CVEs:

CVE-2023-41056

Signed-off-by: Tais P. Hansen <[email protected]>
Co-authored-by: Ishita Sequeira <[email protected]>
…7864)

* fix: native client mock should be generated with go gen

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

* fix: native client mock should be generated with go gen

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

* fix: native client mock should be generated with go gen

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

* adopt repository_test.go to new helm mock client

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

---------

Signed-off-by: pashakostohrys <[email protected]>
…proj#17274) (argoproj#17275)

* feat: Add Sources tab to show all sources of a multi-source app (argoproj#17274)

Signed-off-by: Keith Chong <[email protected]>

* Update ui/src/app/applications/components/resource-details/resource-details.tsx

Co-authored-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Keith Chong <[email protected]>

* Remove getAppSources

Signed-off-by: Keith Chong <[email protected]>

* Add address Ishita's comments. Add missing Ref field

Signed-off-by: Keith Chong <[email protected]>

* Use single quotes

Signed-off-by: Keith Chong <[email protected]>

---------

Signed-off-by: Keith Chong <[email protected]>
Co-authored-by: Alexandre Gaudreault <[email protected]>
Bumps library/golang from `7d0dcbe` to `81811f8`.

---
updated-dependencies:
- dependency-name: library/golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
So that log messages are propagated up, this caused issues for me when
trying to diagnose an issue linked to issue argoproj#17811. I've just copied the
approach used e.g. in `controller/appcontroller.go` when calling
`argodiff.NewDiffConfigBuilder`.

Sample output before this change:

    $ argocd --loglevel debug --server argocd-system.dev.aws.uw.systems app diff dev-enablement/dev-enablement

    ===== apps/Deployment dev-enablement/go-docs ======
    272c272
    <             cpu: "0"
    ---
    >             cpu: 0m
    275c275
    <             cpu: "0"
    ---
    >             cpu: 0m

Output with this change:

    $ argocd --loglevel debug --server argocd-system.dev.aws.uw.systems app diff dev-enablement/dev-enablement
    INFO[0000] Could not unmarshal to object of type apps/v1, Kind=Deployment: json: unknown field "restartPolicy"
    INFO[0000] Could not unmarshal to object of type apps/v1, Kind=Deployment: json: unknown field "restartPolicy"

    ===== apps/Deployment dev-enablement/go-docs ======
    272c272
    <             cpu: "0"
    ---
    >             cpu: 0m
    275c275
    <             cpu: "0"
    ---
    >             cpu: 0m
    INFO[0000] Could not create new object of type argoproj.io/v1alpha1, Kind=Application: no kind "Application" is registered for version "argoproj.io/v1alpha1" in scheme "pkg/runtime/scheme.go:100"
    INFO[0000] Could not create new object of type argoproj.io/v1alpha1, Kind=Application: no kind "Application" is registered for version "argoproj.io/v1alpha1" in scheme "pkg/runtime/scheme.go:100"
    INFO[0000] Could not create new object of type traefik.containo.us/v1alpha1, Kind=IngressRoute: no kind "IngressRoute" is registered for version "traefik.containo.us/v1alpha1" in scheme "pkg/runtime/scheme.go:100"
    INFO[0000] Could not create new object of type traefik.containo.us/v1alpha1, Kind=IngressRoute: no kind "IngressRoute" is registered for version "traefik.containo.us/v1alpha1" in scheme "pkg/runtime/scheme.go:100"
    INFO[0000] Could not create new object of type traefik.containo.us/v1alpha1, Kind=IngressRoute: no kind "IngressRoute" is registered for version "traefik.containo.us/v1alpha1" in scheme "pkg/runtime/scheme.go:100"
    INFO[0000] Could not create new object of type traefik.containo.us/v1alpha1, Kind=IngressRoute: no kind "IngressRoute" is registered for version "traefik.containo.us/v1alpha1" in scheme "pkg/runtime/scheme.go:100"

Signed-off-by: Matt Hughes <[email protected]>
)

Signed-off-by: philippe.dacosta <[email protected]>
Co-authored-by: philippe.dacosta <[email protected]>
Co-authored-by: pasha-codefresh <[email protected]>
…goproj#17866)

* chore: update gitops engine version

Signed-off-by: kkk777-7 <[email protected]>

* add: e2e and docs for force sync options

Signed-off-by: kkk777-7 <[email protected]>

* docs: Add warning description of force sync options

Signed-off-by: kkk777-7 <[email protected]>

---------

Signed-off-by: kkk777-7 <[email protected]>
Co-authored-by: pasha-codefresh <[email protected]>
* remove deprecated default cipher

Signed-off-by: Josh Wolf <[email protected]>

* regenerate CLI docs

Signed-off-by: Alexander Matyushentsev <[email protected]>

---------

Signed-off-by: Josh Wolf <[email protected]>
Signed-off-by: Alexander Matyushentsev <[email protected]>
Co-authored-by: Jann Fischer <[email protected]>
Co-authored-by: Alexander Matyushentsev <[email protected]>
@keithchong keithchong requested review from a team as code owners April 17, 2024 20:34
@keithchong
Copy link
Contributor Author

Some issue with rebasing. Closing this. Since no comments were added here, it's simpler to just create a new PR here: #17890

@keithchong keithchong closed this Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide Edit support in Sources tab for multi-source apps