Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

matrix: provide 'matrix' eval context when decoding the matrix #140

Merged
merged 4 commits into from
May 22, 2024

Conversation

ryancragun
Copy link
Collaborator

When decoding matrix blocks we'll now expose a matrix eval context which contains values from previously evaluated attributes. This allows us more flexibility when constructing values for include or exclude blocks.

  • Create and update the 'matrix' key in the eval context when decoding matrix blocks.
  • Update existing valid matrix decode test to use an expression that refers to previously defined key.
  • Fix deprecation warning in linter.
  • Bump version

This allows us to do cool things like this:
image

Checklist

  • The commit message includes an explanation of the changes
  • Manual validation of the changes have been performed (if possible)
  • New or modified code has requisite test coverage (if possible)
  • I have performed a self-review of the changes
  • I have made necessary changes and/or pull requests for documentation
  • I have written useful comments in the code

When decoding `matrix` blocks we'll now expose a `matrix` eval context
which contains values from previously evaluated attributes. This allows
us more flexibility when constructing values for `include` or `exclude`
blocks.

* Create and update the 'matrix' key in the eval context when decoding
  matrix blocks.
* Update existing valid matrix decode test to use an expression that
  refers to previously defined key.
* Fix deprecation warning in linter.
* Bump version

Signed-off-by: Ryan Cragun <[email protected]>
@ryancragun ryancragun added the changelog/feat New feature or enhancement. Will be included in "New Features" category in release notes. label May 22, 2024
@ryancragun ryancragun requested a review from a team as a code owner May 22, 2024 19:14
Signed-off-by: Ryan Cragun <[email protected]>
…ucture

Upgrade to the latest version of buf and with it the updated
configuration formats.

I couldn't find a way for Buf's new CLI to allow us to generate code into
the same directory as the protos like we were doing before without
nesting it a billion directories. As such, we'll move the package out
and and rename the imports.

Signed-off-by: Ryan Cragun <[email protected]>
@jasonodonnell jasonodonnell self-requested a review May 22, 2024 20:31
@ryancragun ryancragun merged commit dd4ef5a into main May 22, 2024
5 checks passed
@ryancragun ryancragun deleted the ryan/matrix-decode-exclude branch May 22, 2024 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/feat New feature or enhancement. Will be included in "New Features" category in release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants