feat(variables): add external secrets pages#2721
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## staging #2721 +/- ##
===========================================
+ Coverage 44.03% 45.89% +1.86%
===========================================
Files 599 1145 +546
Lines 14793 24676 +9883
Branches 4401 7364 +2963
===========================================
+ Hits 6514 11326 +4812
- Misses 7111 11353 +4242
- Partials 1168 1997 +829
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
d04050d to
8848526
Compare
44e0ca4 to
1a73b02
Compare
9a03d67 to
b6daf87
Compare
Revert change Add missing "Import from env file" option Fix failing unit test
b6daf87 to
204de3f
Compare
| import { getServiceVariableScope } from './service-variables-utils' | ||
| import { useServiceVariablesTab } from './use-service-variables-tab' | ||
|
|
||
| export function BuiltInTab() { |
There was a problem hiding this comment.
I think the file should have the same name with the exported function
And it missing a document title!
|
|
||
| function RouteComponent() { | ||
| const { organizationId, projectId, environmentId } = Route.useParams() | ||
| const secretManagerEnabled = useFeatureFlagEnabled('secret-manager') |
There was a problem hiding this comment.
The feature flag should be in the const tabs = [] in this file no? apps/console/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/variables/index.tsx
There was a problem hiding this comment.
We need to redirect the user to /variables if the FF is disabled, so I'd leave it here too.
| import { useDeployService } from '../hooks/use-deploy-service/use-deploy-service' | ||
| import { useService } from '../hooks/use-service/use-service' | ||
|
|
||
| export function useServiceVariablesTab() { |
There was a problem hiding this comment.
Small architecture nit: I’d avoid keeping useServiceVariablesTab as-is
It mixes params, feature flag, secret-manager lookup, service fetching, and redeploy logic. BuiltInTab only needs redeployServiceAction, but calling this hook also runs the secret-manager path, which isn’t useful there. I’d split the redeploy action into a small service hook under lib/hooks/..., and call useVariablesSecretManagers directly in CustomTab where it’s actually needed, wdyt?
| parentId: string | ||
| } | ||
|
|
||
| export function ExternalSecretsTab({ scope, parentId }: ExternalSecretsTabProps) { |
There was a problem hiding this comment.
ExternalSecretsTab handles create/edit/delete directly, but it doesn’t trigger the same redeploy feedback we have for regular variables. So after adding or updating an external secret, users don’t get the “you need to redeploy” toast even though the change still only applies after redeploy
Could we have the same behavior?
|
🎉 This PR is included in version 1.312.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
ℹ️ Based on #2720
Adds the full external secrets variables UI after creation: dedicated external secret tabs/pages, service variable tabs, associated external secrets modal, generalized associated-items modal, route restructuring, tests/snapshots, and related UI polish.
Screenshots / Recordings
Testing
yarn testoryarn test -u(if you need to regenerate snapshots)yarn formatyarn lintPR Checklist
.cursor/rules)feat(service): add new Terraform service) - required for semantic-release