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

feature(explorer): menu item to 'view raw' (yaml and basic edit) #1419

Merged
merged 4 commits into from
May 10, 2024
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
20 changes: 12 additions & 8 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,28 +59,28 @@ jobs:
run: docker-compose pull
working-directory: example/

- name: Run docker images
env:
ENVIRONMENT: CI
run: docker-compose up -d
working-directory: example/

- name: Capture output DMSS version
id: capture_dmss_version
run: |
docker-compose run --rm dmss cat src/version.txt > dmss_version.txt
docker-compose exec -t dmss cat src/version.txt > dmss_version.txt
dmss_version=$(tail -n 1 dmss_version.txt)
echo "dmss_version=$dmss_version" >> "$GITHUB_OUTPUT"
working-directory: example/

- name: Capture job-api version
id: capture_job_version
run: |
docker-compose run --rm job-api cat version.txt > job_version.txt
docker-compose exec -t job-api cat version.txt > job_version.txt
job_version=$(tail -n 1 job_version.txt)
echo "job_version=$job_version" >> "$GITHUB_OUTPUT"
working-directory: example/

- name: Run docker images
env:
ENVIRONMENT: CI
run: docker-compose up -d
working-directory: example/

- name: Pack core plugins
run: npm pack @development-framework/dm-core-plugins
working-directory: example/
Expand Down Expand Up @@ -155,6 +155,10 @@ jobs:
path: e2e/test-results/
retention-days: 30

- name: Output dmss logs on failure
if: failure()
run: docker logs example_dmss_1

- uses: actions/upload-artifact@v3
if: always()
with:
Expand Down
7 changes: 7 additions & 0 deletions example/app/data/WorkflowDS/Blueprints/AzureContainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "AzureContainer",
"type": "CORE:Blueprint",
"description": "Description of a executable job running as an Azure Container Instance",
"extends": ["Container"],
"attributes": []
}
31 changes: 31 additions & 0 deletions example/app/data/WorkflowDS/Blueprints/Container.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "Container",
"type": "CORE:Blueprint",
"description": "A container job",
"extends": ["JobHandler"],
"attributes": [
{
"name": "label",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": true
},
{
"name": "image",
"type": "CORE:BlueprintAttribute",
"attributeType": "ContainerImage"
},
{
"name": "customCommand",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": true,
"dimensions": "*"
},
{
"name": "name",
"type": "CORE:BlueprintAttribute",
"attributeType": "string"
}
]
}
40 changes: 40 additions & 0 deletions example/app/data/WorkflowDS/Blueprints/ContainerImage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "ContainerImage",
"type": "CORE:Blueprint",
"description": "Container image used as job runner for a task. Full container image name is name/subName",
"attributes": [
{
"name": "type",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"label": "Type",
"default": "",
"optional": false
},
{
"name": "description",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"default": "",
"optional": true,
"label": "Description"
},
{
"name": "imageName",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": true
},
{
"name": "version",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"default": "latest"
},
{
"name": "registryName",
"type": "CORE:BlueprintAttribute",
"attributeType": "string"
}
]
}
35 changes: 35 additions & 0 deletions example/app/data/WorkflowDS/Blueprints/CronJob.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "CronJob",
"type": "CORE:Blueprint",
"description": "Blueprint for a job triggered by a time schedule",
"attributes": [
{
"name": "type",
"type": "CORE:BlueprintAttribute",
"attributeType": "string"
},
{
"name": "cron",
"type": "CORE:BlueprintAttribute",
"attributeType": "string"
},
{
"name": "startDate",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": true
},
{
"name": "endDate",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": true
},
{
"name": "runs",
"type": "CORE:BlueprintAttribute",
"attributeType": "./Job",
"dimensions": "*"
}
]
}
93 changes: 93 additions & 0 deletions example/app/data/WorkflowDS/Blueprints/Job.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"name": "Job",
"type": "CORE:Blueprint",
"attributes": [
{
"name": "type",
"type": "CORE:BlueprintAttribute",
"attributeType": "string"
},
{
"name": "uid",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": true
},
{
"name": "name",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": true
},
{
"name": "label",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": true
},
{
"name": "triggeredBy",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": true
},
{
"name": "status",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": false,
"default": "not started",
"enumType": "./JobStatus"
},
{
"name": "applicationInput",
"type": "CORE:BlueprintAttribute",
"description": "Input entity to a job",
"attributeType": "object",
"label": "Input",
"contained": false,
"optional": true
},
{
"name": "started",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": true
},
{
"name": "ended",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": true
},
{
"name": "outputTarget",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": true
},
{
"name": "result",
"type": "CORE:BlueprintAttribute",
"attributeType": "object",
"contained": false,
"optional": true
},
{
"name": "runner",
"type": "CORE:BlueprintAttribute",
"description": "JobRunner that will handle this job",
"attributeType": "JobHandler",
"label": "Runner",
"optional": true
},
{
"name": "referenceTarget",
"type": "CORE:BlueprintAttribute",
"description": "Dotted id to an analysis entity's job result. Should be on the format: entityId.jobs.*index*.result. Must be generated at run time since the index can vary.",
"attributeType": "string",
"label": "Reference target",
"optional": true
}
]
}
27 changes: 27 additions & 0 deletions example/app/data/WorkflowDS/Blueprints/JobHandler.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "JobHandler",
"type": "CORE:Blueprint",
"description": "Base jobHandler type. Other jobHandlers should extend from this one",
"attributes": [
{
"name": "type",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": false
},
{
"name": "name",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": true
},
{
"name": "environmentVariables",
"type": "CORE:BlueprintAttribute",
"description": "a list of strings on format 'myVar=myValue'",
"attributeType": "string",
"dimensions": "*",
"optional": true
}
]
}
25 changes: 25 additions & 0 deletions example/app/data/WorkflowDS/Blueprints/JobStatus.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "JobStatus",
"type": "CORE:Enum",
"description": "String enum for valid job statuses",
"values": [
"registered",
"not started",
"starting",
"running",
"failed",
"completed",
"removed",
"unknown"
],
"labels": [
"Registered",
"Not Started",
"Starting",
"Running",
"Failed",
"Completed",
"Removed",
"Unknown"
]
}
13 changes: 13 additions & 0 deletions example/app/data/WorkflowDS/Blueprints/LocalContainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "LocalContainer",
"type": "CORE:Blueprint",
"description": "Description of a executable job running as a Container in a local Docker network",
"extends": ["Container"],
"attributes": [
{
"name": "network",
"type": "CORE:BlueprintAttribute",
"attributeType": "string"
}
]
}
20 changes: 20 additions & 0 deletions example/app/data/WorkflowDS/Blueprints/Radix.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "Radix",
"type": "CORE:Blueprint",
"description": "Description of a executable job running as an Radix job",
"extends": ["JobHandler"],
"attributes": [
{
"name": "jobName",
"type": "CORE:BlueprintAttribute",
"description": "The name defined in the radixconfig.yaml file",
"attributeType": "string"
},
{
"name": "schedulerPort",
"type": "CORE:BlueprintAttribute",
"description": "The schedulerPort defined in the radixconfig.yaml file",
"attributeType": "string"
}
]
}
23 changes: 23 additions & 0 deletions example/app/data/WorkflowDS/Blueprints/RecurringJob.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "RecurringJob",
"type": "CORE:Blueprint",
"extends": ["./Job"],
"attributes": [
{
"name": "applicationInput",
"type": "CORE:BlueprintAttribute",
"description": "Job entity to run on a schedule",
"attributeType": "./Job",
"label": "Job template",
"contained": true,
"optional": true
},
{
"name": "schedule",
"type": "CORE:BlueprintAttribute",
"description": "Schedule for a cronjob",
"attributeType": "CronJob",
"label": "Schedule"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "RecurringJobHandler",
"type": "CORE:Blueprint",
"description": "",
"extends": ["JobHandler"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "ReverseDescription",
"type": "CORE:Blueprint",
"description": "A job that takes an input of any type, and outputs a copy with the description reversed",
"extends": ["JobHandler"]
}
13 changes: 13 additions & 0 deletions example/app/data/WorkflowDS/Blueprints/Shell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "Shell",
"type": "CORE:Blueprint",
"description": "Description of a shell-job. That is a job that will run in the shell. Only for testing.",
"extends": ["CORE:NamedEntity", "JobHandler"],
"attributes": [
{
"name": "script",
"type": "CORE:BlueprintAttribute",
"attributeType": "string"
}
]
}
Loading
Loading