Skip to content

fix(collection): drop computed defaults from argument specs - #191

Open
Oddly wants to merge 2 commits into
mainfrom
fix/argspec-fact-defaults
Open

fix(collection): drop computed defaults from argument specs#191
Oddly wants to merge 2 commits into
mainfrom
fix/argspec-fact-defaults

Conversation

@Oddly

@Oddly Oddly commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Two argument-spec options carried templated defaults that reference gathered facts or another role's vars (elasticsearch_heap from ansible_facts.memtotal_mb, kibana_server_publicbaseurl from elasticstack_kibana_host/ansible_facts.fqdn). Spec defaults are evaluated at validation time even when the option is not supplied, and the validation task is tagged always — so any tag-limited run where fact gathering is skipped (smart gathering with a warm cache) fails with object of type 'dict' has no attribute 'memtotal_mb' before a single real task runs. Hit in production on a --tags run the day after #184 landed.

The real defaults live in defaults/main.yml and are unaffected; the spec entries keep their descriptions and lose only the computed default:.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Oddly, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 30 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1241866b-8223-47d9-aa4c-29e017826460

📥 Commits

Reviewing files that changed from the base of the PR and between 6c2dcea and e804d6f.

📒 Files selected for processing (4)
  • roles/elasticsearch/defaults/main.yml
  • roles/elasticsearch/meta/argument_specs.yml
  • roles/kibana/defaults/main.yml
  • roles/kibana/meta/argument_specs.yml

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Oddly

Oddly commented Aug 8, 2026

Copy link
Copy Markdown
Owner Author

Extended with a second commit: the same class of failure exists one layer deeper. Argument-spec validation type-checks the current value of declared options, so a role default that templates from facts (elasticsearch_heap, kibana_public_base_url) blows up the always-tagged validation on tag-limited runs even after the spec defaults are gone. Reproduced with gathering = smart + a warm jsonfile fact cache: the implicit gather task is untagged, gets filtered out by --tags, and ansible_facts stays empty. Both defaults now tolerate absent facts; a real converge always gathers before they are consumed.

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