Skip to content

Pass NEOPS_LOCK_MAX_QUERY_RESULTS from .env to core - #67

Closed
remory wants to merge 1 commit into
developfrom
feat/cms-lock-max-query-results
Closed

remory wants to merge 1 commit into
developfrom
feat/cms-lock-max-query-results

Conversation

@remory

@remory remory commented Nov 13, 2026

Copy link
Copy Markdown

Description

Core refuses an acquire query that matches more than NEOPS_LOCK_MAX_QUERY_RESULTS entities (1000 by default): "Search query '...' returned more than 1000 results". A workflow over a large inventory, e.g. a sync of every imported device to another system, needs a higher limit. Core reads the limit from its environment only, and .env couldn't reach it: cms.env passes through only OPTIONAL_CORE_KEYS.

  • neops_compose/render.py: NEOPS_LOCK_MAX_QUERY_RESULTS added to OPTIONAL_CORE_KEYS. When unset it's left out of cms.env, so core keeps its own default.
  • .env.example: listed, commented out, under "Core settings passed through unchanged".
  • docs/50-troubleshooting.md: a short entry for the refusal and how to raise the limit.
  • tests/unit/test_render.py: the value reaches cms.env when set and is absent when unset.

make lint, make compose-config and make doc-build pass. make test passes except test_ownership.py::test_chown_via_container_changes_and_restores_ownership_without_sudo, which fails the same way on develop on my Mac (Docker Desktop bind-mount ownership).

Checklist:

  • PR label has been set
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings

🤖 Generated with Claude Code

Core refuses an acquire query matching more than NEOPS_LOCK_MAX_QUERY_RESULTS entities (1000 by default). A workflow over a large inventory needs it raised, and .env had no way to reach core with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@remory remory added the pr-new-feature PR introduces new feature/s label Nov 13, 2026
@remory
remory requested a review from leandrolerena November 13, 2026 07:41
@remory

remory commented Nov 13, 2026

Copy link
Copy Markdown
Author

Not needed: a deployment that needs a higher limit sets it in compose.override.yaml (services.cms.environment.NEOPS_LOCK_MAX_QUERY_RESULTS) and appends that file to COMPOSE_FILE, as docs/20-scenarios.md describes. Closing.

@remory remory closed this Nov 13, 2026
@remory
remory deleted the feat/cms-lock-max-query-results branch November 13, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-new-feature PR introduces new feature/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant