Skip to content

fix: increase PKI Sync name length#5504

Merged
carlosmonastyrski merged 2 commits intomainfrom
pkiSyncNameLength
Feb 17, 2026
Merged

fix: increase PKI Sync name length#5504
carlosmonastyrski merged 2 commits intomainfrom
pkiSyncNameLength

Conversation

@carlosmonastyrski
Copy link
Contributor

Context

Increase PKI Sync name length to 256 to match secret syncs, and fixing a discrepancy between DB length and schema limits

Screenshots

Steps to verify the change

Type

  • Fix
  • Feature
  • Improvement
  • Breaking
  • Docs
  • Chore

Checklist

  • Title follows the conventional commit format: type(scope): short description (scope is optional, e.g., fix: prevent crash on sync or fix(api): handle null response).
  • Tested locally
  • Updated docs (if needed)
  • Read the contributing guide

@maidul98
Copy link
Collaborator

maidul98 commented Feb 17, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 17, 2026

Greptile Summary

Increases the PKI Sync name field length to 256 characters to match secret syncs, resolving a discrepancy where the DB column was limited to 32 chars, destination-specific Zod schemas allowed 64, and the base schema/frontend allowed 255. All layers (DB migration, backend Zod schemas across 6 destination types + base schema, and frontend form validation) are now consistently set to 256. Frontend UI components are also updated to handle longer names gracefully with CSS truncation.

  • DB migration alters the name column on PkiSync table from 32 to 256 characters
  • All 6 destination-specific backend schemas (Create/Update) updated from max(64) to max(256)
  • Base PkiSyncSchema updated from max(255) to max(256)
  • Frontend form schema updated from max(255) to max(256)
  • UI components add truncate, min-w-0, and shrink-0 CSS classes to handle long name overflow

Confidence Score: 4/5

  • This PR is safe to merge — it's a straightforward column size increase with consistent schema updates across all layers.
  • The changes are simple and mechanical: increasing a name field length limit from various inconsistent values to a uniform 256 across DB, backend schemas, and frontend. All destination-specific schemas are updated consistently. The migration is guarded with a hasTable check. Frontend UI changes properly handle longer names with CSS truncation. No security concerns, no breaking API changes, no logic changes.
  • No files require special attention. The migration file is the only one worth a quick review to confirm it runs cleanly in your environment.

Important Files Changed

Filename Overview
backend/src/db/migrations/20260217120346_increase-pki-sync-name-size.ts New migration to alter the PKI Sync name column from 32 to 256 characters. Uses hasTable check for safety, but empty down migration means this change is irreversible.
backend/src/services/pki-sync/pki-sync-schemas.ts Base PkiSyncSchema name max updated from 255 to 256 to match the new DB column size.
frontend/src/components/pki-syncs/forms/schemas/base-pki-sync-schema.ts Frontend form validation updated from max 255 to 256 to match backend schema.
frontend/src/pages/cert-manager/PkiSyncDetailsByIDPage/PkiSyncDetailsByIDPage.tsx Added min-w-0 and truncate classes to handle long PKI sync names in the header.
frontend/src/pages/cert-manager/PkiSyncDetailsByIDPage/components/PkiSyncDetailsSection.tsx Added truncate prop to GenericFieldLabel component and applied it to the Name field for long name handling.

Last reviewed commit: cd6f48f

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

12 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@carlosmonastyrski carlosmonastyrski merged commit c7b04ca into main Feb 17, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants