Replies: 3 comments 4 replies
-
I started a v2 branch for the Brex team to work on. We should add comments to this discussion for any major changes and discuss them in a thread. |
Beta Was this translation helpful? Give feedback.
-
Refactoring the Condition PackageThis commit is the start of a big change, but shouldn't have much impact on v1.0 deployments. In v1.0 and previous releases the condition package uses a config schema that separates operators (any, all, none) and inspectors, which required the addition of the meta_condition inspector for complex logic (chaining ORs and ANDs or ANDs and ORs). This change simplifies the config schema so that v1.0 operators are now inspectors, which makes them easier to chain. This is required in v1.0: sub.cnd.all([
sub.cnd.meta.condition({ condition: sub.cnd.any([
sub.cnd.str.contains({value: "a"}),
sub.cnd.str.contains({value: "b"}),
sub.cnd.str.contains({value: "c"}),
]),
sub.cnd.meta.condition({ condition: sub.cnd.none([
sub.cnd.str.contains({value: "z"}),
]),
]) The equivalent in v2.0 would be: sub.cnd.all([
sub.cnd.any([
sub.cnd.str.contains({value: "a"}),
sub.cnd.str.contains({value: "b"}),
sub.cnd.str.contains({value: "c"}),
]),
sub.cnd.none([
sub.cnd.str.contains({value: "z"}),
]),
]) This also removes the need for the other meta inspectors:
The v2.0 libsonnet uses the same shortcut as the v1.0 operators, so the migration path is "replace all" in existing configs; for example, replacing |
Beta Was this translation helpful? Give feedback.
-
The v2.0.0 beta release is up and the PR to bump versions is drafted. 👍 |
Beta Was this translation helpful? Give feedback.
-
@shellcromancer and I were discussing breaking changes in #215, and we've accumulated some that are worth mentioning and preparing for a small v2.0 release. This includes:
Transform
fields in allMeta*
transforms (replaced byTransforms
)MetaPipeline
transform (replaced by the change above)MetaErr
transform (empty err list will not catch every error)Up for possible inclusion is removing retry functionality from each individual transform (replaced by
MetaRetry
transform).Beta Was this translation helpful? Give feedback.
All reactions