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

Harden-expression-and-condition-capabilities #77

Merged
merged 6 commits into from
Oct 26, 2023

Conversation

frankkilcommins
Copy link
Collaborator

fixes #44

@kevin-postman
Copy link

Love where this is going. Fantastic work Frank. I am approving this as I don't see any major issue with it at this time, but as agreed we'll discuss next workflows meeting.

Copy link
Collaborator

@ndenny ndenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great!
Happy to approve as-is, but left a comment in case anyone else has an opinion?

---|:---:|---
<a name="criterionContext"></a>context | `{expression}` | A [runtime expression](#runtime-expressions) used to set the context for the condition to be applied on. If `type` is specified, then the `context` MUST be provided (e.g. `$response.body` would set the context that a JSONPath query expression could be applied to).
<a name="criterionCondition"></a>condition | `string` | **REQUIRED**. The condition to apply. Conditions can be simple (e.g. `$statusCode == 200` which applies a operator on a value obtained from a runtime expression), or a regex, or a JSONPath expression. For regex and [JSONPath](https://datatracker.ietf.org/doc/draft-ietf-jsonpath-base/21/), the `type` and `context` MUST be specified.
<a name="criterionType"></a>type | `string` | The type of condition to be applied. If specified, the options allowed are `regex` or `JSONPath`. If omitted, then the condition is assumed to be simple, which at most combines literals, operators and [Runtime Expressions](#runtime-expressions).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm in two minds about this myself - but should be add a simple type which is the default type, instead of having an implicit simple type if none is specified?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was very much on the fence here. For completeness, it's probably better to have it as part of allowed values. I doubt, I'd ever write it but no harm in allowing folks to be explicit if they want to.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extended to now support simple

@frankkilcommins frankkilcommins mentioned this pull request Oct 25, 2023
@frankkilcommins
Copy link
Collaborator Author

I will update some of the verbiage around Step.successCriteria (to highlight its and AND operation) and also within Action Success/Failure (it's an OR).

@frankkilcommins
Copy link
Collaborator Author

@ndenny @kevin-postman I've made the additional changes as we discussed yesterday. If all are happy, let's merge

@kevin-postman
Copy link

LGTM

Copy link
Collaborator

@ndenny ndenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@frankkilcommins frankkilcommins merged commit faef8dc into main Oct 26, 2023
2 checks passed
@frankkilcommins frankkilcommins deleted the harden-expression-and-condition-capabilities branch July 31, 2024 11:27
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.

Harden the Runtime Expression section within the spec
3 participants