Skip to content

feat(org): org build limit types - #7

Open
alexhholmes-work wants to merge 3 commits into
chore/org-build-limitfrom
feat/org-build-limit-types
Open

feat(org): org build limit types#7
alexhholmes-work wants to merge 3 commits into
chore/org-build-limitfrom
feat/org-build-limit-types

Conversation

@alexhholmes-work

@alexhholmes-work alexhholmes-work commented Aug 26, 2026

Copy link
Copy Markdown

Foundation layer for org-level build limits: constants, platform settings toggle, API and database types, and middleware for default/max limit values.

The EnableOrgBuildLimit platform setting gates the feature. When disabled, enforcement is skipped entirely. The OrgBuildLimit type represents a per-org concurrent build cap with configurable limit, created/updated timestamps, and the modifying user.

Changes

  • Add OrgBuildLimitMin (1), OrgBuildLimitMax (100), and OrgBuildLimitDefault (30) constants in constants/limit.go
  • Add TableOrgBuildLimit table name constant in constants/table.go
  • Add EnableOrgBuildLimit bool field to the Platform settings type with getter/setter, CLI flag (vela-enable-org-build-limit), and FromSettings propagation
  • Fix struct tag alignment in api/types/settings/platform.go and database/types/settings.go to satisfy tagalign linter
  • Add enable_org_build_limit column to the settings database table schema
  • Add OrgBuildLimit API type in api/types/org_build_limit.go with getters, setters, and String() method
  • Add OrgBuildLimit database type in database/types/org_build_limit.go with ToAPI() and validation
  • Add DefaultOrgBuildLimit and MaxOrgBuildLimit gin middleware for injecting limit bounds into request context
  • Add unit tests for all new types and middleware

@alexhholmes-work
alexhholmes-work force-pushed the feat/org-build-limit-types branch from c88eb1e to b6d5fe7 Compare August 26, 2026 19:46
@alexhholmes-work
alexhholmes-work marked this pull request as ready for review August 27, 2026 20:05
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.

1 participant