Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/sample-retry-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Sample retry test workflow container image and manifest push

on:
workflow_dispatch:
push:
branches: [ "main" ]
paths:
- 'workflows/sample-retry-test/**'
- 'pipeline/**'
- .github/workflows/sample-retry-test.yaml
- .github/workflows/main.yml

jobs:
call-main-workflow:
uses: ./.github/workflows/main.yml
with:
workflow_id: sample-retry-test
secrets: inherit
18 changes: 18 additions & 0 deletions .github/workflows/test-object-type-uiprops.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Test object type ui:props workflow container image and manifest push

on:
workflow_dispatch:
push:
branches: [ "main" ]
paths:
- 'workflows/test-object-type-uiprops/**'
- 'pipeline/**'
- .github/workflows/test-object-type-uiprops.yaml
- .github/workflows/main.yml

jobs:
call-main-workflow:
uses: ./.github/workflows/main.yml
with:
workflow_id: test-object-type-uiprops
secrets: inherit
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ WORKFLOWS = \
mtv-migration \
modify-vm-resources \
rpj \
test-object-type-uiprops \
sample-retry-test \
$(NULL)

# Dynamic rule patten that uses one of the workflows and sets the workflow id
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ This repository contains multiple workflows. Each workflow is represented by a d
| `mta-v7.x` | Migration toolkit for applications, version 7.x. |
| `mtv-migration` | Migration tasks using Migration Toolkit for Virtualization (MTV). |
| `request-vm-cnv` | Requests and provisions VMs using Container Native Virtualization (CNV). |
| `test-object-type-uiprops` | E2E-style schema for object-type `ui:props` |
| `sample-retry-test` | Sample form with ActiveTextInput fetch retry `ui:props` for CI testing. |

Each workflow is organized in its own directory, containing the following components:
* `application.properties` — Contains configuration properties specific to the workflow application.
Expand Down
23 changes: 23 additions & 0 deletions deploy/charts/sample-retry-test/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
17 changes: 17 additions & 0 deletions deploy/charts/sample-retry-test/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v2
name: sample-retry-test
description: A Helm chart for the sample-retry-test serverless workflow
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.7.0-rc3

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"

icon: https://raw.githubusercontent.com/rhdhorchestrator/rhdhorchestrator.github.io/main/assets/images/WO_black.svg
31 changes: 31 additions & 0 deletions deploy/charts/sample-retry-test/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Sample Retry Test workflow

The sample-retry-test workflow is a minimal Serverless Workflow used for local and UI testing. It injects a fixed message and completes immediately. The input schema drives a **Backstage / RHDH** form with **ActiveTextInput** fields whose `ui:props` exercise **fetch retry** behavior (max attempts, delay, backoff, and HTTP status codes). Your Backstage backend must expose the URLs referenced in the schema (for example `/api/retry-test/all-props`) so the form can load values.

## Input

- **`retryAllProps`** [optional] — ActiveTextInput with full retry settings (`fetch:retry:maxAttempts`, `delay`, `backoff`, `statusCodes` including 404).
- **`retryStatusCodesNoMatch`** [optional] — ActiveTextInput with retry props but a status-code list that omits 404 (used to validate retry behavior when the failing status is not listed).
- **`retryNoProps`** [optional] — ActiveTextInput with fetch URL and response mapping only (no explicit retry properties).

## Workflow diagram

No SVG diagram is checked in for this workflow; the definition is a single inject state in `workflows/sample-retry-test/sample-retry-test.sw.yaml`.

## Installation

See the [greeting installation guide](https://github.com/rhdhorchestrator/serverless-workflows/blob/main/deploy/docs/main/greeting/README.md) for persistence prerequisites and cluster expectations. Use this chart name and SonataFlow resource name instead of `greeting`:

```console
TARGET_NS=sonataflow-infra
helm repo add orchestrator-workflows https://rhdhorchestrator.io/serverless-workflows
helm install sample-retry-test orchestrator-workflows/sample-retry-test -n ${TARGET_NS}
```

Verify the workflow is ready:

```console
oc wait sonataflow sample-retry-test -n ${TARGET_NS} --for=condition=Running=True --timeout=5m
```

After the chart is published to the Helm repo, adjust the `helm install` line if your repository uses a different chart name or version (`--devel` for pre-releases).
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v1
data:
application.properties: |
# This property is used to select the log level, which controls the amount
# of information logged on HTTP requests based on the severity of the events.
# Possible values: OFF, FATAL, ERROR, WARN, INFO, DEBUG, ALL.
# and see https://quarkus.io/guides/logging for documentation
quarkus.log.category."org.apache.http".level=INFO
quarkus.log.level=INFO

kie.flyway.enabled=true
kind: ConfigMap
metadata:
creationTimestamp: null
labels:
app: sample-retry-test
app.kubernetes.io/component: serverless-workflow
app.kubernetes.io/managed-by: sonataflow-operator
app.kubernetes.io/name: sample-retry-test
sonataflow.org/workflow-app: sample-retry-test
sonataflow.org/workflow-namespace: ""
name: sample-retry-test-props
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
apiVersion: v1
data:
sample-retry-test.input-schema.json: |
{
"$id": "classpath:/schemas/sample-retry-test.input-schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"retryAllProps": {
"type": "string",
"title": "Retry Test (all props)",
"ui:widget": "ActiveTextInput",
"ui:props": {
"fetch:url": "$${{backend.baseUrl}}/api/retry-test/all-props",
"fetch:response:value": "value",
"fetch:retry:maxAttempts": 3,
"fetch:retry:delay": 1500,
"fetch:retry:backoff": 2,
"fetch:retry:statusCodes": [404, 408, 429, 500, 502, 503, 504]
}
},
"retryStatusCodesNoMatch": {
"type": "string",
"title": "Retry Test (status codes missing 404)",
"ui:widget": "ActiveTextInput",
"ui:props": {
"fetch:url": "$${{backend.baseUrl}}/api/retry-test/status-codes-no-404",
"fetch:response:value": "value",
"fetch:retry:maxAttempts": 2,
"fetch:retry:delay": 500,
"fetch:retry:backoff": 2,
"fetch:retry:statusCodes": [408, 429, 500, 502, 503, 504]
}
},
"retryNoProps": {
"type": "string",
"title": "Retry Test (no retry props)",
"ui:widget": "ActiveTextInput",
"ui:props": {
"fetch:url": "$${{backend.baseUrl}}/api/retry-test/no-retry-props",
"fetch:response:value": "value"
}
}
}
}
workflow-output-schema.json: |-
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "WorkflowResult",
"description": "Schema of workflow output",
"type": "object",
"properties": {
"result": {
"$ref": "../shared/schemas/workflow-result-schema.json",
"type": "object"
}
}
}
kind: ConfigMap
metadata:
creationTimestamp: null
name: 01-sample-retry-test-resources-schemas
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
apiVersion: sonataflow.org/v1alpha08
kind: SonataFlow
metadata:
annotations:
sonataflow.org/description: Simple workflow for local testing
sonataflow.org/expressionLang: jq
sonataflow.org/profile: gitops
sonataflow.org/version: "1.0"
creationTimestamp: null
labels:
app: sample-retry-test
app.kubernetes.io/component: serverless-workflow
app.kubernetes.io/managed-by: sonataflow-operator
app.kubernetes.io/name: sample-retry-test
sonataflow.org/workflow-app: sample-retry-test
sonataflow.org/workflow-namespace: ""
name: sample-retry-test
spec:
flow:
annotations:
- workflow-type/infrastructure
dataInputSchema:
failOnValidationErrors: true
schema: schemas/sample-retry-test.input-schema.json
start:
stateName: InjectState
states:
- data:
message: Hello from sample-retry-test
end:
terminate: true
name: InjectState
type: inject
podTemplate:
container:
image: quay.io/orchestrator/serverless-workflow-sample-retry-test:osl_1_37
resources: {}
resources:
configMaps:
- configMap:
name: 01-sample-retry-test-resources-schemas
workflowPath: schemas
persistence:
postgresql:
secretRef:
name: sonataflow-psql-postgresql
userKey: postgres-username
passwordKey: postgres-password
serviceRef:
name: sonataflow-psql-postgresql
port: 5432
databaseName: sonataflow
databaseSchema: sample-retry-test
status:
address: {}
lastTimeRecoverAttempt: null
10 changes: 10 additions & 0 deletions deploy/charts/sample-retry-test/values.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "http://example.com/example.json",
"type": "object",
"default": {},
"title": "Root Schema",
"required": [],
"properties": {},
"examples": [{}]
}
23 changes: 23 additions & 0 deletions deploy/charts/test-object-type-uiprops/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
17 changes: 17 additions & 0 deletions deploy/charts/test-object-type-uiprops/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v2
name: test-object-type-uiprops
description: A Helm chart for the test-object-type-uiprops serverless workflow
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.7.0-rc3

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"

icon: https://raw.githubusercontent.com/rhdhorchestrator/rhdhorchestrator.github.io/main/assets/images/WO_black.svg
34 changes: 34 additions & 0 deletions deploy/charts/test-object-type-uiprops/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Test Object Type Support in ui:props workflow

The test-object-type-uiprops workflow is used for **Backstage / RHDH** and orchestrator UI testing around **RHIDP-11054**: the input schema includes nested objects and fields that document **object-type (JsonValue) support** in `ui:props`—for example `fetch:response:*` values that are not plain strings. At runtime the workflow logs the full input, then completes with a structured result that surfaces **name** and **email** from `basicInfo` when present.

## Input

- **`basicInfo`** — Object group **Basic Information**.
- **`name`** [required] — User name.
- **`email`** [optional] — Email address (`format: email`).
- **`demonstrationFields`** [optional] — Object group **Object Type in ui:props Demonstration** (nested fields for UI behavior demos).
- **`simpleText`** [optional] — Plain string field (classic `ui:props` usage).
- **`objectExample`** [optional] — Field whose description/`ui:help` illustrates non-string JsonValue handling for `fetch:response:*` in `ui:props`.

## Workflow diagram

No SVG diagram is checked in for this workflow; the definition is an operation state (sysout plus result expression) in `workflows/test-object-type-uiprops/test-object-type-uiprops.sw.yaml`.

## Installation

See the [greeting installation guide](https://github.com/rhdhorchestrator/serverless-workflows/blob/main/deploy/docs/main/greeting/README.md) for persistence prerequisites and cluster expectations. Use this chart name and SonataFlow resource name instead of `greeting`:

```console
TARGET_NS=sonataflow-infra
helm repo add orchestrator-workflows https://rhdhorchestrator.io/serverless-workflows
helm install test-object-type-uiprops orchestrator-workflows/test-object-type-uiprops -n ${TARGET_NS}
```

Verify the workflow is ready:

```console
oc wait sonataflow test-object-type-uiprops -n ${TARGET_NS} --for=condition=Running=True --timeout=5m
```

After the chart is published to the Helm repo, adjust the `helm install` line if your repository uses a different chart name or version (`--devel` for pre-releases).
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v1
data:
application.properties: |
# This property is used to select the log level, which controls the amount
# of information logged on HTTP requests based on the severity of the events.
# Possible values: OFF, FATAL, ERROR, WARN, INFO, DEBUG, ALL.
# and see https://quarkus.io/guides/logging for documentation
quarkus.log.category."org.apache.http".level=INFO
quarkus.log.level=INFO

kie.flyway.enabled=true
kind: ConfigMap
metadata:
creationTimestamp: null
labels:
app: test-object-type-uiprops
app.kubernetes.io/component: serverless-workflow
app.kubernetes.io/managed-by: sonataflow-operator
app.kubernetes.io/name: test-object-type-uiprops
sonataflow.org/workflow-app: test-object-type-uiprops
sonataflow.org/workflow-namespace: ""
name: test-object-type-uiprops-props
Loading
Loading