-
Notifications
You must be signed in to change notification settings - Fork 0
feat: devenvs #135
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
feat: devenvs #135
Conversation
Warning Rate limit exceeded@gfyrag has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 14 minutes and 44 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (2)
WalkthroughThe Earthfile was updated to replace a fixed core image import with a parameterized argument, allowing dynamic image selection. The deploy target now requires a REPOSITORY argument and supports conditional Helm configuration based on a new FORMANCE_DEV_CLUSTER_V2 argument, adjusting Helm upgrade parameters and namespace accordingly. Changes
Poem
✨ Finishing Touches
🧪 Generate Unit Tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 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: 0
🧹 Nitpick comments (2)
Earthfile (2)
118-128
: Simplify the conditional argument building logic.The current approach of string concatenation for
ADDITIONAL_ARGS
works but could be more maintainable. Consider using arrays or a more structured approach for building Helm arguments.Alternative approach using multiple SET commands:
- LET ADDITIONAL_ARGS="" ARG FORMANCE_DEV_CLUSTER_V2=no + LET HELM_ARGS="" IF [ "$FORMANCE_DEV_CLUSTER_V2" == "yes" ] - SET ADDITIONAL_ARGS="$ADDITIONAL_ARGS --set imagePullSecrets[0].name=zot" - SET ADDITIONAL_ARGS="$ADDITIONAL_ARGS --set server.address=membership.formance.svc.cluster.local:8082" - SET ADDITIONAL_ARGS="$ADDITIONAL_ARGS --set server.tls.enabled=false" - SET ADDITIONAL_ARGS="$ADDITIONAL_ARGS --set global.monitoring.traces.endpoint=otel-shared-admin.default.svc.cluster.local" - SET ADDITIONAL_ARGS="$ADDITIONAL_ARGS --set global.monitoring.metrics.endpoint=otel-shared-admin.default.svc.cluster.local" + SET HELM_ARGS="--set imagePullSecrets[0].name=zot --set server.address=membership.formance.svc.cluster.local:8082 --set server.tls.enabled=false --set global.monitoring.traces.endpoint=otel-shared-admin.default.svc.cluster.local --set global.monitoring.metrics.endpoint=otel-shared-admin.default.svc.cluster.local" ELSE - SET ADDITIONAL_ARGS="$ADDITIONAL_ARGS --set server.address=$user.$tld:443" + SET HELM_ARGS="--set server.address=$user.$tld:443" END
122-125
: Consider externalizing hardcoded service addresses.The internal service addresses are hardcoded in the conditional block. Consider making these configurable through arguments or environment variables for better flexibility across different environments.
+ ARG MEMBERSHIP_SERVICE=membership.formance.svc.cluster.local:8082 + ARG OTEL_ENDPOINT=otel-shared-admin.default.svc.cluster.local IF [ "$FORMANCE_DEV_CLUSTER_V2" == "yes" ] SET ADDITIONAL_ARGS="$ADDITIONAL_ARGS --set imagePullSecrets[0].name=zot" - SET ADDITIONAL_ARGS="$ADDITIONAL_ARGS --set server.address=membership.formance.svc.cluster.local:8082" + SET ADDITIONAL_ARGS="$ADDITIONAL_ARGS --set server.address=$MEMBERSHIP_SERVICE" SET ADDITIONAL_ARGS="$ADDITIONAL_ARGS --set server.tls.enabled=false" - SET ADDITIONAL_ARGS="$ADDITIONAL_ARGS --set global.monitoring.traces.endpoint=otel-shared-admin.default.svc.cluster.local" - SET ADDITIONAL_ARGS="$ADDITIONAL_ARGS --set global.monitoring.metrics.endpoint=otel-shared-admin.default.svc.cluster.local" + SET ADDITIONAL_ARGS="$ADDITIONAL_ARGS --set global.monitoring.traces.endpoint=$OTEL_ENDPOINT" + SET ADDITIONAL_ARGS="$ADDITIONAL_ARGS --set global.monitoring.metrics.endpoint=$OTEL_ENDPOINT"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
Earthfile
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Dirty
🔇 Additional comments (4)
Earthfile (4)
3-4
: LGTM: Good parameterization of core image.The change from a fixed import to a parameterized
ARG core
allows for flexible core image version selection while maintaining a sensible default. This improves maintainability and deployment flexibility.
134-137
: LGTM: Proper use of dynamic repository and arguments.The helm upgrade command correctly incorporates the new
REPOSITORY
argument andADDITIONAL_ARGS
, maintaining proper syntax and functionality.
129-129
: Verify the namespace change impact.The namespace changed from
formance-system
toformance
. Ensure this change is intentional and won't break existing deployments or cause conflicts with existing resources.#!/bin/bash # Description: Check for references to the old namespace to ensure consistency # Expected: All references should be updated or the change should be documented # Search for references to the old namespace rg -i "formance-system" # Search for other helm/kubectl commands that might reference namespaces rg -A 3 -B 3 "namespace.*formance"
117-117
: Verify all callers provide the REPOSITORY argument.The new required
REPOSITORY
argument improves configurability, but ensure all existing deploy target invocations are updated to provide this argument.#!/bin/bash # Description: Search for deploy target usage to verify REPOSITORY argument is provided # Expected: All deploy target calls should include REPOSITORY argument # Search for deploy target invocations rg -A 10 -B 5 "BUILD.*\+deploy" # Search for any earthly command that might call deploy rg -A 5 -B 5 "earthly.*deploy"
055fe4d
to
4c2696b
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.
Bug: Refactoring Changes TLS Behavior in Stargate Spec
The refactoring of the Stargate
spec's TLS configuration changed its behavior. Previously, the tls
field was omitted from the spec when DisableTLS
was false
(implying default TLS settings). Now, an empty tls: {}
object is always included in the spec in this scenario. This alters the API contract, as downstream systems may interpret an empty tls
object differently from a missing tls
field, potentially causing unintended TLS behavior.
internal/membership_listener.go#L274-L292
agent/internal/membership_listener.go
Lines 274 to 292 in 4413d56
tlsSpec := map[string]any{} | |
if membershipStack.StargateConfig.DisableTLS { | |
tlsSpec["disable"] = true | |
} | |
if _, err := c.createOrUpdateStackDependency(ctx, stack.GetName(), stack.GetName(), stack, v1beta1.GroupVersion.WithKind("Stargate"), map[string]any{ | |
"metadata": metadata, | |
"spec": map[string]any{ | |
"organizationID": parts[0], | |
"stackID": parts[1], | |
"serverURL": membershipStack.StargateConfig.Url, | |
"auth": map[string]any{ | |
"issuer": membershipStack.AuthConfig.Issuer, | |
"clientID": membershipStack.AuthConfig.ClientId, | |
"clientSecret": membershipStack.AuthConfig.ClientSecret, | |
}, | |
"tls": tlsSpec, | |
}, |
Was this report helpful? Give feedback by reacting with 👍 or 👎
No description provided.