-
Notifications
You must be signed in to change notification settings - Fork 72
[Feature] [LM] Inventory CLI #1974
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
Conversation
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.
Pull Request Overview
This PR introduces a CLI-based inventory generator for the License Manager component, enabling deployment inventory collection and reporting through the platform command.
- New license CLI command with inventory subcommand to collect deployment metadata
- Thread management improvements with duration-based waiting mechanisms
- ArangoDB deployment connection utilities for CLI authentication and requests
Reviewed Changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/util/grpc/object.go | JSON marshaling wrapper for protobuf messages |
| pkg/util/executor/threader.go | Enhanced thread management with duration-based waiting |
| pkg/util/executor/executor.go | Refactored timeout handling to use new Wait() mechanism |
| pkg/util/cli/deployment.go | Deployment connection configuration for CLI |
| pkg/util/cli/deployment.auth.token.go | Token authentication implementation |
| pkg/util/cli/deployment.auth.basic.go | Basic authentication implementation |
| pkg/util/arangod/request.go | Generic HTTP request utilities for ArangoDB |
| pkg/platform/license_inventory.go | Inventory generation CLI command implementation |
| pkg/platform/license.go | License command group definition |
| pkg/platform/inventory/types_test.go | Tests for inventory value type conversions |
| pkg/platform/inventory/types.go | Inventory item type definitions and conversions |
| pkg/platform/inventory/queries/timestamp.aql | AQL query for execution timestamp |
| pkg/platform/inventory/inventory.proto | Protobuf schema for inventory data |
| pkg/platform/inventory/inventory.pb.go | Generated protobuf code |
| pkg/platform/inventory/inventory.go | Inventory fetching orchestration |
| pkg/platform/inventory/global.go | Global executor registry |
| pkg/platform/inventory/fetcher.server.version.go | Server version fetcher |
| pkg/platform/inventory/fetcher.server.mode.go | Server mode detection fetcher |
| pkg/platform/inventory/fetcher.deployment.id.go | Deployment ID fetcher |
| pkg/platform/inventory/fetcher.aql.timestamp.go | AQL timestamp query executor |
| pkg/platform/inventory/aql.go | Generic AQL query execution framework |
| pkg/platform/installer.go | Registered license command |
| pkg/platform/flags.go | Added deployment connection flags |
| pkg/deployment/client/id.go | Deployment ID client method |
| pkg/deployment/client/client.go | Added DeploymentID method to interface |
| pkg/apis/shared/validate.go | New validation path helper |
| internal/readme_cli.go | CLI documentation generation updates |
| docs/cli/arangodb_operator_platform.md | Updated documentation with new commands |
| CHANGELOG.md | Added feature entry |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| t.parent.threads <- t.id | ||
|
|
||
| t.released = true |
Copilot
AI
Oct 20, 2025
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.
Setting t.released = true after sending to the channel creates a race condition. If another goroutine calls Wait() between the channel send and setting released to true, it could send the ID twice. Move t.released = true before the channel send.
| t.parent.threads <- t.id | |
| t.released = true | |
| t.released = true | |
| t.parent.threads <- t.id |
| t, ok := v.(time.Time) | ||
| if !ok { | ||
| return nil, errors.Errorf("expected type %T, got %T", t, v) | ||
| } |
Copilot
AI
Oct 20, 2025
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.
The truncation to seconds should be documented. Add a comment explaining why time.Time values are truncated to second precision when converting to ItemValue.
| } | |
| } | |
| // Truncate time.Time to second precision to ensure compatibility with protobuf Timestamp, | |
| // which only supports second-level precision. This avoids issues with sub-second values. |
No description provided.