-
Notifications
You must be signed in to change notification settings - Fork 73
[Feature] [Platform] Storage Debug #1928
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
base: master
Are you sure you want to change the base?
Conversation
30243cb
to
0b305d2
Compare
0b305d2
to
b0ae223
Compare
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 implements a debug‐package pre-shutdown extension for the ShutdownV1 integration, adds a helper to send files in StorageV2, and standardizes shutdown context propagation across the CLI and tests.
- Add ShutdownV1 debug extension with file collection and new flags
- Introduce
SendFile
wrapper in StorageV2 and fix context/lock handling - Replace plain
Execute()
calls withExecuteContext(shutdown.Context())
Reviewed Changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
pkg/util/context.go | Add ContextKey type for custom context values |
pkg/util/constants/profiles.go | Add ProfilesExtensionEnabled and NewProfileIntegrationFeature |
pkg/util/constants/envs.go | Define INTEGRATION_SERVICE_ADDRESS environment variable |
pkg/util/closer/close.go | Fix lock/unlock order in Close() |
pkg/integrations/suite_test.go | Use ExecuteContext and new shutdown injection helper |
pkg/integrations/suite.go | Introduce WithShutdownV1ContextCancelFunc |
pkg/integrations/sidecar/integration.go | Wire in INTEGRATION_SERVICE_ADDRESS constant and merge envs |
pkg/integrations/sidecar/extension.shutdown.v1.debug.go | New debug‐package extension for sidecar |
pkg/integrations/shutdown_v1.go | Add debug flags and pass configuration to handler |
pkg/integrations/register.go | Integrate health shutdown enabling and dedupe Pong setup |
pkg/deployment/resources/arango_profiles.go | Extend profile labels to include debug feature selector |
integrations/storage/v2/definition/helpers.go | Add SendFile helper wrapping Send |
integrations/shutdown/v1/service_test.go | Update test client instantiation for new signature |
integrations/shutdown/v1/logger.go | New logger registration for ShutdownV1 |
integrations/shutdown/v1/impl_test.go | Update impl tests for new New(Configuration{}, c) |
integrations/shutdown/v1/impl.go | Implement debug file walk and send in Close() |
integrations/shutdown/v1/configuration.go | Define Configuration and ConfigurationDebug structs |
docs/integration/shutdown.v1.md | Document new DebugPackage pre-shutdown hook |
docs/integration-sidecar.md | Add note about standard Kubernetes resources |
docs/cli/arangodb_operator_integration.md | Document new debug flags for shutdown.v1 |
docs/cli/arangodb_operator.md | Add integration-shutdown-v1 to allowable loggers |
cmd/main-platform/main_int.go | Switch to ExecuteContext(shutdown.Context()) |
cmd/integration/init.go | Switch to ExecuteContext(shutdown.Context()) |
cmd/cmd_ops.go | Switch to ExecuteContext(shutdown.Context()) |
cmd/cmd.go | Switch to ExecuteContext(shutdown.Context()) |
README.md | Update --log.level defaults to include shutdown.v1 |
Comments suppressed due to low confidence (2)
pkg/util/constants/envs.go:25
- Exported variable
INTEGRATION_SERVICE_ADDRESS
should have a doc comment explaining its purpose and usage.
var INTEGRATION_SERVICE_ADDRESS util.EnvironmentVariable = "INTEGRATION_SERVICE_ADDRESS"
pkg/util/context.go:122
- Exported type
ContextKey
should include a doc comment describing its intended use for context value keys.
type ContextKey string
@@ -31,6 +32,24 @@ import ( | |||
|
|||
const BufferSize = 4094 | |||
|
|||
func SendFile(ctx context.Context, client StorageV2Client, key string, path string) (*StorageV2WriteObjectResponse, error) { | |||
f, err := os.Open(path) |
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.
File handle opened with os.Open is not closed on successful Send; add defer f.Close()
immediately after opening to avoid resource leaks.
Copilot uses AI. Check for mistakes.
@@ -19,6 +19,8 @@ Integration Sidecar is supported in a few resources managed by Operator: | |||
- ArangoSchedulerCronJob (scheduler.arangodb.com/v1beta1) | |||
- ArangoSchedulerPod (scheduler.arangodb.com/v1beta1) | |||
|
|||
S tandard Kubernetes Resources (like Pod) are also supported with Webhook extension is enabled. |
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.
Typo: 'S tandard' should be 'Standard'.
S tandard Kubernetes Resources (like Pod) are also supported with Webhook extension is enabled. | |
Standard Kubernetes Resources (like Pod) are also supported with Webhook extension is enabled. |
Copilot uses AI. Check for mistakes.
No description provided.