-
Notifications
You must be signed in to change notification settings - Fork 5
Noam/core 5552 cli should use new ingestion keys 8000 #318
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
Noam/core 5552 cli should use new ingestion keys #318
Conversation
- Introduced a new command `get-ingestion-key` to retrieve or create an ingestion key using the Groundcover SDK. - Updated Go version in Earthfile and go.mod to 1.24. - Added new dependencies including `github.com/groundcover-com/groundcover-sdk-go` v1.34.0 and various `go-openapi` packages. - Enhanced client functionality with a custom transport to include tenant UUID in requests.
- Updated the `get-ingestion-key` command to require an ingestion key type as an argument. - Modified the `getOrCreateIngestionKey` function to use the provided key type for generating the ingestion key name. - Improved error handling to ensure the key type is specified before proceeding.
- Updated the `getOrCreateIngestionKey` function to convert the generated ingestion key name to lowercase for consistency. - This change ensures that the ingestion key names are uniformly formatted, improving usability and reducing potential errors.
…use-new-ingestion-keys
WalkthroughThe update changes how ingestion key names are generated in the Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant IngestionKeyManager
Caller->>IngestionKeyManager: getOrCreateIngestionKey(type)
IngestionKeyManager->>IngestionKeyManager: keyName = format(constant, toLower(type))
IngestionKeyManager->>IngestionKeyManager: list existing keys with keyName
alt Key exists
IngestionKeyManager-->>Caller: return existing key
else Key does not exist
IngestionKeyManager->>IngestionKeyManager: create new key with keyName
IngestionKeyManager-->>Caller: return new key
end
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
cmd/ingestion_key.go
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: goreleaser
- GitHub Check: Analyze (go)
- GitHub Check: Analyze (actions)
🔇 Additional comments (1)
cmd/ingestion_key.go (1)
6-6
: Import addition is correct.Necessary for the
strings.ToLower()
functionality.
Summary by CodeRabbit