Skip to content

Fix YAML functions documentation and increase test coverage#2028

Merged
aknysh merged 5 commits intomainfrom
aknysh/yaml-funcs-yq
Jan 26, 2026
Merged

Fix YAML functions documentation and increase test coverage#2028
aknysh merged 5 commits intomainfrom
aknysh/yaml-funcs-yq

Conversation

@aknysh
Copy link
Member

@aknysh aknysh commented Jan 26, 2026

what

  • Fixed incorrect .outputs. prefix in !terraform.state documentation examples
  • Fixed confusing component/output name collision in !terraform.output documentation
  • Fixed incorrect syntax in website/docs/functions/index.mdx (vpc.vpc_idvpc vpc_id)
  • Fixed broken link generation in doc-release-data plugin for index.mdx files with id: index
  • Added comprehensive test coverage for YAML functions:
    • YQ expression patterns (bracket notation, defaults, pipes)
    • !env function unit tests
    • !include integration tests
  • Added test fixtures for bracket notation with special characters (slashes, hyphens)

why

  • Users reported confusion with documentation examples that showed incorrect YQ expression syntax
  • A user reported issues with bracket notation containing forward slashes in map keys - investigation confirmed the syntax is correct but documentation needed clarification
  • The doc-release-data plugin incorrectly generated /index paths for files like functions/index.mdx with id: index, causing broken links on the /unreleased page
  • Test coverage for YAML functions was insufficient for edge cases like bracket notation with special characters

references

  • YQ Guide
  • YQ Recipes
  • Internal tracking document: docs/fixes/yaml-functions-yq-expressions.md

@aknysh aknysh requested a review from a team as a code owner January 26, 2026 00:49
@aknysh aknysh added the patch A minor, backward compatible change label Jan 26, 2026
@aknysh aknysh requested a review from a team as a code owner January 26, 2026 00:49
@aknysh aknysh added the patch A minor, backward compatible change label Jan 26, 2026
@github-actions github-actions bot added the size/xl Extra large size PR label Jan 26, 2026
@aknysh aknysh self-assigned this Jan 26, 2026
@mergify
Copy link

mergify bot commented Jan 26, 2026

Warning

This PR exceeds the recommended limit of 1,000 lines.

Large PRs are difficult to review and may be rejected due to their size.

Please verify that this PR does not address multiple issues.
Consider refactoring it into smaller, more focused PRs to facilitate a smoother review process.

@github-actions
Copy link

github-actions bot commented Jan 26, 2026

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

None

…a plugin

The plugin incorrectly generated /index paths for index.mdx files with
id: index. This fix adds a special case to preserve the directory path
(computed by getDocUrlPath) for these files.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Jan 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.45%. Comparing base (c90352d) to head (3f7c882).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2028      +/-   ##
==========================================
+ Coverage   75.43%   75.45%   +0.02%     
==========================================
  Files         793      793              
  Lines       73666    73666              
==========================================
+ Hits        55571    55586      +15     
+ Misses      14583    14572      -11     
+ Partials     3512     3508       -4     
Flag Coverage Δ
unittests 75.45% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 9 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aknysh aknysh requested a review from osterman January 26, 2026 01:28
@aknysh aknysh merged commit e483668 into main Jan 26, 2026
58 checks passed
@aknysh aknysh deleted the aknysh/yaml-funcs-yq branch January 26, 2026 14:48
@github-actions
Copy link

These changes were released in v1.205.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch A minor, backward compatible change size/xl Extra large size PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants