Skip to content

Conversation

@sabre1041
Copy link
Contributor

Resolves #25494

@sabre1041 sabre1041 requested review from a team as code owners December 3, 2025 13:48
@bunnyshell
Copy link

bunnyshell bot commented Dec 3, 2025

🔴 Preview Environment stopped on Bunnyshell

See: Environment Details | Pipeline Logs

Available commands (reply to this comment):

  • 🔵 /bns:start to start the environment
  • 🚀 /bns:deploy to redeploy the environment
  • /bns:delete to remove the environment

@sabre1041 sabre1041 changed the title Added support for filtering by group in app get-resource CLI command feat(cli): added support for filtering by group in app get-resource CLI command Dec 3, 2025
@sabre1041 sabre1041 force-pushed the cli-get-resource-group branch from 41420b7 to 2875378 Compare December 3, 2025 14:02
@sabre1041 sabre1041 requested a review from a team as a code owner December 3, 2025 14:02
command.Flags().StringVar(&kind, "kind", "", "Kind of resource [REQUIRED]")
err := command.MarkFlagRequired("kind")
errors.CheckError(err)
command.Flags().StringVar(&group, "group", "", "Group")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
command.Flags().StringVar(&group, "group", "", "Group")
command.Flags().StringVar(&group, "group", "", "Group of resource")

nit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nitishfy I modeled it similar to the flags in the other subcommands to ensure alignment of the CLI output

Copy link
Member

@nitishfy nitishfy left a comment

Choose a reason for hiding this comment

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

Left a small comment otherwise LGTM!

@codecov
Copy link

codecov bot commented Dec 4, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (master@dea7ead). Learn more about missing BASE report.
⚠️ Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
cmd/argocd/commands/app_resources.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master   #25495   +/-   ##
=========================================
  Coverage          ?   62.47%           
=========================================
  Files             ?      351           
  Lines             ?    49469           
  Branches          ?        0           
=========================================
  Hits              ?    30907           
  Misses            ?    15603           
  Partials          ?     2959           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@reggie-k reggie-k left a comment

Choose a reason for hiding this comment

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

Thanks! Can you add some tests for this?

@sabre1041
Copy link
Contributor Author

Thanks! Can you add some tests for this?

There arent any

Thanks! Can you add some tests for this?

Since the new logic that was added is included within the cobra command, there are no existing set of tests that target any of the CLI commands, so I am hesitant to take on establishing such an implementation for a fairly minor enhancement

@reggie-k
Copy link
Member

reggie-k commented Dec 4, 2025

Since the new logic that was added is included within the cobra command, there are no existing set of tests that target any of the CLI commands, so I am hesitant to take on establishing such an implementation for a fairly minor enhancement

Yeah, for unit tests it is true, but we have a lot of existing e2e tests that invoke CLI.

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.

Filter app get-resource command by API group

4 participants