-
Notifications
You must be signed in to change notification settings - Fork 12
Add artifacts API improvements #252
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -628,9 +628,9 @@ isolated function insertAdditionalMIArtifacts(types:Heartbeat heartbeat) returns | |||||||||||||||||||||||||||||||||||||
| foreach types:Template template in <types:Template[]>heartbeat.artifacts.templates { | ||||||||||||||||||||||||||||||||||||||
| _ = check dbClient->execute(` | ||||||||||||||||||||||||||||||||||||||
| INSERT INTO runtime_templates ( | ||||||||||||||||||||||||||||||||||||||
| runtime_id, template_name, template_type, state | ||||||||||||||||||||||||||||||||||||||
| runtime_id, template_name, template_type | ||||||||||||||||||||||||||||||||||||||
| ) VALUES ( | ||||||||||||||||||||||||||||||||||||||
| ${heartbeat.runtime}, ${template.name}, ${template.'type}, ${template.state} | ||||||||||||||||||||||||||||||||||||||
| ${heartbeat.runtime}, ${template.name}, ${template.'type} | ||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||
| `); | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
629
to
636
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Log Improvement Suggestion No: 6
Suggested change
|
||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -368,13 +368,14 @@ public isolated function getTasksForRuntime(string runtimeId) returns types:Task | |||||||||||||||||||||||||
| public isolated function getTemplatesForRuntime(string runtimeId) returns types:Template[]|error { | ||||||||||||||||||||||||||
| types:Template[] templateList = []; | ||||||||||||||||||||||||||
| stream<types:Template, sql:Error?> templateStream = dbClient->query(` | ||||||||||||||||||||||||||
| SELECT template_name, template_type, state | ||||||||||||||||||||||||||
| SELECT template_name, template_type | ||||||||||||||||||||||||||
| FROM runtime_templates | ||||||||||||||||||||||||||
| WHERE runtime_id = ${runtimeId} | ||||||||||||||||||||||||||
| `); | ||||||||||||||||||||||||||
|
Comment on lines
370
to
374
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Log Improvement Suggestion No: 7
Suggested change
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| check from types:Template templateRecord in templateStream | ||||||||||||||||||||||||||
| do { | ||||||||||||||||||||||||||
| // state is no longer persisted; default value in type will be used | ||||||||||||||||||||||||||
| templateList.push(templateRecord); | ||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
|
@@ -540,7 +541,7 @@ public isolated function getDataSourcesForRuntime(string runtimeId) returns type | |||||||||||||||||||||||||
| public isolated function getConnectorsForRuntime(string runtimeId) returns types:Connector[]|error { | ||||||||||||||||||||||||||
| types:Connector[] connectorList = []; | ||||||||||||||||||||||||||
| stream<types:Connector, sql:Error?> connectorStream = dbClient->query(` | ||||||||||||||||||||||||||
| SELECT connector_name, package as connector_package, version, state | ||||||||||||||||||||||||||
| SELECT connector_name, package, version, state | ||||||||||||||||||||||||||
| FROM runtime_connectors | ||||||||||||||||||||||||||
| WHERE runtime_id = ${runtimeId} | ||||||||||||||||||||||||||
| `); | ||||||||||||||||||||||||||
|
Comment on lines
543
to
547
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Log Improvement Suggestion No: 8
Suggested change
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Log Improvement Suggestion No: 5