Skip to content

Conversation

@daengdaengLee
Copy link
Member

Hello,

This PR is related to issue #22545.
For the /applications page, we were missing some null/undefined checks, so I've added optional chaining.
I couldn't reproduce this issue, so I'm not entirely sure if this fix will solve it definitively.
However, I identified and corrected the suspicious code in the UI based on the error details from the issue.

Here's the detailed flow:

  • In ui/src/app/app.tsx, the applications.component is registered to the /applications path within routes.
  • The applications.component is actually the ApplicationsContainer component, declared in ui/src/app/applications/components/applications-container.tsx.
  • The component registered for the root path (without sub-paths) is ApplicationsList (ui/src/app/applications/components/applications-list/applications-list.tsx).
  • The ApplicationsList component uses ApplicationsTable (ui/src/app/applications/components/applications-list/applications-table.tsx).
  • The ApplicationsTable component uses ApplicationsLabels (ui/src/app/applications/components/applications-list/applications-labels.tsx).
  • Inside ApplicationsLabels, the code getAppDefaultSource(app).targetRevision is used.
  • getAppDefaultSource (ui/src/app/applications/components/utils.tsx) can return null or undefined.
  • I added optional chaining before trying to read targetRevision from the return value: getAppDefaultSource(app)?.targetRevision.

Checklist:

  • [b] 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).

@daengdaengLee daengdaengLee requested a review from a team as a code owner June 15, 2025 10:03
@bunnyshell
Copy link

bunnyshell bot commented Jun 15, 2025

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

Copy link
Member

@ishitasequeira ishitasequeira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @daengdaengLee for the PR. LGTM

@ishitasequeira ishitasequeira merged commit 3ff30df into argoproj:master Jun 17, 2025
24 checks passed
@daengdaengLee daengdaengLee deleted the issue-22545 branch June 17, 2025 02:50
enneitex pushed a commit to enneitex/argo-cd that referenced this pull request Aug 24, 2025
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.

3 participants