-
Notifications
You must be signed in to change notification settings - Fork 60
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
fix(admin-api): Fix missing Zendesk webhook env variable #18010
Conversation
WalkthroughThis pull request introduces a new secret configuration for the auth-admin-api service. It adds the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (3)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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
Documentation and Community
|
View your CI Pipeline Execution ↗ for commit 9bd590c.
☁️ Nx Cloud last updated this comment at |
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.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (6)
charts/identity-server-services/services-auth-admin-api/values.dev.yaml
is excluded by!charts/**
charts/identity-server-services/services-auth-admin-api/values.prod.yaml
is excluded by!charts/**
charts/identity-server-services/services-auth-admin-api/values.staging.yaml
is excluded by!charts/**
charts/identity-server/values.dev.yaml
is excluded by!charts/**
charts/identity-server/values.prod.yaml
is excluded by!charts/**
charts/identity-server/values.staging.yaml
is excluded by!charts/**
📒 Files selected for processing (2)
apps/services/auth/admin-api/infra/auth-admin-api.ts
(1 hunks)apps/services/auth/admin-api/src/environments/environment.ts
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
`apps/services/**/*`: "Confirm that the code adheres to the ...
apps/services/**/*
: "Confirm that the code adheres to the following:
- NestJS architecture, including modules, services, and controllers.
- Dependency injection patterns and service encapsulation.
- Integration and unit testing coverage and practices."
apps/services/auth/admin-api/infra/auth-admin-api.ts
apps/services/auth/admin-api/src/environments/environment.ts
`apps/**/*`: "Confirm that the code adheres to the following...
apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
apps/services/auth/admin-api/infra/auth-admin-api.ts
apps/services/auth/admin-api/src/environments/environment.ts
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: prepare
🔇 Additional comments (2)
apps/services/auth/admin-api/infra/auth-admin-api.ts (1)
86-87
:❓ Verification inconclusive
LGTM! Verify secret configuration in Kubernetes.
The new Zendesk webhook secret follows the established naming pattern and is properly integrated into the service configuration.
Please ensure that the secret has been properly configured in the Kubernetes cluster for all environments (dev, staging, prod) before deploying:
🏁 Script executed:
#!/bin/bash # Description: Verify the existence of the new secret in Kubernetes. # Note: This requires appropriate cluster access and kubectl configuration. # Check if the secret exists in the services-auth namespace kubectl get secret -n services-auth ZENDESK_WEBHOOK_SECRET_IDENTITY_CONFIRMATION -o json | jq -r '.metadata.name'Length of output: 211
LGTM! Manual verification of secret configuration recommended.
The new Zendesk webhook secret follows the established naming pattern and is properly integrated into the service configuration. However, our automated verification attempt using the script was inconclusive because the
kubectl
command was not available in the current environment. Please verify manually that the secret exists and is correctly configured in your Kubernetes clusters (dev, staging, prod) before deployment.apps/services/auth/admin-api/src/environments/environment.ts (1)
20-24
:❓ Verification inconclusive
Verify the environment variable in deployment configuration.
Please ensure that the Zendesk webhook secret is properly configured in the deployment environment.
Run the following script to check the environment variable configuration:
🏁 Script executed:
#!/bin/bash # Description: Check for the presence of Zendesk webhook secret in deployment configuration # Search for Zendesk webhook secret configuration rg -i "ZENDESK.*SECRET.*CONFIRMATION" --type yamlLength of output: 200
Ensure Deployment Configuration Includes Zendesk Webhook Secret
The code in
apps/services/auth/admin-api/src/environments/environment.ts
(lines 20–24) uses an environment variable (process.env.ZENDESK_WEBHOOK_SECRET_IDENTITY_CONFIRMATION
) with a fallback to a static test secret. Please verify that in your deployment environment the actual Zendesk webhook secret is set. The initial search using a YAML file filter did not scan any files—try running the above script to search all files or manually check your deployment configuration (e.g., environment files, deployment YAMLs) to confirm that theZENDESK_WEBHOOK_SECRET_IDENTITY_CONFIRMATION
variable is defined and set correctly.
🏁 Script executed:
#!/bin/bash # Attempt to search for the Zendesk webhook secret variable in the entire repository (ignoring file type filters) rg -i "ZENDESK_WEBHOOK_SECRET_IDENTITY_CONFIRMATION" .Length of output: 54
Ensure Zendesk Webhook Secret is Configured in Deployment
The code in
apps/services/auth/admin-api/src/environments/environment.ts
(lines 20–24) usesprocess.env.ZENDESK_WEBHOOK_SECRET_IDENTITY_CONFIRMATION
with a fallback to a static testing value. Our searches (both in YAML files and across the repository) did not reveal any deployment configuration that references this variable. This is common if environment configurations are managed outside of version control. However, to avoid inadvertently using the static test secret in production, please manually verify that your deployment configuration (e.g., environment files, CI/CD settings) defines theZENDESK_WEBHOOK_SECRET_IDENTITY_CONFIRMATION
variable with the correct secret.
- File under review:
apps/services/auth/admin-api/src/environments/environment.ts
(lines 20–24)
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.
LGTM
What
Fix this error for missing env variable
Why
Specify why you need to achieve this
Screenshots / Gifs
Attach Screenshots / Gifs to help reviewers understand the scope of the pull request
Checklist:
Summary by CodeRabbit