Skip to content

Document selector length and nesting limits - #3201

Merged
ctauchen merged 4 commits into
mainfrom
shaun/selector-limits
Nov 12, 2026
Merged

ctauchen merged 4 commits into
mainfrom
shaun/selector-limits

Conversation

@fasaxc

@fasaxc fasaxc commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Product Version(s):

Docs Release Planned
Calico Open Source next v3.34.0 Not announced
Enterprise next v3.24.0-3.0 (EP3): calico-private#14708 End of Nov 2026
Enterprise 3.23-2 v3.23.3: calico-private#14723 Released Oct 27, 2026
Enterprise 3.22-2 v3.22.9: calico-private#14727 Released Nov 9, 2026
Cloud next Next Calico Cloud release Not announced

Release dates are as of Nov 11, 2026.

The Calico Open Source 3.32 and 3.33 copies are held back until v3.32.4 (publish PR #3194) and v3.33.1 (planned Nov 18) are published. They're on the shaun/selector-limits-oss-patches branch.

Issue:

Link to docs preview:

SME review:

  • An SME has approved this change.

DOCS review:

  • A member of the docs team has approved this change.

Additional information:

Adds the selector limits to the shared selectors fragment, and what happens past them:

  • The API server rejects a selector longer than 1024 characters or nested more than 100 deep.
  • If a stored resource has a selector nested more than 100 deep, Felix treats the resource as missing and logs a warning (felix/calc/validation_filter.go).

Enterprise 3.22-2 and 3.23-2 got the nesting limit (shipped in v3.22.9 and v3.23.3) but not the change that put MaxLength=1024 on every selector field, so those two copies state only the nesting limit.

Calico Enterprise 3.21-2, 3.24-1 and 3.24-2, and Calico Open Source 3.31, didn't get the change, so they're unchanged.

Merge checklist:

  • Deploy preview inspected wherever changes were made
  • Build completed successfully
  • Test have passed

Selectors are limited to 100 levels of nested parentheses
(projectcalico/calico#14327, tigera/calico-private#14649 and picks).
Selector fields are limited to 1024 characters by convention.
Copilot AI lite review requested due to automatic review settings November 10, 2026 16:04
@netlify

netlify Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview succeeded!

Name Link
🔨 Latest commit c34c1bc
🔍 Latest deploy log https://app.netlify.com/projects/tigera/deploys/6af4ace3116f6d30b837624e
😎 Deploy Preview https://deploy-preview-3201--tigera.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 94 (🟢 up 7 from production)
Accessibility: 98 (no change from production)
Best Practices: 92 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for calico-docs-preview-next ready!

Name Link
🔨 Latest commit c34c1bc
🔍 Latest deploy log https://app.netlify.com/projects/calico-docs-preview-next/deploys/6af4ace36566366f7e2fe397
😎 Deploy Preview https://deploy-preview-3201--calico-docs-preview-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The reviewed changes consistently document selector length and nesting limits across the relevant current and supported versioned documentation, with no unresolved concerns identified.

No open issues 🎉

What changed in this PR

Documents selector length and parenthesis-nesting limits across current and supported versioned Calico documentation.

Changes:

  • Adds the 1024-character selector field limit to shared selector fragments.
  • Documents the maximum parenthesis nesting depth as 100.
  • Adds release-specific availability markers for supported versioned documentation.
File Description
calico/​_includes/​content/​_selectors.mdx Adds selector length and nesting limits to current Calico Open Source documentation.
calico-enterprise/​_includes/​content/​_selectors.mdx Adds selector length and nesting limits to current Calico Enterprise documentation.
calico-enterprise_versioned_docs/​version-3.23-2/​_includes/​content/​_selectors.mdx Documents selector limits introduced in Calico Enterprise v3.23.3.
calico-enterprise_versioned_docs/​version-3.22-2/​_includes/​content/​_selectors.mdx Documents selector limits introduced in Calico Enterprise v3.22.9.
calico-cloud/​_includes/​content/​_selectors.mdx Adds selector length and nesting limits to current Calico Cloud documentation.
calico_versioned_docs/​version-3.33/​_includes/​content/​_selectors.mdx Documents selector limits introduced in Calico Open Source v3.33.1.
calico_versioned_docs/​version-3.32/​_includes/​content/​_selectors.mdx Documents selector limits introduced in Calico Open Source v3.32.4.

Review effort: Lite

@fasaxc
fasaxc marked this pull request as ready for review November 11, 2026 15:41
@fasaxc
fasaxc requested a review from a team as a code owner November 11, 2026 15:41

@ctauchen ctauchen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM with suggestions.

Comment thread calico/_includes/content/_selectors.mdx Outdated
- Has a value for `my-label` that starts with "prod", and,
- Has a role label with value either "frontend", or "business".

By convention, the $[prodname] API limits selector fields to 1024 characters.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"By convention" makes this sound like a guideline. What happens when a selector is longer than 1024 characters, or nested deeper than 100? If the API server rejects it, say so: "Selectors can be at most 1024 characters long, with parentheses nested at most 100 deep. Longer or deeper selectors are rejected." If something else happens, such as Felix ignoring the policy, users need to know that most.

This applies to all seven copies.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Claude: Both limits are enforced: the API server rejects a selector over 1024 characters or nested more than 100 deep. For a resource already stored with a selector nested too deep, Felix treats the resource as missing and logs a warning. The copies now say: "Selectors can be at most 1024 characters long, with parentheses nested at most 100 deep. The API server rejects longer or deeper selectors. If a stored resource has a selector nested more than 100 deep, Felix ignores the resource and logs a warning." Enterprise 3.22-2 and 3.23-2 got the nesting limit but not the change that put the 1024-character limit on every selector field, so those two copies state only the nesting limit.

- Has a value for `my-label` that starts with "prod", and,
- Has a role label with value either "frontend", or "business".

By convention, the $[prodname] API limits selector fields to 1024 characters.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Timing: the 3.32 and 3.33 copies describe 3.32.4 and 3.33.1, which haven't shipped. Could we hold those two files until the publish PRs land? The OSS 3.32.4 one is #3194.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Claude: Done: I took the 3.32 and 3.33 copies out of this PR. They're on the shaun/selector-limits-oss-patches branch, ready to open once the v3.32.4 publish PR (#3194) and the v3.33.1 one land.

…opies

The 3.32 and 3.33 copies move to a follow-up branch until v3.32.4 and
v3.33.1 are published.
@ctauchen
ctauchen merged commit b0f3dd2 into main Nov 12, 2026
11 checks passed
@ctauchen
ctauchen deleted the shaun/selector-limits branch November 12, 2026 09:50
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