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
Signed-off-by: danqixu <yzxudanqi@gmail.com>
Signed-off-by: treble-snake <treble.snake@gmail.com>
Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
…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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Add arturia as users

Signed-off-by: olivier beyler <beyler_olivier@yahoo.fr>
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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* sec: limit helm index max size

Signed-off-by: pashakostohrys <pavel@codefresh.io>

* sec: limit helm index max size

Signed-off-by: pashakostohrys <pavel@codefresh.io>

* feat: fix tests and linter

Signed-off-by: pashakostohrys <pavel@codefresh.io>

---------

Signed-off-by: pashakostohrys <pavel@codefresh.io>
Signed-off-by: Leonardo Luz Almeida <leoluz@users.noreply.github.com>
* Update security.md

fix RBAC link

Signed-off-by: Deniz Erdogan <91744937+deer-wmde@users.noreply.github.com>

* Update security.md

Signed-off-by: Deniz Erdogan <91744937+deer-wmde@users.noreply.github.com>

* Update security.md

fix link to application-controller role

Signed-off-by: Deniz Erdogan <91744937+deer-wmde@users.noreply.github.com>

* Update security.md

Signed-off-by: Deniz Erdogan <91744937+deer-wmde@users.noreply.github.com>

---------

Signed-off-by: Deniz Erdogan <91744937+deer-wmde@users.noreply.github.com>
* docs: added warning for multiple sources

Signed-off-by: Kostis (Codefresh) <39800303+kostis-codefresh@users.noreply.github.com>

* docs: minor spelling

Signed-off-by: Kostis (Codefresh) <39800303+kostis-codefresh@users.noreply.github.com>

---------

Signed-off-by: Kostis (Codefresh) <39800303+kostis-codefresh@users.noreply.github.com>
…nd --refresh Flags (argoproj#17613)

* add const key value for ComponentRepoServer

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

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

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* add comment for the new constants

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

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

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* check for operator install repo server name

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* handle empty nil ptr dereference error

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* handle  nil prt dereference

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* typo correction

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

* run clidocsgen

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>

---------

Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>
…7452)

* metadata.annotations: too long

Signed-off-by: Surajyadav <harrypotter1108@gmail.com>

* added as a default case

Signed-off-by: Surajyadav <harrypotter1108@gmail.com>

---------

Signed-off-by: Surajyadav <harrypotter1108@gmail.com>
Add Shield.com as one of the users in the USER.md file

Signed-off-by: suhas-chikkanna <162577490+suhas-chikkanna@users.noreply.github.com>
Signed-off-by: Kostis (Codefresh) <39800303+kostis-codefresh@users.noreply.github.com>
…proj#17704 (argoproj#17706)

* Fix color generation for pod name in logs viewer

Signed-off-by: Philipp Trulson <der-eismann@users.noreply.github.com>

* Add rebuy to users.md

Signed-off-by: Philipp Trulson <der-eismann@users.noreply.github.com>

---------

Signed-off-by: Philipp Trulson <der-eismann@users.noreply.github.com>
Signed-off-by: lukasz <lukasz.luszczynski@getyourguide.com>
Co-authored-by: Ishita Sequeira <46771830+ishitasequeira@users.noreply.github.com>
Signed-off-by: Petr Šťastný <petr@stastny.eu>
…mand with `revisions` flag (argoproj#17650)

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

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* Update GetManifests to support multiple sources

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* remove testing logs

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* update cli docs

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* add extra validation for diff command

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* fix lint

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* Empty-Commit

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* revert apimachinery version

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* Update docs based on comments

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

---------

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>
…17693)

* test: unit test for respectIgnoreDifferences bug

Signed-off-by: Jesse Suen <jesse@akuity.io>

* test: simplify unit test

Signed-off-by: Jesse Suen <jesse@akuity.io>

* fix: fix calculating patch for respect ignore diff feature

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

---------

Signed-off-by: Jesse Suen <jesse@akuity.io>
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Co-authored-by: Jesse Suen <jesse@akuity.io>
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] <support@github.com>
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] <support@github.com>
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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: pasha-codefresh <pavel@codefresh.io>
alexymantha and others added 2 commits April 4, 2024 16:01
…roj#14242) (argoproj#15636)

* squash commits

Signed-off-by: Alexy Mantha <alexy@mantha.dev>

* Update util/git/client.go

Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Alexy Mantha <alexy@mantha.dev>

* fix error message

Signed-off-by: Alexy Mantha <alexy@mantha.dev>

* add git client options

Signed-off-by: Alexy Mantha <alexy@mantha.dev>

* Update generated code

Signed-off-by: Alexy Mantha <alexy@mantha.dev>

* run fmt

Signed-off-by: Alexy Mantha <alexy@mantha.dev>

* fix tests

Signed-off-by: Alexy Mantha <alexy@mantha.dev>

* failed gen

Signed-off-by: Alexy Mantha <alexy@mantha.dev>

* tweak logs and rename cache

Signed-off-by: Alexy Mantha <alexy@mantha.dev>

* validate revisions

Signed-off-by: Alexy Mantha <alexy@mantha.dev>

* fix tests

Signed-off-by: Alexy Mantha <alexy@mantha.dev>

* fix tests

Signed-off-by: Alexy Mantha <alexy@mantha.dev>

* fmt

Signed-off-by: Alexy Mantha <alexy@mantha.dev>

* fix linting

Signed-off-by: Alexy Mantha <alexy@mantha.dev>

* fixes from review

Signed-off-by: Alexy Mantha <alexy@mantha.dev>

* generate

Signed-off-by: Alexy Mantha <alexy@mantha.dev>

* fix

Signed-off-by: Alexy Mantha <alexy@mantha.dev>

* use log context

Signed-off-by: Alexy Mantha <alexy@mantha.dev>

---------

Signed-off-by: Alexy Mantha <alexy@mantha.dev>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
…roj#17734)

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>
antonhornquist and others added 9 commits April 11, 2024 09:37
Signed-off-by: Anton Hörnquist <anton.hornquist@gmail.com>
…y fields in swagger (argoproj#17804)

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

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

* fix equality conditions for souce-position check

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>

---------

Signed-off-by: ishitasequeira <ishiseq29@gmail.com>
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 <juho.syrjanen@metacoregames.com>
* chore: Update USERS.md (argoproj#17683)

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

Signed-off-by: suhas-chikkanna <162577490+suhas-chikkanna@users.noreply.github.com>

sec: validate project before execute action

Signed-off-by: pashakostohrys <pavel@codefresh.io>

* sec: validate a project before execute an action

Signed-off-by: pashakostohrys <pavel@codefresh.io>

---------

Signed-off-by: pashakostohrys <pavel@codefresh.io>
Co-authored-by: suhas-chikkanna <162577490+suhas-chikkanna@users.noreply.github.com>
…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 <pavel@codefresh.io>

* fix: linter issue

Signed-off-by: pashakostohrys <pavel@codefresh.io>

* fix codegen issue

Signed-off-by: pashakostohrys <pavel@codefresh.io>

* fix e2e tests

Signed-off-by: pashakostohrys <pavel@codefresh.io>

* fix linter

Signed-off-by: pashakostohrys <pavel@codefresh.io>

---------

Signed-off-by: pashakostohrys <pavel@codefresh.io>
Signed-off-by: pullmerge <watchmessi@outlook.com>
Co-authored-by: pasha-codefresh <pavel@codefresh.io>
Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
Co-authored-by: pasha-codefresh <pavel@codefresh.io>
Signed-off-by: jannfis <jann@mistrust.net>
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] <support@github.com>
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] <support@github.com>
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] <support@github.com>
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 <taishansen@gmail.com>
Co-authored-by: Ishita Sequeira <46771830+ishitasequeira@users.noreply.github.com>
…7757)

Signed-off-by: Adrian Berger <adria.berger94@gmail.com>
Co-authored-by: pasha-codefresh <pavel@codefresh.io>
…7864)

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

Signed-off-by: pashakostohrys <pavel@codefresh.io>

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

Signed-off-by: pashakostohrys <pavel@codefresh.io>

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

Signed-off-by: pashakostohrys <pavel@codefresh.io>

* adopt repository_test.go to new helm mock client

Signed-off-by: pashakostohrys <pavel@codefresh.io>

---------

Signed-off-by: pashakostohrys <pavel@codefresh.io>
Signed-off-by: pashakostohrys <pavel@codefresh.io>
…proj#17274) (argoproj#17275)

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

Signed-off-by: Keith Chong <kykchong@redhat.com>

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

Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
Signed-off-by: Keith Chong <kykchong@redhat.com>

* Remove getAppSources

Signed-off-by: Keith Chong <kykchong@redhat.com>

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

Signed-off-by: Keith Chong <kykchong@redhat.com>

* Use single quotes

Signed-off-by: Keith Chong <kykchong@redhat.com>

---------

Signed-off-by: Keith Chong <kykchong@redhat.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…rgoproj#17872)

Signed-off-by: isihu <62214125+isihu@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 <mhughes@uw.co.uk>
)

Signed-off-by: philippe.dacosta <philippe.dacosta@adevinta.com>
Co-authored-by: philippe.dacosta <philippe.dacosta@adevinta.com>
Co-authored-by: pasha-codefresh <pavel@codefresh.io>
…goproj#17866)

* chore: update gitops engine version

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

* add: e2e and docs for force sync options

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

* docs: Add warning description of force sync options

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

---------

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
Co-authored-by: pasha-codefresh <pavel@codefresh.io>
* remove deprecated default cipher

Signed-off-by: Josh Wolf <josh@wolfs.io>

* regenerate CLI docs

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

---------

Signed-off-by: Josh Wolf <josh@wolfs.io>
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Co-authored-by: Jann Fischer <jann@mistrust.net>
Co-authored-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
@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