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

Update commands to work with published APIs #3070

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

eablack
Copy link
Contributor

@eablack eablack commented Nov 1, 2024

GUS WI

Description

This updates our OTel command implementations to work with the just published APIs. Notably, the APIs at the moment seem to require IDs instead of names, which is not ideal. Our CLI interface almost always expects the name of a resource, not the ID (if a name exists for the resource, of course). So, for now, we have to make an extra API request to get that name. I also added a "You have no telemetry drains" message for the telemetry index list command.

Testing

  1. Pull down branch and yarn build
  2. ./bin/run telemetry ... with an app or space
  3. see the "you have no drains" message
  4. ./bin/run telemetry:add ... with an app or space
  5. ./bin/run telemetry ... with the app or space using the same app or space
  6. see that the new telemetry drain is listed
  7. ./bin/run telemetry:update ...
  8. ./bin/run telemetry ...and see the changes you made withupdate`
  9. ./bin/run telemetry:remove ...
  10. ./bin/run telemetry ...` and see the drain has been removed

@eablack eablack self-assigned this Nov 1, 2024
@eablack eablack marked this pull request as ready for review November 1, 2024 22:39
@eablack eablack requested a review from a team as a code owner November 1, 2024 22:39
Copy link
Contributor

@k80bowman k80bowman left a comment

Choose a reason for hiding this comment

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

I found one little documentation thing, but otherwise this looks and works great.

packages/cli/src/commands/telemetry/add.ts Outdated Show resolved Hide resolved
Co-authored-by: Katy Bowman <katy.bowman@salesforce.com>
@eablack eablack temporarily deployed to AcceptanceTests November 4, 2024 16:46 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests November 4, 2024 16:46 — with GitHub Actions Inactive
@eablack eablack merged commit 054835b into prerelease/10.0.0-alpha Nov 4, 2024
8 checks passed
@eablack eablack deleted the eb/fix-telemetry-commands branch November 4, 2024 16:58
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.

2 participants