id
int64
0
10.2k
text_id
stringlengths
17
67
repo_owner
stringclasses
232 values
repo_name
stringclasses
295 values
issue_url
stringlengths
39
89
pull_url
stringlengths
37
87
comment_url
stringlengths
37
94
links_count
int64
1
2
link_keyword
stringclasses
12 values
issue_title
stringlengths
7
197
issue_body
stringlengths
45
21.3k
base_sha
stringlengths
40
40
head_sha
stringlengths
40
40
diff_url
stringlengths
120
170
diff
stringlengths
478
132k
changed_files
stringlengths
47
2.6k
changed_files_exts
stringclasses
22 values
changed_files_count
int64
1
22
java_changed_files_count
int64
1
22
kt_changed_files_count
int64
0
0
py_changed_files_count
int64
0
0
code_changed_files_count
int64
1
22
repo_symbols_count
int64
32.6k
242M
repo_tokens_count
int64
6.59k
49.2M
repo_lines_count
int64
992
6.2M
repo_files_without_tests_count
int64
12
28.1k
changed_symbols_count
int64
0
36.1k
changed_tokens_count
int64
0
6.5k
changed_lines_count
int64
0
561
changed_files_without_tests_count
int64
1
17
issue_symbols_count
int64
45
21.3k
issue_words_count
int64
2
1.39k
issue_tokens_count
int64
13
4.47k
issue_lines_count
int64
1
325
issue_links_count
int64
0
19
issue_code_blocks_count
int64
0
31
pull_create_at
timestamp[s]
repo_stars
int64
10
44.3k
repo_language
stringclasses
8 values
repo_languages
stringclasses
296 values
repo_license
stringclasses
2 values
983
wso2/testgrid/187/186
wso2
testgrid
https://github.com/wso2/testgrid/issues/186
https://github.com/wso2/testgrid/pull/187
https://github.com/wso2/testgrid/pull/187
1
resolves
Report generation is not done to the latest product test plan
**Description:** Report generation is not done to the latest product test plan
3d43cec666edc140a9169659b57ba706aa026351
83340a945c953e5703aca5a9667b803f9ac8736f
https://github.com/wso2/testgrid/compare/3d43cec666edc140a9169659b57ba706aa026351...83340a945c953e5703aca5a9667b803f9ac8736f
diff --git a/dao/src/main/java/org/wso2/testgrid/dao/uow/ReportGenerationUOW.java b/dao/src/main/java/org/wso2/testgrid/dao/uow/ReportGenerationUOW.java index 3eb0956d..ad79e200 100644 --- a/dao/src/main/java/org/wso2/testgrid/dao/uow/ReportGenerationUOW.java +++ b/dao/src/main/java/org/wso2/testgrid/dao/uow/ReportGenerationUOW.java @@ -65,7 +65,7 @@ public class ReportGenerationUOW { // JPQL query to get the latest modifies product test plan for product name and version String sqlQuery = StringUtil.concatStrings("SELECT c FROM ", ProductTestPlan.class.getSimpleName(), " c WHERE c.productName=\\"", productName, "\\" AND ", - "c.productVersion=\\"", productVersion, "\\" ORDER BY c.modifiedTimestamp"); + "c.productVersion=\\"", productVersion, "\\" ORDER BY c.modifiedTimestamp DESC"); return productTestPlanRepository.executeTypedQuary(sqlQuery, ProductTestPlan.class, 1); }
['dao/src/main/java/org/wso2/testgrid/dao/uow/ReportGenerationUOW.java']
{'.java': 1}
1
1
0
0
1
421,453
87,928
12,009
111
188
35
2
1
79
12
15
2
0
0
1970-01-01T00:25:12
29
Java
{'Java': 1684597, 'Shell': 197778, 'Python': 51092, 'Mustache': 50400, 'Groovy': 12493, 'Dockerfile': 11869, 'CSS': 2656, 'PowerShell': 2278, 'Batchfile': 806, 'HTML': 515}
Apache License 2.0
979
wso2/testgrid/235/234
wso2
testgrid
https://github.com/wso2/testgrid/issues/234
https://github.com/wso2/testgrid/pull/235
https://github.com/wso2/testgrid/pull/235
1
resolves
Build fails due to a Checkstyle error
**Description:** Project build fails due to a Checkstyle error caused by an unused import. **Suggested Labels:** Type/Bug **Suggested Assignees:** AsmaJ
929a8450647da421e846c3593226fc1ab0f25500
2c15d0c059c1f436732b85bf318540d6d7dd7cc2
https://github.com/wso2/testgrid/compare/929a8450647da421e846c3593226fc1ab0f25500...2c15d0c059c1f436732b85bf318540d6d7dd7cc2
diff --git a/infrastructure/src/main/java/org/wso2/testgrid/infrastructure/aws/AWSManager.java b/infrastructure/src/main/java/org/wso2/testgrid/infrastructure/aws/AWSManager.java index 915fe06f..f1f4ab74 100644 --- a/infrastructure/src/main/java/org/wso2/testgrid/infrastructure/aws/AWSManager.java +++ b/infrastructure/src/main/java/org/wso2/testgrid/infrastructure/aws/AWSManager.java @@ -46,7 +46,6 @@ import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Paths; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import java.util.Properties;
['infrastructure/src/main/java/org/wso2/testgrid/infrastructure/aws/AWSManager.java']
{'.java': 1}
1
1
0
0
1
439,711
91,506
12,519
107
25
5
1
1
159
20
39
7
0
0
1970-01-01T00:25:13
29
Java
{'Java': 1684597, 'Shell': 197778, 'Python': 51092, 'Mustache': 50400, 'Groovy': 12493, 'Dockerfile': 11869, 'CSS': 2656, 'PowerShell': 2278, 'Batchfile': 806, 'HTML': 515}
Apache License 2.0
10,008
ballerina-platform/module-ballerina-c2c/612/614
ballerina-platform
module-ballerina-c2c
https://github.com/ballerina-platform/module-ballerina-c2c/issues/614
https://github.com/ballerina-platform/module-ballerina-c2c/pull/612
https://github.com/ballerina-platform/module-ballerina-c2c/pull/612
1
resolves
Add variable name to non default configurable warning
**Description:** $Subject **Describe your problem(s)** **Describe your solution(s)** **Related Issues (optional):** <!-- Any related issues such as sub tasks, issues reported in other repositories (e.g component repositories), similar problems, etc. --> **Suggested Labels (optional):** <!-- Optional comma separated list of suggested labels. Non committers can’t assign labels to issues, so this will help issue creators who are not a committer to suggest possible labels--> **Suggested Assignees (optional):** <!--Optional comma separated list of suggested team members who should attend the issue. Non committers can’t assign issues to assignees, so this will help issue creators who are not a committer to suggest possible assignees-->
da1e20bbf7047ed2bf5ec1361f75bbb53f7d107a
e85351ad9b989f0166172f079fe429351ae1e4cf
https://github.com/ballerina-platform/module-ballerina-c2c/compare/da1e20bbf7047ed2bf5ec1361f75bbb53f7d107a...e85351ad9b989f0166172f079fe429351ae1e4cf
diff --git a/cloud-util/src/main/java/io/ballerina/c2c/util/C2CDiagnosticCodes.java b/cloud-util/src/main/java/io/ballerina/c2c/util/C2CDiagnosticCodes.java index 590d694..f9b9426 100644 --- a/cloud-util/src/main/java/io/ballerina/c2c/util/C2CDiagnosticCodes.java +++ b/cloud-util/src/main/java/io/ballerina/c2c/util/C2CDiagnosticCodes.java @@ -30,11 +30,12 @@ import static io.ballerina.tools.diagnostics.DiagnosticSeverity.WARNING; /** * {@code DiagnosticCodes} is used to hold diagnostic codes. */ -public enum C2CDiagnosticCodes { +public enum C2CDiagnosticCodes { PATH_CONTENT_READ_FAILED("C2C_001", "unable to read contents of the file `%s`", ERROR), FAILED_PORT_RETRIEVAL("C2C_002", "failed to retrieve port", WARNING), VALUE_STRING_ONLY_SUPPORTED("C2C_003", "https config extraction only supports basic string paths", WARNING), - CONFIGURABLE_NO_DEFAULT("C2C_005", "configurables with no default value is not supported", WARNING), + CONFIGURABLE_NO_DEFAULT("C2C_005", "default value is not specified for the configurable variable `%s`. cloud " + + "artifacts will not be generated for this variable", WARNING), CONFIGURABLE_OVERRIDE("C2C_006", "default value of configurable variable `%s` could be overridden in runtime", WARNING), DIRECTORY_DELETE_FAILED("C2C_007", "unable to delete directory: `%s`", WARNING), diff --git a/cloud-util/src/main/java/io/ballerina/c2c/util/C2CVisitor.java b/cloud-util/src/main/java/io/ballerina/c2c/util/C2CVisitor.java index 14fac16..65224f3 100644 --- a/cloud-util/src/main/java/io/ballerina/c2c/util/C2CVisitor.java +++ b/cloud-util/src/main/java/io/ballerina/c2c/util/C2CVisitor.java @@ -724,7 +724,7 @@ public class C2CVisitor extends NodeVisitor { if (expressionNode.kind() == SyntaxKind.REQUIRED_EXPRESSION) { diagnostics.add(C2CDiagnosticCodes .createDiagnostic(C2CDiagnosticCodes.CONFIGURABLE_NO_DEFAULT, - moduleVariableDeclarationNode.location())); + moduleVariableDeclarationNode.location(), variableName)); return Optional.of(0); } diff --git a/compiler-plugin-tests/src/test/java/io/ballerina/c2c/test/CustomDiagnosticsTest.java b/compiler-plugin-tests/src/test/java/io/ballerina/c2c/test/CustomDiagnosticsTest.java index d7bfe73..9c513e5 100644 --- a/compiler-plugin-tests/src/test/java/io/ballerina/c2c/test/CustomDiagnosticsTest.java +++ b/compiler-plugin-tests/src/test/java/io/ballerina/c2c/test/CustomDiagnosticsTest.java @@ -116,8 +116,9 @@ public class CustomDiagnosticsTest { Collection<Diagnostic> diagnostics = getC2CDiagnostics(project.currentPackage().getCompilation().diagnosticResult().diagnostics()); Assert.assertEquals(diagnostics.size(), 1); - Assert.assertEquals(diagnostics.iterator().next().message(), "configurables with no default value is not " + - "supported"); + Assert.assertEquals(diagnostics.iterator().next().message(), + "default value is not specified for the configurable variable `port`. " + + "cloud artifacts will not be generated for this variable"); } @Test
['cloud-util/src/main/java/io/ballerina/c2c/util/C2CVisitor.java', 'compiler-plugin-tests/src/test/java/io/ballerina/c2c/test/CustomDiagnosticsTest.java', 'cloud-util/src/main/java/io/ballerina/c2c/util/C2CDiagnosticCodes.java']
{'.java': 3}
3
3
0
0
3
362,245
75,990
8,974
87
530
106
7
2
760
102
152
16
0
0
1970-01-01T00:27:47
25
Java
{'Java': 672025, 'Ballerina': 113714, 'Dockerfile': 2538, 'Shell': 685}
Apache License 2.0
10,009
ballerina-platform/module-ballerina-c2c/440/439
ballerina-platform
module-ballerina-c2c
https://github.com/ballerina-platform/module-ballerina-c2c/issues/439
https://github.com/ballerina-platform/module-ballerina-c2c/pull/440
https://github.com/ballerina-platform/module-ballerina-c2c/pull/440
1
resolves
Throws exception when Docker is not started
**Description:** When trying to build docker without docker running following error is thrown. We need to handle it gracefully. ``` Nov 27, 2021 7:20:27 PM com.github.dockerjava.api.async.ResultCallbackTemplate onError SEVERE: Error during callback java.lang.RuntimeException: java.io.IOException: com.sun.jna.LastErrorException: [61] Connection refused at com.github.dockerjava.httpclient5.ApacheDockerHttpClientImpl.execute(ApacheDockerHttpClientImpl.java:179) at com.github.dockerjava.httpclient5.ApacheDockerHttpClient.execute(ApacheDockerHttpClient.java:9) at com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:228) at com.github.dockerjava.core.DefaultInvocationBuilder.lambda$executeAndStream$1(DefaultInvocationBuilder.java:269) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: java.io.IOException: com.sun.jna.LastErrorException: [61] Connection refused at com.github.dockerjava.transport.DomainSocket.<init>(DomainSocket.java:63) ``` **Steps to reproduce:** **Affected Versions:** **OS, DB, other environment details and versions:** **Related Issues (optional):** <!-- Any related issues such as sub tasks, issues reported in other repositories (e.g component repositories), similar problems, etc. --> **Suggested Labels (optional):** <!-- Optional comma separated list of suggested labels. Non committers can’t assign labels to issues, so this will help issue creators who are not a committer to suggest possible labels--> **Suggested Assignees (optional):** <!--Optional comma separated list of suggested team members who should attend the issue. Non committers can’t assign issues to assignees, so this will help issue creators who are not a committer to suggest possible assignees-->
4238140cf74a971d17f66378bcdf98e3db55ad8d
b75f055f89321b80fa4b48ed881d3cdbd6dae484
https://github.com/ballerina-platform/module-ballerina-c2c/compare/4238140cf74a971d17f66378bcdf98e3db55ad8d...b75f055f89321b80fa4b48ed881d3cdbd6dae484
diff --git a/c2c-extension/src/main/java/io/ballerina/c2c/exceptions/KubernetesPluginException.java b/c2c-extension/src/main/java/io/ballerina/c2c/exceptions/KubernetesPluginException.java index f903b4d..348e01f 100644 --- a/c2c-extension/src/main/java/io/ballerina/c2c/exceptions/KubernetesPluginException.java +++ b/c2c-extension/src/main/java/io/ballerina/c2c/exceptions/KubernetesPluginException.java @@ -25,13 +25,25 @@ import io.ballerina.tools.diagnostics.Diagnostic; */ public class KubernetesPluginException extends Exception { private final Diagnostic diagnostic; + private final boolean skipPrintTrace; public KubernetesPluginException(Diagnostic diagnostic) { super(diagnostic.message()); this.diagnostic = diagnostic; + this.skipPrintTrace = false; + } + + public KubernetesPluginException(Diagnostic diagnostic, boolean skipPrintTrace) { + super(diagnostic.message()); + this.diagnostic = diagnostic; + this.skipPrintTrace = skipPrintTrace; } public Diagnostic getDiagnostic() { return diagnostic; } + + public boolean isSkipPrintTrace() { + return this.skipPrintTrace; + } } diff --git a/c2c-extension/src/main/java/io/ballerina/c2c/handlers/DockerHandler.java b/c2c-extension/src/main/java/io/ballerina/c2c/handlers/DockerHandler.java index 99bf59b..24626d9 100644 --- a/c2c-extension/src/main/java/io/ballerina/c2c/handlers/DockerHandler.java +++ b/c2c-extension/src/main/java/io/ballerina/c2c/handlers/DockerHandler.java @@ -45,7 +45,7 @@ public class DockerHandler extends AbstractArtifactHandler { DiagnosticInfo diagnosticInfo = new DiagnosticInfo(C2CDiagnosticCodes.DOCKER_FAILED.getCode(), e.getMessage(), DiagnosticSeverity.WARNING); Diagnostic diagnostic = DiagnosticFactory.createDiagnostic(diagnosticInfo, new NullLocation()); - throw new KubernetesPluginException(diagnostic); + throw new KubernetesPluginException(diagnostic, true); } } } diff --git a/c2c-extension/src/main/java/io/ballerina/c2c/tasks/C2CCodeGeneratedTask.java b/c2c-extension/src/main/java/io/ballerina/c2c/tasks/C2CCodeGeneratedTask.java index 2ac7ec0..6e51758 100644 --- a/c2c-extension/src/main/java/io/ballerina/c2c/tasks/C2CCodeGeneratedTask.java +++ b/c2c-extension/src/main/java/io/ballerina/c2c/tasks/C2CCodeGeneratedTask.java @@ -118,7 +118,9 @@ public class C2CCodeGeneratedTask implements CompilerLifecycleTask<CompilerLifec } catch (KubernetesPluginException e) { String errorMessage = "module [" + packageId + "] " + e.getMessage(); printError(errorMessage); - pluginLog.error(errorMessage, e); + if (!e.isSkipPrintTrace()) { + pluginLog.error(errorMessage, e); + } try { KubernetesUtils.deleteDirectory(kubernetesOutputPath); } catch (KubernetesPluginException ignored) {
['c2c-extension/src/main/java/io/ballerina/c2c/exceptions/KubernetesPluginException.java', 'c2c-extension/src/main/java/io/ballerina/c2c/handlers/DockerHandler.java', 'c2c-extension/src/main/java/io/ballerina/c2c/tasks/C2CCodeGeneratedTask.java']
{'.java': 3}
3
3
0
0
3
339,187
70,735
8,296
82
686
123
18
3
1,794
163
377
31
0
1
1970-01-01T00:27:18
25
Java
{'Java': 672025, 'Ballerina': 113714, 'Dockerfile': 2538, 'Shell': 685}
Apache License 2.0
10,010
ballerina-platform/module-ballerina-c2c/346/345
ballerina-platform
module-ballerina-c2c
https://github.com/ballerina-platform/module-ballerina-c2c/issues/345
https://github.com/ballerina-platform/module-ballerina-c2c/pull/346
https://github.com/ballerina-platform/module-ballerina-c2c/pull/346
1
resolves
Secrets are not getting loaded to yaml when Cloud.toml does not exist
**Description:** $Subject. **Suggested Labels:** <!-- Optional comma separated list of suggested labels. Non committers can’t assign labels to issues, so this will help issue creators who are not a committer to suggest possible labels--> **Suggested Assignees:** <!--Optional comma separated list of suggested team members who should attend the issue. Non committers can’t assign issues to assignees, so this will help issue creators who are not a committer to suggest possible assignees--> **Affected Product Version:** **OS, DB, other environment details and versions:** **Steps to reproduce:** **Related Issues:** <!-- Any related issues such as sub tasks, issues reported in other repositories (e.g component repositories), similar problems, etc. -->
921afe75e8f07f7ddf2637ceec6a10048cbc4c61
fe28e4e86179023212ca87b5404c4b8dd2f1a415
https://github.com/ballerina-platform/module-ballerina-c2c/compare/921afe75e8f07f7ddf2637ceec6a10048cbc4c61...fe28e4e86179023212ca87b5404c4b8dd2f1a415
diff --git a/c2c-extension/src/main/java/io/ballerina/c2c/ArtifactManager.java b/c2c-extension/src/main/java/io/ballerina/c2c/ArtifactManager.java index e0083ab..e262ae8 100644 --- a/c2c-extension/src/main/java/io/ballerina/c2c/ArtifactManager.java +++ b/c2c-extension/src/main/java/io/ballerina/c2c/ArtifactManager.java @@ -24,6 +24,7 @@ import io.ballerina.c2c.handlers.DeploymentHandler; import io.ballerina.c2c.handlers.DockerHandler; import io.ballerina.c2c.handlers.HPAHandler; import io.ballerina.c2c.handlers.JobHandler; +import io.ballerina.c2c.handlers.SecretHandler; import io.ballerina.c2c.handlers.ServiceHandler; import io.ballerina.c2c.models.DeploymentModel; import io.ballerina.c2c.models.KubernetesContext; @@ -85,6 +86,7 @@ public class ArtifactManager { new ConfigMapHandler().createArtifacts(); new DeploymentHandler().createArtifacts(); new HPAHandler().createArtifacts(); + new SecretHandler().createArtifacts(); } new DockerHandler().createArtifacts(); printInstructions(); diff --git a/c2c-extension/src/main/java/io/ballerina/c2c/CloudTomlResolver.java b/c2c-extension/src/main/java/io/ballerina/c2c/CloudTomlResolver.java index 5298539..aab6e72 100644 --- a/c2c-extension/src/main/java/io/ballerina/c2c/CloudTomlResolver.java +++ b/c2c-extension/src/main/java/io/ballerina/c2c/CloudTomlResolver.java @@ -21,7 +21,6 @@ package io.ballerina.c2c; import io.ballerina.c2c.diagnostics.C2CDiagnosticCodes; import io.ballerina.c2c.diagnostics.NullLocation; import io.ballerina.c2c.exceptions.KubernetesPluginException; -import io.ballerina.c2c.handlers.SecretHandler; import io.ballerina.c2c.models.ConfigMapModel; import io.ballerina.c2c.models.DeploymentModel; import io.ballerina.c2c.models.KubernetesContext; @@ -264,7 +263,6 @@ public class CloudTomlResolver { dataHolder.addSecrets(Collections.singleton(secretModel)); } } - new SecretHandler().createArtifacts(); } private Path validatePaths(Path path, Path mountPath) throws KubernetesPluginException {
['c2c-extension/src/main/java/io/ballerina/c2c/CloudTomlResolver.java', 'c2c-extension/src/main/java/io/ballerina/c2c/ArtifactManager.java']
{'.java': 2}
2
2
0
0
2
296,209
61,946
7,327
73
196
42
4
2
784
106
158
19
0
0
1970-01-01T00:27:10
25
Java
{'Java': 672025, 'Ballerina': 113714, 'Dockerfile': 2538, 'Shell': 685}
Apache License 2.0
10,011
ballerina-platform/module-ballerina-c2c/184/183
ballerina-platform
module-ballerina-c2c
https://github.com/ballerina-platform/module-ballerina-c2c/issues/183
https://github.com/ballerina-platform/module-ballerina-c2c/pull/184
https://github.com/ballerina-platform/module-ballerina-c2c/pull/184
1
resolves
Kubernetes port name generations are invalid
**Description:** Building services with '/' in the base path will generate invalid port names in the k8s service. ``` import ballerina/http; service / on new http:Listener(9090) { resource function get greeting() returns string { return "Hello, World!"; } } ``` ``` spec: ports: - name: "svc-1--svc" port: 9090 protocol: "TCP" targetPort: 9090 ``` **Suggested Labels:** <!-- Optional comma separated list of suggested labels. Non committers can’t assign labels to issues, so this will help issue creators who are not a committer to suggest possible labels--> **Suggested Assignees:** <!--Optional comma separated list of suggested team members who should attend the issue. Non committers can’t assign issues to assignees, so this will help issue creators who are not a committer to suggest possible assignees--> **Affected Product Version:** **OS, DB, other environment details and versions:** **Steps to reproduce:** **Related Issues:** <!-- Any related issues such as sub tasks, issues reported in other repositories (e.g component repositories), similar problems, etc. -->
0b03c4daead3886b9c2f36905405ea7abd607cf1
de77bec8860a161a2410372344841d1db95a95ea
https://github.com/ballerina-platform/module-ballerina-c2c/compare/0b03c4daead3886b9c2f36905405ea7abd607cf1...de77bec8860a161a2410372344841d1db95a95ea
diff --git a/c2c-extension-test/src/test/java/io/ballerina/c2c/test/samples/Sample2Test.java b/c2c-extension-test/src/test/java/io/ballerina/c2c/test/samples/Sample2Test.java index 25ecef7..74067a6 100644 --- a/c2c-extension-test/src/test/java/io/ballerina/c2c/test/samples/Sample2Test.java +++ b/c2c-extension-test/src/test/java/io/ballerina/c2c/test/samples/Sample2Test.java @@ -112,7 +112,7 @@ public class Sample2Test extends SampleTest { Assert.assertEquals(9090, service.getSpec().getPorts().get(0).getPort().intValue()); Assert.assertEquals(9090, service.getSpec().getPorts().get(0).getTargetPort().getIntVal().intValue()); Assert.assertEquals("TCP", service.getSpec().getPorts().get(0).getProtocol()); - Assert.assertEquals("svc-1-helloworl", service.getSpec().getPorts().get(0).getName()); + Assert.assertEquals("port-1-hello-sv", service.getSpec().getPorts().get(0).getName()); } @Test diff --git a/c2c-extension/src/main/java/io/ballerina/c2c/handlers/ServiceHandler.java b/c2c-extension/src/main/java/io/ballerina/c2c/handlers/ServiceHandler.java index 3de23db..263105b 100644 --- a/c2c-extension/src/main/java/io/ballerina/c2c/handlers/ServiceHandler.java +++ b/c2c-extension/src/main/java/io/ballerina/c2c/handlers/ServiceHandler.java @@ -64,7 +64,7 @@ public class ServiceHandler extends AbstractArtifactHandler { for (ServiceModel serviceModel : serviceModels) { count++; if (null == serviceModel.getPortName()) { - serviceModel.setPortName(KubernetesUtils.getValidName("svc-" + count + "-" + serviceModel.getName())); + serviceModel.setPortName(KubernetesUtils.getValidName("port-" + count + "-" + commonService.getName())); } ServicePortBuilder servicePortBuilder = new ServicePortBuilder() .withName(serviceModel.getPortName()) diff --git a/c2c-extension/src/main/java/io/ballerina/c2c/utils/KubernetesUtils.java b/c2c-extension/src/main/java/io/ballerina/c2c/utils/KubernetesUtils.java index 3f909b6..9c22b0b 100644 --- a/c2c-extension/src/main/java/io/ballerina/c2c/utils/KubernetesUtils.java +++ b/c2c-extension/src/main/java/io/ballerina/c2c/utils/KubernetesUtils.java @@ -317,7 +317,8 @@ public class KubernetesUtils { name = name.substring(1); } name = name.toLowerCase(Locale.getDefault()).replaceAll("[_.]", "-") - .replaceAll("[$]", "").replaceAll("/", "-"); + .replaceAll("[$]", "").replaceAll("/", "-") + .replaceAll("--", "-"); name = name.substring(0, Math.min(name.length(), 15)); if (name.endsWith("-")) { return name.substring(0, name.length() - 1);
['c2c-extension/src/main/java/io/ballerina/c2c/utils/KubernetesUtils.java', 'c2c-extension-test/src/test/java/io/ballerina/c2c/test/samples/Sample2Test.java', 'c2c-extension/src/main/java/io/ballerina/c2c/handlers/ServiceHandler.java']
{'.java': 3}
3
3
0
0
3
347,068
72,799
8,893
86
404
77
5
2
1,159
157
256
38
0
2
1970-01-01T00:26:59
25
Java
{'Java': 672025, 'Ballerina': 113714, 'Dockerfile': 2538, 'Shell': 685}
Apache License 2.0
3,805
odpi/egeria-connector-ibm-information-server/486/484
odpi
egeria-connector-ibm-information-server
https://github.com/odpi/egeria-connector-ibm-information-server/issues/484
https://github.com/odpi/egeria-connector-ibm-information-server/pull/486
https://github.com/odpi/egeria-connector-ibm-information-server/pull/486
1
fix
NPE when trying to get EntityDetail for rid that is not present in IGC
This is uncommon scenario but if asset is removed from IGC for some reson repoistory proxy should respond with Entitiy/Detail not found message instead NPE. `2021-02-09 17:07:02.018 ERROR [http-nio-127.0.0.1-8080-exec-7] [o.o.o.f.a.i.RepositoryRESTServices] --- igc-proxy-edl9caddd5b-637d-4cb3-a16b-20bfaa301cc3 java.lang.NullPointerException returned message of null and stacktrace of java.lang.NullPointerException at org.odpi.egeria.connectors.ibm.igc.repositoryconnector.mapping.entities.EntityMapping.setupEntityObj(EntityMapping.java:577) at org.odpi.egeria.connectors.ibm.igc.repositoryconnector.mapping.entities.EntityMapping.getEntityDetail(EntityMapping.java:726) at org.odpi.egeria.connectors.ibm.igc.repositoryconnector.IGCRepositoryHelper.getEntityDetailFromMapInstance(IGCRepositoryHelper.java:1283) at org.odpi.egeria.connectors.ibm.igc.repositoryconnector.IGCRepositoryHelper.getEntityDetail(IGCRepositoryHelper.java:1320) at org.odpi.egeria.connectors.ibm.igc.repositoryconnector.IGCOMRSMetadataCollection.getEntityDetail(IGCOMRSMetadataCollection.java:783) at org.odpi.openmetadata.repositoryservices.localrepository.repositoryconnector.LocalOMRSMetadataCollection.getEntityDetail(LocalOMRSMetadataCollection.java:1784) at org.odpi.openmetadata.repositoryservices.rest.server.OMRSRepositoryRESTServices.getEntityDetail(OMRSRepositoryRESTServices.java:1893) at org.odpi.openmetadata.repositoryservices.rest.server.spring.LocalRepositoryServicesResource.getEntityDetail(LocalRepositoryServicesResource.java:694)`
d11a7de19bba4296a7e9d93e29c0c66a8a5850d2
5730a569f301cadc2966d411216f15bed784e9e1
https://github.com/odpi/egeria-connector-ibm-information-server/compare/d11a7de19bba4296a7e9d93e29c0c66a8a5850d2...5730a569f301cadc2966d411216f15bed784e9e1
diff --git a/igc-adapter/src/main/java/org/odpi/egeria/connectors/ibm/igc/repositoryconnector/mapping/entities/EntityMapping.java b/igc-adapter/src/main/java/org/odpi/egeria/connectors/ibm/igc/repositoryconnector/mapping/entities/EntityMapping.java index 986026c0..d7805ae4 100644 --- a/igc-adapter/src/main/java/org/odpi/egeria/connectors/ibm/igc/repositoryconnector/mapping/entities/EntityMapping.java +++ b/igc-adapter/src/main/java/org/odpi/egeria/connectors/ibm/igc/repositoryconnector/mapping/entities/EntityMapping.java @@ -705,6 +705,7 @@ public abstract class EntityMapping extends InstanceMapping { */ public static EntityDetail getEntityDetail(ObjectCache cache, EntityMappingInstance entityMap) throws RepositoryErrorException { + final String methodName = "getEntityDetail"; EntityMapping mapping = entityMap.getMapping(); IGCRestClient igcRestClient = entityMap.getRepositoryConnector().getIGCRestClient(); @@ -721,6 +722,17 @@ public abstract class EntityMapping extends InstanceMapping { entityMap.initializeEntityDetail(); EntityDetail preliminary = entityMap.getOmrsDetail(cache); + + if(entityMap.getIgcEntity() == null) { + // Igc entity was not found, raise exception providing as much details as possible + raiseRepositoryErrorException(IGCOMRSErrorCode.ENTITY_NOT_KNOWN, + methodName, + null, + preliminary !=null ? preliminary.getGUID() : "", + entityMap.getIgcEntityRid() !=null ? entityMap.getIgcEntityRid() : "", + entityMap.getRepositoryConnector().getRepositoryName()); + } + if (preliminary != null) { // Then handle any generic mappings and classifications setupEntityObj(cache, entityMap, preliminary);
['igc-adapter/src/main/java/org/odpi/egeria/connectors/ibm/igc/repositoryconnector/mapping/entities/EntityMapping.java']
{'.java': 1}
1
1
0
0
1
4,590,248
960,208
105,256
728
590
114
12
1
1,541
57
368
12
0
0
1970-01-01T00:26:53
24
Java
{'Java': 5061945, 'HTML': 20066, 'Shell': 2202, 'Mustache': 1022, 'CSS': 422}
Apache License 2.0
3,806
odpi/egeria-connector-ibm-information-server/446/445
odpi
egeria-connector-ibm-information-server
https://github.com/odpi/egeria-connector-ibm-information-server/issues/445
https://github.com/odpi/egeria-connector-ibm-information-server/pull/446
https://github.com/odpi/egeria-connector-ibm-information-server/pull/446
1
resolve
Lineage mapping output not properly limited for stores that have multiple readers or writers
When a stage interacts with a data store which itself may have multiple stages writing into it or reading from it, the lineage mapping processing is not currently limiting its output to only the relevant portion of those mappings for the particular stage being processed. The result is that _all_ inputs or outputs for that data store are included in the lineage mappings for a stage-level Process, which is incorrect.
f7241dfd0112ecfa894e2223e4c0c7634f46832f
34c5f9810f2f941518c48d875f06183e66d49a4e
https://github.com/odpi/egeria-connector-ibm-information-server/compare/f7241dfd0112ecfa894e2223e4c0c7634f46832f...34c5f9810f2f941518c48d875f06183e66d49a4e
diff --git a/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/DataStageConnector.java b/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/DataStageConnector.java index 1d8b20c3..f125ae96 100644 --- a/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/DataStageConnector.java +++ b/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/DataStageConnector.java @@ -382,8 +382,8 @@ public class DataStageConnector extends DataEngineConnectorBase { List<Process> processes = new ArrayList<>(); log.debug("Translating processes for each stage..."); for (Stage stage : job.getAllStages()) { - ProcessMapping processMapping = new ProcessMapping(dataStageCache, job, stage); - Process process = processMapping.getProcess(); + ProcessMapping processMapping = new ProcessMapping(dataStageCache); + Process process = processMapping.getForStage(stage, job); if (process != null) { try { log.debug(" ... process: {}", objectMapper.writeValueAsString(process)); diff --git a/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/LineageMappingMapping.java b/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/LineageMappingMapping.java index db9c4059..11b47293 100644 --- a/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/LineageMappingMapping.java +++ b/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/LineageMappingMapping.java @@ -189,11 +189,18 @@ class LineageMappingMapping extends BaseMapping { * * @param fields list of IGC field objects (data_file_field or database_column) * @param job the job for which to create the LineageMappings + * @param stageRid the RID of the stage for which we are building mappings + * @param knownLinks set of known link RIDs * @param bSource true if processing a source link, false if a target link * @param fullyQualifiedStageName the fully qualifiedName of the stage itself * @return {@code Set<LineageMapping>} */ - Set<LineageMapping> getForDataStoreFields(List<Classificationenabledgroup> fields, DataStageJob job, boolean bSource, String fullyQualifiedStageName) { + Set<LineageMapping> getForDataStoreFieldsInStage(List<Classificationenabledgroup> fields, + DataStageJob job, + String stageRid, + Set<String> knownLinks, + boolean bSource, + String fullyQualifiedStageName) { final String methodName = "getForDataStoreFields"; Set<LineageMapping> lineageMappings = new HashSet<>(); // For each field in the data store... @@ -202,6 +209,8 @@ class LineageMappingMapping extends BaseMapping { try { String field1QN = getFullyQualifiedName(fieldObj); if (field1QN != null) { + // relatedStageCols could have more than just this stage's inputs / outputs (a given data store + // may be written or read by many stages) ItemList<InformationAsset> relatedStageCols; String propertyName; if (bSource) { @@ -217,7 +226,8 @@ class LineageMappingMapping extends BaseMapping { // For each object that reads / writes to that field... for (InformationAsset stageColRef : allRelatedStageCols) { ColumnLevelLineage stageColFull = job.getColumnLevelLineageByRid(stageColRef.getId()); - if (stageColFull != null) { + // Limit the details we capture to only the stage we're processing + if (stageColumnForKnownLink(stageColFull, stageRid, knownLinks)) { String field1EmbeddedQN = getFullyQualifiedName(fieldObj, fullyQualifiedStageName); String field2EmbeddedQN = getFullyQualifiedName(stageColFull, fullyQualifiedStageName); if (bSource) { @@ -236,7 +246,7 @@ class LineageMappingMapping extends BaseMapping { lineageMappings.add(oneToOne); } } else { - log.error("Unable to find referenced stage column: {}", stageColRef); + log.debug("Found a stage column for a link not listed as a known link for this stage -- ignoring: {}", stageColFull); } } } else { diff --git a/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/ProcessMapping.java b/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/ProcessMapping.java index 0cd51ac5..50c1a1f2 100644 --- a/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/ProcessMapping.java +++ b/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/ProcessMapping.java @@ -24,18 +24,25 @@ import java.util.stream.Stream; public class ProcessMapping extends BaseMapping { private static final Logger log = LoggerFactory.getLogger(ProcessMapping.class); - private Process process; /** - * Create a new process from a DataStageJob that represents either a job or a sequence. + * Default constructor to pass in the cache for re-use. * * @param cache used by this mapping - * @param job the job or sequence from which to create a process */ - public ProcessMapping(DataStageCache cache, DataStageJob job) { + public ProcessMapping(DataStageCache cache) { super(cache); - final String methodName = "ProcessMapping"; - process = null; + } + + /** + * Create a new process from a DataStageJob that represents either a job or a sequence. + * + * @param job the job or sequence from which to create a process + * @return Process + */ + public Process getForJob(DataStageJob job) { + final String methodName = "getForJob"; + Process process; if (job.getType().equals(DataStageJob.JobType.SEQUENCE)) { Dsjob jobObj = job.getJobObject(); process = getSkeletonProcess(jobObj); @@ -94,19 +101,19 @@ public class ProcessMapping extends BaseMapping { } } } + return process; } /** * Create a new process from the provided DataStage stage. * - * @param cache used by this mapping - * @param job the job within which the stage exists * @param stage the stage from which to create a process + * @param job the job within which the stage exists + * @return Process */ - public ProcessMapping(DataStageCache cache, DataStageJob job, Stage stage) { - super(cache); - final String methodName = "ProcessMapping"; - process = getSkeletonProcess(stage); + public Process getForStage(Stage stage, DataStageJob job) { + final String methodName = "getForStage"; + Process process = getSkeletonProcess(stage); if (process != null) { Set<PortImplementation> portImplementations = new HashSet<>(); Set<LineageMapping> lineageMappings = new HashSet<>(); @@ -117,11 +124,11 @@ public class ProcessMapping extends BaseMapping { log.debug("Adding input links: {}", allInputLinks); addImplementationDetails(job, stage, allInputLinks, allLinkRids, PortType.INPUT_PORT, portImplementations, lineageMappings); log.debug("Adding input stores: {}", stage.getReadsFromDesign()); - addDataStoreDetails(job, stage, "reads_from_(design)", stage.getReadsFromDesign(), PortType.INPUT_PORT, portImplementations, lineageMappings); + addDataStoreDetails(job, stage, "reads_from_(design)", stage.getReadsFromDesign(), allLinkRids, PortType.INPUT_PORT, portImplementations, lineageMappings); log.debug("Adding output links: {}", allOutputLinks); addImplementationDetails(job, stage, allOutputLinks, allLinkRids, PortType.OUTPUT_PORT, portImplementations, lineageMappings); log.debug("Adding output stores: {}", stage.getWritesToDesign()); - addDataStoreDetails(job, stage, "writes_to_(design)", stage.getWritesToDesign(), PortType.OUTPUT_PORT, portImplementations, lineageMappings); + addDataStoreDetails(job, stage, "writes_to_(design)", stage.getWritesToDesign(), allLinkRids, PortType.OUTPUT_PORT, portImplementations, lineageMappings); log.debug("Adding stage variables"); addStageVariableDetails(job, stage, portImplementations, lineageMappings); process.setPortImplementations(new ArrayList<>(portImplementations)); @@ -146,15 +153,9 @@ public class ProcessMapping extends BaseMapping { e); } } + return process; } - /** - * Retrieve the mapped process. - * - * @return Process - */ - public Process getProcess() { return this.process; } - /** * Construct a minimal Process object from the provided IGC object (stage, job, sequence, etc). * @@ -271,6 +272,7 @@ public class ProcessMapping extends BaseMapping { * @param stage the stage for which to add implementation details * @param propertyName the name of the property from which stores were retrieved * @param stores the stores for which to create the implementation details + * @param linkRids the RIDs of all links known by this stage (both input and output) * @param portType the type of port * @param portImplementations the list of PortImplementations to append to with implementation details * @param lineageMappings the list of LineageMappings to append to with implementation details @@ -279,6 +281,7 @@ public class ProcessMapping extends BaseMapping { Stage stage, String propertyName, ItemList<InformationAsset> stores, + Set<String> linkRids, PortType portType, Set<PortImplementation> portImplementations, Set<LineageMapping> lineageMappings) { @@ -295,7 +298,7 @@ public class ProcessMapping extends BaseMapping { portImplementations.add(portImplementationMapping.getForDataStoreFields(fieldsForStore, stage, portType, fullyQualifiedStageName)); log.debug("Adding lineage mappings for fields as {}: {}", portType.getName(), fieldsForStore); LineageMappingMapping lineageMappingMapping = new LineageMappingMapping(cache); - lineageMappings.addAll(lineageMappingMapping.getForDataStoreFields(fieldsForStore, job, portType.equals(PortType.INPUT_PORT), fullyQualifiedStageName)); + lineageMappings.addAll(lineageMappingMapping.getForDataStoreFieldsInStage(fieldsForStore, job, stage.getId(), linkRids, portType.equals(PortType.INPUT_PORT), fullyQualifiedStageName)); } } else { log.error("Unable to determine identity for stage -- not including: {}", stage); diff --git a/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/model/DataStageCache.java b/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/model/DataStageCache.java index 50e2ee9c..d5cb7236 100644 --- a/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/model/DataStageCache.java +++ b/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/model/DataStageCache.java @@ -141,8 +141,8 @@ public class DataStageCache { log.debug("(cache miss) -- building Process for job: {}", rid); DataStageJob job = getJobByRid(rid); if (job != null) { - ProcessMapping processMapping = new ProcessMapping(this, job); - process = processMapping.getProcess(); + ProcessMapping processMapping = new ProcessMapping(this); + process = processMapping.getForJob(job); if (process != null) { ridToProcess.put(rid, process); }
['datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/model/DataStageCache.java', 'datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/DataStageConnector.java', 'datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/LineageMappingMapping.java', 'datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/ProcessMapping.java']
{'.java': 4}
4
4
0
0
4
4,582,934
958,903
105,093
727
4,784
916
71
4
421
70
77
3
0
0
1970-01-01T00:26:45
24
Java
{'Java': 5061945, 'HTML': 20066, 'Shell': 2202, 'Mustache': 1022, 'CSS': 422}
Apache License 2.0
3,808
odpi/egeria-connector-ibm-information-server/273/270
odpi
egeria-connector-ibm-information-server
https://github.com/odpi/egeria-connector-ibm-information-server/issues/270
https://github.com/odpi/egeria-connector-ibm-information-server/pull/273
https://github.com/odpi/egeria-connector-ibm-information-server/pull/273
1
resolve
Need better connection retry logic
Currently seems that pretty much any failure to connect to IGC via the REST API results in a retry _by opening a new session_. Should be more intelligent and see if the error is to do with a session timeout before blindly retrying new sessions, or we needlessly risk session overflows.
9483d21a7e3b9fb54635316ea697f2601cdbd99f
c3f3281517287106c4cf0a504d79b88fa1c8d461
https://github.com/odpi/egeria-connector-ibm-information-server/compare/9483d21a7e3b9fb54635316ea697f2601cdbd99f...c3f3281517287106c4cf0a504d79b88fa1c8d461
diff --git a/ia-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/ia/clientlibrary/IARestClient.java b/ia-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/ia/clientlibrary/IARestClient.java index 1a3dad9b..d42bfaa7 100644 --- a/ia-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/ia/clientlibrary/IARestClient.java +++ b/ia-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/ia/clientlibrary/IARestClient.java @@ -275,7 +275,7 @@ public class IARestClient { toSend, String.class); setCookiesFromResponse(response); - } catch (HttpClientErrorException e) { + } catch (HttpClientErrorException.Forbidden e) { log.warn("Request failed -- session may have expired, retrying...", e); // If the response was forbidden (fails with exception), the session may have expired -- create a new one response = openNewSessionWithRequest( diff --git a/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/IGCRestClient.java b/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/IGCRestClient.java index 92954df3..b781375a 100644 --- a/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/IGCRestClient.java +++ b/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/IGCRestClient.java @@ -30,7 +30,6 @@ import org.odpi.egeria.connectors.ibm.igc.clientlibrary.model.types.TypeProperty import org.odpi.egeria.connectors.ibm.igc.clientlibrary.search.IGCSearch; import org.odpi.egeria.connectors.ibm.igc.clientlibrary.search.IGCSearchCondition; import org.odpi.egeria.connectors.ibm.igc.clientlibrary.search.IGCSearchConditionSet; -import org.odpi.egeria.connectors.ibm.igc.clientlibrary.search.IGCSearchSorting; import org.odpi.egeria.connectors.ibm.igc.clientlibrary.update.IGCCreate; import org.odpi.egeria.connectors.ibm.igc.clientlibrary.update.IGCUpdate; import org.slf4j.Logger; @@ -471,7 +470,7 @@ public class IGCRestClient { toSend, String.class ); - } catch (HttpClientErrorException e) { + } catch (HttpClientErrorException.Forbidden e) { log.warn("Request failed -- session may have expired, retrying...", e); // If the response was forbidden (fails with exception), the session may have expired -- create a new one response = openNewSessionWithUpload( @@ -534,7 +533,7 @@ public class IGCRestClient { toSend, String.class); setCookiesFromResponse(response); - } catch (HttpClientErrorException e) { + } catch (HttpClientErrorException.Forbidden e) { log.warn("Request failed -- session may have expired, retrying...", e); // If the response was forbidden (fails with exception), the session may have expired -- create a new one response = openNewSessionWithRequest(
['ia-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/ia/clientlibrary/IARestClient.java', 'igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/IGCRestClient.java']
{'.java': 2}
2
2
0
0
2
4,318,168
914,196
100,744
724
398
82
7
2
286
51
60
1
0
0
1970-01-01T00:26:24
24
Java
{'Java': 5061945, 'HTML': 20066, 'Shell': 2202, 'Mustache': 1022, 'CSS': 422}
Apache License 2.0
3,809
odpi/egeria-connector-ibm-information-server/161/105
odpi
egeria-connector-ibm-information-server
https://github.com/odpi/egeria-connector-ibm-information-server/issues/105
https://github.com/odpi/egeria-connector-ibm-information-server/pull/161
https://github.com/odpi/egeria-connector-ibm-information-server/pull/161
1
resolve
Investigate alternative retrieval mechanisms for DataStage adapter
A number of minor versions of Information Server seem to have issues with one of the queries used to retrieve information about DataStage job details, specifically the ability to retrieve all `ds_stage_column`s by searching based on either their `link.job_or_container` property or even the `link` property directly (using an `in` semantic`). Versions that appear not to work: - 11.5.0.2sp6 - 11.7.1.0sp2 Versions that appear to work: - 11.5.0.2sp5 May require either deeper investigation of the non-working releases, or consider alternative mechanism for retrieving the stage column details that works more reliably across all releases.
e5eab020d851343a5af434c234265044294afc46
7119b6144ff11a287117a7f5bddc9e8f5cb6fcb0
https://github.com/odpi/egeria-connector-ibm-information-server/compare/e5eab020d851343a5af434c234265044294afc46...7119b6144ff11a287117a7f5bddc9e8f5cb6fcb0
diff --git a/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/AttributeMapping.java b/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/AttributeMapping.java index 953dc826..b8a7266e 100644 --- a/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/AttributeMapping.java +++ b/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/AttributeMapping.java @@ -6,6 +6,7 @@ import org.odpi.egeria.connectors.ibm.datastage.dataengineconnector.model.DataSt import org.odpi.egeria.connectors.ibm.igc.clientlibrary.model.base.Classificationenabledgroup; import org.odpi.egeria.connectors.ibm.igc.clientlibrary.model.base.DataItem; import org.odpi.egeria.connectors.ibm.igc.clientlibrary.model.base.Link; +import org.odpi.egeria.connectors.ibm.igc.clientlibrary.model.base.StageColumn; import org.odpi.egeria.connectors.ibm.igc.clientlibrary.model.common.ItemList; import org.odpi.openmetadata.accessservices.dataengine.model.Attribute; import org.slf4j.Logger; @@ -40,7 +41,7 @@ class AttributeMapping extends BaseMapping { int index = 0; for (DataItem stageColumn : stageColumns.getItems()) { String colId = stageColumn.getId(); - DataItem stageColumnObj = job.getStageColumnByRid(colId); + StageColumn stageColumnObj = job.getStageColumnByRid(colId); Attribute attribute = new Attribute(); attribute.setQualifiedName(stageColumnObj.getIdentity(igcRestClient).toString() + stageNameSuffix); attribute.setDisplayName(stageColumnObj.getName()); diff --git a/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/LineageMappingMapping.java b/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/LineageMappingMapping.java index f53862d5..75b40867 100644 --- a/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/LineageMappingMapping.java +++ b/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/LineageMappingMapping.java @@ -42,14 +42,14 @@ class LineageMappingMapping extends BaseMapping { // For each stage column defined on the link... for (DataItem stageColumnRef : stageColumns.getItems()) { String colId = stageColumnRef.getId(); - DsStageColumn stageColumnFull = job.getStageColumnByRid(colId); + StageColumn stageColumnFull = job.getStageColumnByRid(colId); String thisColumnName = getFullyQualifiedName(stageColumnFull) + stageNameSuffix; if (!bSource) { // Create a LineageMapping from each previous stage column to this stage column ItemList<DataItem> previousColumns = stageColumnFull.getPreviousStageColumns(); previousColumns.getAllPages(igcRestClient); for (DataItem previousColumnRef : previousColumns.getItems()) { - DsStageColumn previousColumnFull = job.getStageColumnByRid(previousColumnRef.getId()); + StageColumn previousColumnFull = job.getStageColumnByRid(previousColumnRef.getId()); LineageMapping lineageMapping = getLineageMapping(getFullyQualifiedName(previousColumnFull) + stageNameSuffix, thisColumnName); lineageMappingsSet.add(lineageMapping); } @@ -58,7 +58,7 @@ class LineageMappingMapping extends BaseMapping { ItemList<DataItem> nextColumns = stageColumnFull.getNextStageColumns(); nextColumns.getAllPages(igcRestClient); for (DataItem nextColumnRef : nextColumns.getItems()) { - DsStageColumn nextColumnFull = job.getStageColumnByRid(nextColumnRef.getId()); + StageColumn nextColumnFull = job.getStageColumnByRid(nextColumnRef.getId()); LineageMapping lineageMapping = getLineageMapping(thisColumnName, getFullyQualifiedName(nextColumnFull) + stageNameSuffix); lineageMappingsSet.add(lineageMapping); } @@ -88,7 +88,7 @@ class LineageMappingMapping extends BaseMapping { String userId = link.getModifiedBy(); // For each stage column defined on the link... for (DataItem stageColRef : stageColumns.getItems()) { - DsStageColumn stageColFull = job.getStageColumnByRid(stageColRef.getId()); + StageColumn stageColFull = job.getStageColumnByRid(stageColRef.getId()); String stageColName = getFullyQualifiedName(stageColFull); // Create a single mapping between the input stage and the output stage that use this link LineageMapping lineageMapping = getLineageMapping(stageColName + "_" + inputStage.getName(), stageColName + "_" + outputStage.getName()); @@ -108,23 +108,27 @@ class LineageMappingMapping extends BaseMapping { * * @param job the job for which to create the LineageMappings * @param fields list of IGC field objects (data_file_field or database_column) - * @param relationshipProperty one of 'read_by_(design)' or 'written_by_(design)' * @param bSource true if processing a source link, false if a target link * @param fullyQualifiedStageName the fully qualifiedName of the stage itself * @param stageNameSuffix the stage name for which to create the LineageMappings */ - LineageMappingMapping(DataStageJob job, List<Classificationenabledgroup> fields, String relationshipProperty, boolean bSource, String fullyQualifiedStageName, String stageNameSuffix) { + LineageMappingMapping(DataStageJob job, List<Classificationenabledgroup> fields, boolean bSource, String fullyQualifiedStageName, String stageNameSuffix) { super(job.getIgcRestClient()); Set<LineageMapping> lineageMappingsSet = new HashSet<>(); String userId = job.getJobObject().getModifiedBy(); // For each field in the data store... for (Classificationenabledgroup fieldObj : fields) { String field1QN = getFullyQualifiedName(fieldObj); - ItemList<InformationAsset> relatedStageCols = (ItemList<InformationAsset>) igcRestClient.getPropertyByName(fieldObj, relationshipProperty); + ItemList<InformationAsset> relatedStageCols; + if (bSource) { + relatedStageCols = fieldObj.getReadByDesign(); + } else { + relatedStageCols = fieldObj.getWrittenByDesign(); + } relatedStageCols.getAllPages(igcRestClient); // For each object that reads / writes to that field... for (InformationAsset stageColRef : relatedStageCols.getItems()) { - DsStageColumn stageColFull = job.getStageColumnByRid(stageColRef.getId()); + StageColumn stageColFull = job.getStageColumnByRid(stageColRef.getId()); if (stageColFull != null) { String field2QN = getFullyQualifiedName(stageColFull); if (bSource) { diff --git a/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/PortAliasMapping.java b/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/PortAliasMapping.java index a5a27428..9714b543 100644 --- a/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/PortAliasMapping.java +++ b/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/PortAliasMapping.java @@ -9,8 +9,6 @@ import org.odpi.egeria.connectors.ibm.igc.clientlibrary.model.base.Stage; import org.odpi.egeria.connectors.ibm.igc.clientlibrary.model.common.ItemList; import org.odpi.openmetadata.accessservices.dataengine.model.PortAlias; import org.odpi.openmetadata.accessservices.dataengine.model.PortType; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.List; @@ -20,8 +18,6 @@ import java.util.List; */ class PortAliasMapping extends BaseMapping { - private static final Logger log = LoggerFactory.getLogger(PortAliasMapping.class); - private List<PortAlias> portAliases; private PortAliasMapping(IGCRestClient igcRestClient) { @@ -34,30 +30,17 @@ class PortAliasMapping extends BaseMapping { * * @param job the job for which to create PortAliases * @param stages the stages from which to create PortAliases - * @param relationshipProperty the relationship property on each stage from which to draw PortAlias details + * @param portType the type of port to map (input or output) */ - PortAliasMapping(DataStageJob job, List<Stage> stages, String relationshipProperty) { + PortAliasMapping(DataStageJob job, List<Stage> stages, PortType portType) { this(job.getIgcRestClient()); for (Stage stage : stages) { - ItemList<InformationAsset> relations = (ItemList<InformationAsset>) igcRestClient.getPropertyByName(stage, relationshipProperty); - relations.getAllPages(igcRestClient); - for (InformationAsset relation : relations.getItems()) { - String fullyQualifiedStoreName = job.getQualifiedNameFromStoreRid(relation.getId()); - String fullyQualifiedStageName = getFullyQualifiedName(stage); - PortAlias portAlias = new PortAlias(); - portAlias.setQualifiedName(fullyQualifiedStageName); - portAlias.setDisplayName(stage.getName()); - if (relationshipProperty.startsWith("reads")) { - portAlias.setPortType(PortType.INPUT_PORT); - } else if (relationshipProperty.startsWith("writes")) { - portAlias.setPortType(PortType.OUTPUT_PORT); - } else { - log.warn("Unknown port type: {}", relationshipProperty); - } - portAlias.setDelegatesTo(fullyQualifiedStoreName + fullyQualifiedStageName); - portAliases.add(portAlias); + if (portType.equals(PortType.INPUT_PORT)) { + addInputPortAliases(job, stage); + } else if (portType.equals(PortType.OUTPUT_PORT)) { + addOutputPortAliases(job, stage); } } @@ -70,4 +53,26 @@ class PortAliasMapping extends BaseMapping { */ List<PortAlias> getPortAliases() { return portAliases; } + private void addInputPortAliases(DataStageJob job, Stage stage) { + addPortAliases(job, stage, stage.getReadsFromDesign(), PortType.INPUT_PORT); + } + + private void addOutputPortAliases(DataStageJob job, Stage stage) { + addPortAliases(job, stage, stage.getWritesToDesign(), PortType.OUTPUT_PORT); + } + + private void addPortAliases(DataStageJob job, Stage stage, ItemList<InformationAsset> relations, PortType portType) { + relations.getAllPages(igcRestClient); + for (InformationAsset relation : relations.getItems()) { + String fullyQualifiedStoreName = job.getQualifiedNameFromStoreRid(relation.getId()); + String fullyQualifiedStageName = getFullyQualifiedName(stage); + PortAlias portAlias = new PortAlias(); + portAlias.setQualifiedName(fullyQualifiedStageName); + portAlias.setDisplayName(stage.getName()); + portAlias.setPortType(portType); + portAlias.setDelegatesTo(fullyQualifiedStoreName + fullyQualifiedStageName); + portAliases.add(portAlias); + } + } + } diff --git a/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/ProcessMapping.java b/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/ProcessMapping.java index de2812d1..1ee83b8a 100644 --- a/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/ProcessMapping.java +++ b/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/ProcessMapping.java @@ -37,8 +37,8 @@ public class ProcessMapping extends BaseMapping { Dsjob jobObj = job.getJobObject(); process = getSkeletonProcess(jobObj); if (process != null) { - PortAliasMapping inputAliasMapping = new PortAliasMapping(job, job.getInputStages(), "reads_from_(design)"); - PortAliasMapping outputAliasMapping = new PortAliasMapping(job, job.getOutputStages(), "writes_to_(design)"); + PortAliasMapping inputAliasMapping = new PortAliasMapping(job, job.getInputStages(), PortType.INPUT_PORT); + PortAliasMapping outputAliasMapping = new PortAliasMapping(job, job.getOutputStages(), PortType.OUTPUT_PORT); process.getProcess().setPortAliases(Stream.concat(inputAliasMapping.getPortAliases().stream(), outputAliasMapping.getPortAliases().stream()).collect(Collectors.toList())); Set<LineageMapping> lineageMappings = new HashSet<>(); for (Link link : job.getAllLinks()) { @@ -108,9 +108,9 @@ public class ProcessMapping extends BaseMapping { Set<PortImplementation> portImplementations = new HashSet<>(); Set<LineageMapping> lineageMappings = new HashSet<>(); addImplementationDetails(job, stage, stage.getInputLinks(), PortType.INPUT_PORT, portImplementations, lineageMappings); - addDataStoreDetails(job, stage, stage.getReadsFromDesign(), "read_by_(design)", PortType.INPUT_PORT, portImplementations, lineageMappings); + addDataStoreDetails(job, stage, stage.getReadsFromDesign(), PortType.INPUT_PORT, portImplementations, lineageMappings); addImplementationDetails(job, stage, stage.getOutputLinks(), PortType.OUTPUT_PORT, portImplementations, lineageMappings); - addDataStoreDetails(job, stage, stage.getWritesToDesign(), "written_by_(design)", PortType.OUTPUT_PORT, portImplementations, lineageMappings); + addDataStoreDetails(job, stage, stage.getWritesToDesign(), PortType.OUTPUT_PORT, portImplementations, lineageMappings); process.getProcess().setPortImplementations(new ArrayList<>(portImplementations)); process.getProcess().setLineageMappings(new ArrayList<>(lineageMappings)); } @@ -139,6 +139,9 @@ public class ProcessMapping extends BaseMapping { process.setDescription(getDescription(igcObj)); process.setOwner(igcObj.getCreatedBy()); String modifiedBy = igcObj.getModifiedBy(); + // TODO: this sets the userId for DE OMAS REST invocations to the 'modifiedBy' IIS user string (full user's + // name, including spaces). Do we need to instead translate this to a principal_id, or even a non-IIS user + // entirely? deProcess = new DataEngineProcess(process, modifiedBy); } return deProcess; @@ -179,7 +182,6 @@ public class ProcessMapping extends BaseMapping { * @param job the job within which the stage exists * @param stage the stage for which to add implementation details * @param stores the stores for which to create the implementation details - * @param dataStoreProperty the property of the stage for which to create the data store-relevant details * @param portType the type of port * @param portImplementations the list of PortImplementations to append to with implementation details * @param lineageMappings the list of LineageMappings to append to with implementation details @@ -187,7 +189,6 @@ public class ProcessMapping extends BaseMapping { private void addDataStoreDetails(DataStageJob job, Stage stage, ItemList<InformationAsset> stores, - String dataStoreProperty, PortType portType, Set<PortImplementation> portImplementations, Set<LineageMapping> lineageMappings) { @@ -199,7 +200,7 @@ public class ProcessMapping extends BaseMapping { List<Classificationenabledgroup> fieldsForStore = job.getFieldsForStore(storeRef.getId()); PortImplementationMapping portImplementationMapping = new PortImplementationMapping(job, stage, portType, fieldsForStore, fullyQualifiedStageName); portImplementations.add(portImplementationMapping.getPortImplementation()); - LineageMappingMapping lineageMappingMapping = new LineageMappingMapping(job, fieldsForStore, dataStoreProperty, portType == PortType.INPUT_PORT, fullyQualifiedStageName, stageNameSuffix); + LineageMappingMapping lineageMappingMapping = new LineageMappingMapping(job, fieldsForStore, portType == PortType.INPUT_PORT, fullyQualifiedStageName, stageNameSuffix); lineageMappings.addAll(lineageMappingMapping.getLineageMappings().getLineageMappings()); } } diff --git a/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/model/DataStageJob.java b/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/model/DataStageJob.java index a5598949..fe251f22 100644 --- a/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/model/DataStageJob.java +++ b/datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/model/DataStageJob.java @@ -29,7 +29,7 @@ public class DataStageJob { private JobType type; private Map<String, Stage> stageMap; private Map<String, Link> linkMap; - private Map<String, DsStageColumn> columnMap; + private Map<String, StageColumn> columnMap; private Map<String, Classificationenabledgroup> fieldMap; private Map<String, List<Classificationenabledgroup>> storeToFieldsMap; private Map<String, Identity> storeToIdentityMap; @@ -180,12 +180,12 @@ public class DataStageJob { } /** - * Retrieve the complete 'ds_stage_column' object based on its RID. + * Retrieve the complete 'stage_column' object based on its RID. * - * @param rid the RID of the ds_stage_column object - * @return DsStageColumn + * @param rid the RID of the stage_column object + * @return StageColumn */ - public DsStageColumn getStageColumnByRid(String rid) { + public StageColumn getStageColumnByRid(String rid) { if (log.isDebugEnabled()) { log.debug("Looking up cached stage column: {}", rid); } return columnMap.getOrDefault(rid, null); } @@ -249,14 +249,37 @@ public class DataStageJob { private void getStageColumnDetailsForLinks() { String jobRid = job.getId(); if (log.isDebugEnabled()) { log.debug("Retrieving stage column details for job: {}", jobRid); } - IGCSearch igcSearch = new IGCSearch("ds_stage_column"); + ItemList<StageColumn> stageCols = getStageColumnDetailsForLinks("stage_column", jobRid); + if (stageCols == null) { + if (log.isInfoEnabled()) { log.info("Unable to identify stage columns for job by 'stage_column', reverting to 'ds_stage_column'."); } + stageCols = getStageColumnDetailsForLinks("ds_stage_column", jobRid); + } + if (stageCols != null) { + buildMap(columnMap, stageCols); + } else { + log.error("Unable to identify any stage columns for job: {}", jobRid); + } + } + + /** + * Retrieve the details of stage columns within this particular DataStage job using the type provided: some IGC + * versions need to retrieve 'stage_column' and others must retrieve 'ds_stage_column'. + * + * @param usingType the type by which to search for the stage columns + * @param jobRid the RID of the job + */ + private ItemList<StageColumn> getStageColumnDetailsForLinks(String usingType, String jobRid) { + IGCSearch igcSearch = new IGCSearch(usingType); igcSearch.addProperties(DataStageConstants.getStageColumnSearchProperties()); IGCSearchCondition condition = new IGCSearchCondition("link.job_or_container", "=", jobRid); IGCSearchConditionSet conditionSet = new IGCSearchConditionSet(condition); igcSearch.addConditions(conditionSet); - ItemList<DsStageColumn> stageCols = igcRestClient.search(igcSearch); - stageCols.getAllPages(igcRestClient); - buildMap(columnMap, stageCols); + ItemList<StageColumn> stageCols = igcRestClient.search(igcSearch); + if (stageCols.getPaging().getNumTotal() > 0) { + stageCols.getAllPages(igcRestClient); + return stageCols; + } + return null; } /** diff --git a/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/IGCRestConstants.java b/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/IGCRestConstants.java index 0d0f7601..f63547a5 100644 --- a/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/IGCRestConstants.java +++ b/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/IGCRestConstants.java @@ -156,6 +156,7 @@ public class IGCRestConstants { list.add("group"); list.add("data_rule_definition"); list.add("data_rule_set_definition"); + list.add("stage_column"); return list; } @@ -187,7 +188,8 @@ public class IGCRestConstants { map.put("stored_procedure", "datagroup"); map.put("design_stored_procedure", "datagroup"); map.put("datagroup", "information_asset"); - map.put("ds_stage_column", "data_item"); + map.put("stage_column", "data_item"); + map.put("ds_stage_column", "stage_column"); map.put("parameter", "data_item"); map.put("routine_argument", "data_item"); map.put("stage_type_detail", "data_item"); diff --git a/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/model/base/DataItem.java b/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/model/base/DataItem.java index 5c344e47..56a4a158 100644 --- a/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/model/base/DataItem.java +++ b/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/model/base/DataItem.java @@ -13,8 +13,6 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ import com.fasterxml.jackson.annotation.JsonProperty; import org.odpi.egeria.connectors.ibm.igc.clientlibrary.model.common.ItemList; -import java.util.List; - /** * POJO for the {@code data_item} asset type in IGC, displayed as '{@literal Data Item}' in the IGC UI. * <br><br> @@ -27,9 +25,9 @@ import java.util.List; @JsonSubTypes({ @JsonSubTypes.Type(value = DataField.class, name = "data_field"), @JsonSubTypes.Type(value = DataItemDefinition.class, name = "data_item_definition"), - @JsonSubTypes.Type(value = DsStageColumn.class, name = "ds_stage_column"), @JsonSubTypes.Type(value = Parameter.class, name = "parameter"), @JsonSubTypes.Type(value = RoutineArgument.class, name = "routine_argument"), + @JsonSubTypes.Type(value = StageColumn.class, name = "stage_column"), @JsonSubTypes.Type(value = StageTypeDetail.class, name = "stage_type_detail"), @JsonSubTypes.Type(value = TransformArgument.class, name = "transform_argument"), }) @@ -108,7 +106,7 @@ public class DataItem extends InformationAsset { protected String itemKind; @JsonProperty("length") - protected List<Number> length; + protected Number length; @JsonProperty("level") protected Number level; @@ -361,17 +359,17 @@ public class DataItem extends InformationAsset { /** * Retrieve the {@code length} property (displayed as '{@literal Maximum Length}') of the object. - * @return {@code List<Number>} + * @return {@code Number} */ @JsonProperty("length") - public List<Number> getLength() { return this.length; } + public Number getLength() { return this.length; } /** * Set the {@code length} property (displayed as {@code Maximum Length}) of the object. * @param length the value to set */ @JsonProperty("length") - public void setLength(List<Number> length) { this.length = length; } + public void setLength(Number length) { this.length = length; } /** * Retrieve the {@code level} property (displayed as '{@literal Level Number}') of the object. diff --git a/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/model/base/DsStageColumn.java b/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/model/base/DsStageColumn.java index 3597e4ad..6c0af35d 100644 --- a/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/model/base/DsStageColumn.java +++ b/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/model/base/DsStageColumn.java @@ -9,9 +9,6 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonTypeName; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import com.fasterxml.jackson.annotation.JsonProperty; -import org.odpi.egeria.connectors.ibm.igc.clientlibrary.model.common.ItemList; -import java.util.List; /** * POJO for the {@code ds_stage_column} asset type in IGC, displayed as '{@literal Stage Column}' in the IGC UI. @@ -25,295 +22,6 @@ import java.util.List; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeName("ds_stage_column") -public class DsStageColumn extends DataItem { - - @JsonProperty("constraints") - protected ItemList<JobConstraint> constraints; - - @JsonProperty("expression") - protected List<String> expression; - - @JsonProperty("impacted_by") - protected ItemList<InformationAsset> impactedBy; - - @JsonProperty("impacts_on") - protected ItemList<InformationAsset> impactsOn; - - @JsonProperty("in_collections") - protected ItemList<Collection> inCollections; - - @JsonProperty("key") - protected Boolean key; - - @JsonProperty("link") - protected Link link; - - @JsonProperty("next_stage_columns") - protected ItemList<DataItem> nextStageColumns; - - @JsonProperty("previous_stage_columns") - protected ItemList<DataItem> previousStageColumns; - - @JsonProperty("reads_from_(design)") - protected ItemList<InformationAsset> readsFromDesign; - - @JsonProperty("reads_from_(operational)") - protected ItemList<InformationAsset> readsFromOperational; - - @JsonProperty("reads_from_(static)") - protected ItemList<InformationAsset> readsFromStatic; - - @JsonProperty("reads_from_(user_defined)") - protected ItemList<InformationAsset> readsFromUserDefined; - - @JsonProperty("writes_to_(design)") - protected ItemList<InformationAsset> writesToDesign; - - @JsonProperty("writes_to_(operational)") - protected ItemList<InformationAsset> writesToOperational; - - @JsonProperty("writes_to_(static)") - protected ItemList<InformationAsset> writesToStatic; - - @JsonProperty("writes_to_(user_defined)") - protected ItemList<InformationAsset> writesToUserDefined; - - /** - * Retrieve the {@code constraints} property (displayed as '{@literal Constraints}') of the object. - * @return {@code ItemList<JobConstraint>} - */ - @JsonProperty("constraints") - public ItemList<JobConstraint> getConstraints() { return this.constraints; } - - /** - * Set the {@code constraints} property (displayed as {@code Constraints}) of the object. - * @param constraints the value to set - */ - @JsonProperty("constraints") - public void setConstraints(ItemList<JobConstraint> constraints) { this.constraints = constraints; } - - /** - * Retrieve the {@code expression} property (displayed as '{@literal Expression}') of the object. - * @return {@code List<String>} - */ - @JsonProperty("expression") - public List<String> getExpression() { return this.expression; } - - /** - * Set the {@code expression} property (displayed as {@code Expression}) of the object. - * @param expression the value to set - */ - @JsonProperty("expression") - public void setExpression(List<String> expression) { this.expression = expression; } - - /** - * Retrieve the {@code impacted_by} property (displayed as '{@literal Impacted by}') of the object. - * @return {@code ItemList<InformationAsset>} - */ - @JsonProperty("impacted_by") - public ItemList<InformationAsset> getImpactedBy() { return this.impactedBy; } - - /** - * Set the {@code impacted_by} property (displayed as {@code Impacted by}) of the object. - * @param impactedBy the value to set - */ - @JsonProperty("impacted_by") - public void setImpactedBy(ItemList<InformationAsset> impactedBy) { this.impactedBy = impactedBy; } - - /** - * Retrieve the {@code impacts_on} property (displayed as '{@literal Impacts on}') of the object. - * @return {@code ItemList<InformationAsset>} - */ - @JsonProperty("impacts_on") - public ItemList<InformationAsset> getImpactsOn() { return this.impactsOn; } - - /** - * Set the {@code impacts_on} property (displayed as {@code Impacts on}) of the object. - * @param impactsOn the value to set - */ - @JsonProperty("impacts_on") - public void setImpactsOn(ItemList<InformationAsset> impactsOn) { this.impactsOn = impactsOn; } - - /** - * Retrieve the {@code in_collections} property (displayed as '{@literal In Collections}') of the object. - * @return {@code ItemList<Collection>} - */ - @JsonProperty("in_collections") - public ItemList<Collection> getInCollections() { return this.inCollections; } - - /** - * Set the {@code in_collections} property (displayed as {@code In Collections}) of the object. - * @param inCollections the value to set - */ - @JsonProperty("in_collections") - public void setInCollections(ItemList<Collection> inCollections) { this.inCollections = inCollections; } - - /** - * Retrieve the {@code key} property (displayed as '{@literal Key}') of the object. - * @return {@code Boolean} - */ - @JsonProperty("key") - public Boolean getKey() { return this.key; } - - /** - * Set the {@code key} property (displayed as {@code Key}) of the object. - * @param key the value to set - */ - @JsonProperty("key") - public void setKey(Boolean key) { this.key = key; } - - /** - * Retrieve the {@code link} property (displayed as '{@literal Link}') of the object. - * @return {@code Link} - */ - @JsonProperty("link") - public Link getLink() { return this.link; } - - /** - * Set the {@code link} property (displayed as {@code Link}) of the object. - * @param link the value to set - */ - @JsonProperty("link") - public void setLink(Link link) { this.link = link; } - - /** - * Retrieve the {@code next_stage_columns} property (displayed as '{@literal Next Stage Columns or Variables}') of the object. - * @return {@code ItemList<DataItem>} - */ - @JsonProperty("next_stage_columns") - public ItemList<DataItem> getNextStageColumns() { return this.nextStageColumns; } - - /** - * Set the {@code next_stage_columns} property (displayed as {@code Next Stage Columns or Variables}) of the object. - * @param nextStageColumns the value to set - */ - @JsonProperty("next_stage_columns") - public void setNextStageColumns(ItemList<DataItem> nextStageColumns) { this.nextStageColumns = nextStageColumns; } - - /** - * Retrieve the {@code previous_stage_columns} property (displayed as '{@literal Previous Stage Columns or Variables}') of the object. - * @return {@code ItemList<DataItem>} - */ - @JsonProperty("previous_stage_columns") - public ItemList<DataItem> getPreviousStageColumns() { return this.previousStageColumns; } - - /** - * Set the {@code previous_stage_columns} property (displayed as {@code Previous Stage Columns or Variables}) of the object. - * @param previousStageColumns the value to set - */ - @JsonProperty("previous_stage_columns") - public void setPreviousStageColumns(ItemList<DataItem> previousStageColumns) { this.previousStageColumns = previousStageColumns; } - - /** - * Retrieve the {@code reads_from_(design)} property (displayed as '{@literal Reads from (Design)}') of the object. - * @return {@code ItemList<InformationAsset>} - */ - @JsonProperty("reads_from_(design)") - public ItemList<InformationAsset> getReadsFromDesign() { return this.readsFromDesign; } - - /** - * Set the {@code reads_from_(design)} property (displayed as {@code Reads from (Design)}) of the object. - * @param readsFromDesign the value to set - */ - @JsonProperty("reads_from_(design)") - public void setReadsFromDesign(ItemList<InformationAsset> readsFromDesign) { this.readsFromDesign = readsFromDesign; } - - /** - * Retrieve the {@code reads_from_(operational)} property (displayed as '{@literal Reads from (Operational)}') of the object. - * @return {@code ItemList<InformationAsset>} - */ - @JsonProperty("reads_from_(operational)") - public ItemList<InformationAsset> getReadsFromOperational() { return this.readsFromOperational; } - - /** - * Set the {@code reads_from_(operational)} property (displayed as {@code Reads from (Operational)}) of the object. - * @param readsFromOperational the value to set - */ - @JsonProperty("reads_from_(operational)") - public void setReadsFromOperational(ItemList<InformationAsset> readsFromOperational) { this.readsFromOperational = readsFromOperational; } - - /** - * Retrieve the {@code reads_from_(static)} property (displayed as '{@literal Reads from (Static)}') of the object. - * @return {@code ItemList<InformationAsset>} - */ - @JsonProperty("reads_from_(static)") - public ItemList<InformationAsset> getReadsFromStatic() { return this.readsFromStatic; } - - /** - * Set the {@code reads_from_(static)} property (displayed as {@code Reads from (Static)}) of the object. - * @param readsFromStatic the value to set - */ - @JsonProperty("reads_from_(static)") - public void setReadsFromStatic(ItemList<InformationAsset> readsFromStatic) { this.readsFromStatic = readsFromStatic; } - - /** - * Retrieve the {@code reads_from_(user_defined)} property (displayed as '{@literal Reads from (User-Defined)}') of the object. - * @return {@code ItemList<InformationAsset>} - */ - @JsonProperty("reads_from_(user_defined)") - public ItemList<InformationAsset> getReadsFromUserDefined() { return this.readsFromUserDefined; } - - /** - * Set the {@code reads_from_(user_defined)} property (displayed as {@code Reads from (User-Defined)}) of the object. - * @param readsFromUserDefined the value to set - */ - @JsonProperty("reads_from_(user_defined)") - public void setReadsFromUserDefined(ItemList<InformationAsset> readsFromUserDefined) { this.readsFromUserDefined = readsFromUserDefined; } - - /** - * Retrieve the {@code writes_to_(design)} property (displayed as '{@literal Writes to (Design)}') of the object. - * @return {@code ItemList<InformationAsset>} - */ - @JsonProperty("writes_to_(design)") - public ItemList<InformationAsset> getWritesToDesign() { return this.writesToDesign; } - - /** - * Set the {@code writes_to_(design)} property (displayed as {@code Writes to (Design)}) of the object. - * @param writesToDesign the value to set - */ - @JsonProperty("writes_to_(design)") - public void setWritesToDesign(ItemList<InformationAsset> writesToDesign) { this.writesToDesign = writesToDesign; } - - /** - * Retrieve the {@code writes_to_(operational)} property (displayed as '{@literal Writes to (Operational)}') of the object. - * @return {@code ItemList<InformationAsset>} - */ - @JsonProperty("writes_to_(operational)") - public ItemList<InformationAsset> getWritesToOperational() { return this.writesToOperational; } - - /** - * Set the {@code writes_to_(operational)} property (displayed as {@code Writes to (Operational)}) of the object. - * @param writesToOperational the value to set - */ - @JsonProperty("writes_to_(operational)") - public void setWritesToOperational(ItemList<InformationAsset> writesToOperational) { this.writesToOperational = writesToOperational; } - - /** - * Retrieve the {@code writes_to_(static)} property (displayed as '{@literal Writes to (Static)}') of the object. - * @return {@code ItemList<InformationAsset>} - */ - @JsonProperty("writes_to_(static)") - public ItemList<InformationAsset> getWritesToStatic() { return this.writesToStatic; } - - /** - * Set the {@code writes_to_(static)} property (displayed as {@code Writes to (Static)}) of the object. - * @param writesToStatic the value to set - */ - @JsonProperty("writes_to_(static)") - public void setWritesToStatic(ItemList<InformationAsset> writesToStatic) { this.writesToStatic = writesToStatic; } - - /** - * Retrieve the {@code writes_to_(user_defined)} property (displayed as '{@literal Writes to (User-Defined)}') of the object. - * @return {@code ItemList<InformationAsset>} - */ - @JsonProperty("writes_to_(user_defined)") - public ItemList<InformationAsset> getWritesToUserDefined() { return this.writesToUserDefined; } - - /** - * Set the {@code writes_to_(user_defined)} property (displayed as {@code Writes to (User-Defined)}) of the object. - * @param writesToUserDefined the value to set - */ - @JsonProperty("writes_to_(user_defined)") - public void setWritesToUserDefined(ItemList<InformationAsset> writesToUserDefined) { this.writesToUserDefined = writesToUserDefined; } +public class DsStageColumn extends StageColumn { } diff --git a/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/model/base/InformationAsset.java b/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/model/base/InformationAsset.java index da5407f7..dfb1cc26 100644 --- a/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/model/base/InformationAsset.java +++ b/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/model/base/InformationAsset.java @@ -116,7 +116,6 @@ import org.odpi.egeria.connectors.ibm.igc.clientlibrary.model.common.ItemList; @JsonSubTypes.Type(value = Routine.class, name = "routine"), @JsonSubTypes.Type(value = SharedContainer.class, name = "shared_container"), @JsonSubTypes.Type(value = Stage.class, name = "stage"), - @JsonSubTypes.Type(value = StageColumn.class, name = "stage_column"), @JsonSubTypes.Type(value = StageType.class, name = "stage_type"), @JsonSubTypes.Type(value = StageVariable.class, name = "stage_variable"), @JsonSubTypes.Type(value = StandardizationRuleSet.class, name = "standardization_rule_set"), diff --git a/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/model/base/StageColumn.java b/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/model/base/StageColumn.java index 52eb2a45..fa09118a 100644 --- a/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/model/base/StageColumn.java +++ b/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/model/base/StageColumn.java @@ -4,6 +4,7 @@ package org.odpi.egeria.connectors.ibm.igc.clientlibrary.model.base; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -22,13 +23,13 @@ import java.util.List; */ @JsonTypeInfo(use=JsonTypeInfo.Id.NAME, include=JsonTypeInfo.As.EXISTING_PROPERTY, property="_type", visible=true, defaultImpl=StageColumn.class) @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonSubTypes({ + @JsonSubTypes.Type(value = DsStageColumn.class, name = "ds_stage_column"), +}) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) @JsonTypeName("stage_column") -public class StageColumn extends InformationAsset { - - @JsonProperty("allows_null_values") - protected Boolean allowsNullValues; +public class StageColumn extends DataItem { @JsonProperty("constraints") protected ItemList<JobConstraint> constraints; @@ -48,53 +49,12 @@ public class StageColumn extends InformationAsset { @JsonProperty("key") protected Boolean key; - @JsonProperty("length") - protected Number length; - @JsonProperty("link") protected Link link; - @JsonProperty("minimum_length") - protected Number minimumLength; - - @JsonProperty("native_id") - protected String nativeId; - @JsonProperty("next_stage_columns") protected ItemList<DataItem> nextStageColumns; - /** - * Valid values are: - * <ul> - * <li>CHAR (displayed in the UI as 'CHAR')</li> - * <li>VARCHAR (displayed in the UI as 'VARCHAR')</li> - * <li>LONGVARCHAR (displayed in the UI as 'LONGVARCHAR')</li> - * <li>WCHAR (displayed in the UI as 'WCHAR')</li> - * <li>WVARCHAR (displayed in the UI as 'WVARCHAR')</li> - * <li>WLONGVARCHAR (displayed in the UI as 'WLONGVARCHAR')</li> - * <li>DECIMAL (displayed in the UI as 'DECIMAL')</li> - * <li>NUMERIC (displayed in the UI as 'NUMERIC')</li> - * <li>SMALLINT (displayed in the UI as 'SMALLINT')</li> - * <li>INTEGER (displayed in the UI as 'INTEGER')</li> - * <li>REAL (displayed in the UI as 'REAL')</li> - * <li>FLOAT (displayed in the UI as 'FLOAT')</li> - * <li>DOUBLE (displayed in the UI as 'DOUBLE')</li> - * <li>BIT (displayed in the UI as 'BIT')</li> - * <li>TINYINT (displayed in the UI as 'TINYINT')</li> - * <li>BIGINT (displayed in the UI as 'BIGINT')</li> - * <li>BINARY (displayed in the UI as 'BINARY')</li> - * <li>VARBINARY (displayed in the UI as 'VARBINARY')</li> - * <li>LONGVARBINARY (displayed in the UI as 'LONGVARBINARY')</li> - * <li>DATE (displayed in the UI as 'DATE')</li> - * <li>TIME (displayed in the UI as 'TIME')</li> - * <li>TIMESTAMP (displayed in the UI as 'TIMESTAMP')</li> - * <li>GUID (displayed in the UI as 'GUID')</li> - * <li>UNKNOWN (displayed in the UI as 'UNKNOWN')</li> - * </ul> - */ - @JsonProperty("odbc_type") - protected String odbcType; - @JsonProperty("previous_stage_columns") protected ItemList<DataItem> previousStageColumns; @@ -122,20 +82,6 @@ public class StageColumn extends InformationAsset { @JsonProperty("writes_to_(user_defined)") protected ItemList<InformationAsset> writesToUserDefined; - /** - * Retrieve the {@code allows_null_values} property (displayed as '{@literal Allow Null Values}') of the object. - * @return {@code Boolean} - */ - @JsonProperty("allows_null_values") - public Boolean getAllowsNullValues() { return this.allowsNullValues; } - - /** - * Set the {@code allows_null_values} property (displayed as {@code Allow Null Values}) of the object. - * @param allowsNullValues the value to set - */ - @JsonProperty("allows_null_values") - public void setAllowsNullValues(Boolean allowsNullValues) { this.allowsNullValues = allowsNullValues; } - /** * Retrieve the {@code constraints} property (displayed as '{@literal Constraints}') of the object. * @return {@code ItemList<JobConstraint>} @@ -220,20 +166,6 @@ public class StageColumn extends InformationAsset { @JsonProperty("key") public void setKey(Boolean key) { this.key = key; } - /** - * Retrieve the {@code length} property (displayed as '{@literal Length}') of the object. - * @return {@code Number} - */ - @JsonProperty("length") - public Number getLength() { return this.length; } - - /** - * Set the {@code length} property (displayed as {@code Length}) of the object. - * @param length the value to set - */ - @JsonProperty("length") - public void setLength(Number length) { this.length = length; } - /** * Retrieve the {@code link} property (displayed as '{@literal Link}') of the object. * @return {@code Link} @@ -248,34 +180,6 @@ public class StageColumn extends InformationAsset { @JsonProperty("link") public void setLink(Link link) { this.link = link; } - /** - * Retrieve the {@code minimum_length} property (displayed as '{@literal Minimum Length}') of the object. - * @return {@code Number} - */ - @JsonProperty("minimum_length") - public Number getMinimumLength() { return this.minimumLength; } - - /** - * Set the {@code minimum_length} property (displayed as {@code Minimum Length}) of the object. - * @param minimumLength the value to set - */ - @JsonProperty("minimum_length") - public void setMinimumLength(Number minimumLength) { this.minimumLength = minimumLength; } - - /** - * Retrieve the {@code native_id} property (displayed as '{@literal Native ID}') of the object. - * @return {@code String} - */ - @JsonProperty("native_id") - public String getNativeId() { return this.nativeId; } - - /** - * Set the {@code native_id} property (displayed as {@code Native ID}) of the object. - * @param nativeId the value to set - */ - @JsonProperty("native_id") - public void setNativeId(String nativeId) { this.nativeId = nativeId; } - /** * Retrieve the {@code next_stage_columns} property (displayed as '{@literal Next Stage Columns}') of the object. * @return {@code ItemList<DataItem>} @@ -290,20 +194,6 @@ public class StageColumn extends InformationAsset { @JsonProperty("next_stage_columns") public void setNextStageColumns(ItemList<DataItem> nextStageColumns) { this.nextStageColumns = nextStageColumns; } - /** - * Retrieve the {@code odbc_type} property (displayed as '{@literal SQL Type}') of the object. - * @return {@code String} - */ - @JsonProperty("odbc_type") - public String getOdbcType() { return this.odbcType; } - - /** - * Set the {@code odbc_type} property (displayed as {@code SQL Type}) of the object. - * @param odbcType the value to set - */ - @JsonProperty("odbc_type") - public void setOdbcType(String odbcType) { this.odbcType = odbcType; } - /** * Retrieve the {@code previous_stage_columns} property (displayed as '{@literal Previous Stage Columns}') of the object. * @return {@code ItemList<DataItem>}
['datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/AttributeMapping.java', 'igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/model/base/DsStageColumn.java', 'igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/IGCRestConstants.java', 'igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/model/base/InformationAsset.java', 'igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/model/base/StageColumn.java', 'datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/LineageMappingMapping.java', 'datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/model/DataStageJob.java', 'igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/model/base/DataItem.java', 'datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/PortAliasMapping.java', 'datastage-adapter/src/main/java/org/odpi/egeria/connectors/ibm/datastage/dataengineconnector/mapping/ProcessMapping.java']
{'.java': 10}
10
10
0
0
10
4,555,632
970,098
107,246
701
27,278
6,222
561
10
653
93
146
12
0
0
1970-01-01T00:26:16
24
Java
{'Java': 5061945, 'HTML': 20066, 'Shell': 2202, 'Mustache': 1022, 'CSS': 422}
Apache License 2.0
3,807
odpi/egeria-connector-ibm-information-server/373/372
odpi
egeria-connector-ibm-information-server
https://github.com/odpi/egeria-connector-ibm-information-server/issues/372
https://github.com/odpi/egeria-connector-ibm-information-server/pull/373
https://github.com/odpi/egeria-connector-ibm-information-server/pull/373
1
fix
Certain RIDs are not properly path-encoded
There are certain RID formats that can exist, which currently are not URL path-encoded and therefore may cause issues with being interpreted by the REST endpoints. Examples: - virtual assets (eg. `extern:fr:7599ac3c8e0d4869b032d151e8ffc86d`) - embedded columns (eg. `deflated:c2e76d84.78bf4d29.66k77fg69.pm57036.72jftc.1a947bnehtr3q8ajjieqj;column_id;-2855024043478117416`)
3cffba3648073d3543393304f0f73d3c28b99314
09dde2b96385816806ac117ebb0e725e37b13330
https://github.com/odpi/egeria-connector-ibm-information-server/compare/3cffba3648073d3543393304f0f73d3c28b99314...09dde2b96385816806ac117ebb0e725e37b13330
diff --git a/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/IGCRestClient.java b/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/IGCRestClient.java index 1b41f81f..799ef8c9 100644 --- a/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/IGCRestClient.java +++ b/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/IGCRestClient.java @@ -3,7 +3,6 @@ package org.odpi.egeria.connectors.ibm.igc.clientlibrary; import java.io.*; -import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.*; import java.util.regex.Matcher; @@ -47,6 +46,7 @@ import org.springframework.web.client.RestClientException; import org.springframework.web.client.RestTemplate; import org.springframework.web.util.UriComponents; import org.springframework.web.util.UriComponentsBuilder; +import org.springframework.web.util.UriUtils; /** * Library of methods to connect to and interact with an IBM Information Governance Catalog environment @@ -672,7 +672,19 @@ public class IGCRestClient { * @return Reference - the IGC object representing the asset */ public Reference getAssetById(String rid) { - return readJSONIntoPOJO(makeRequest(EP_ASSET + "/" + rid, HttpMethod.GET, null,null)); + String url = EP_ASSET + "/" + getEncodedPathVariable(rid); + String response = makeRequest(url, HttpMethod.GET, null, null); + return readJSONIntoPOJO(response); + } + + /** + * Calculate a path-encoded URL for the provided endpoint. + * + * @param pathVariable the value within the path to encode + * @return String - the encoded endpoint + */ + public static String getEncodedPathVariable(String pathVariable) { + return UriUtils.encode(pathVariable, "UTF-8"); } /** @@ -1083,8 +1095,8 @@ public class IGCRestClient { // On v11.5, for virtual assets, the paging URL only has the RID and nothing else -- we must // reconstruct an appropriate paging URL from just this RID and the other parameters received by // the method - requestUrl = EP_ASSET + "/" + sNextURL - + "/" + URLEncoder.encode(propertyName, "UTF-8") + requestUrl = EP_ASSET + "/" + getEncodedPathVariable(sNextURL) + + "/" + getEncodedPathVariable(propertyName) + "?begin=" + (paging.getEndIndex() + 1) + "&pageSize=" + paging.getPageSize(); } else { diff --git a/igc-clientlibrary/src/test/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/ClientTest.java b/igc-clientlibrary/src/test/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/ClientTest.java index ea8caf96..2f16355b 100644 --- a/igc-clientlibrary/src/test/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/ClientTest.java +++ b/igc-clientlibrary/src/test/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/ClientTest.java @@ -17,6 +17,7 @@ import org.odpi.egeria.connectors.ibm.information.server.mocks.MockConstants; import org.odpi.openmetadata.http.HttpHelper; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.FileSystemResource; +import org.springframework.web.util.UriUtils; import org.testng.annotations.*; import java.io.File; @@ -391,6 +392,15 @@ public class ClientTest { } + @Test + public void testRIDEncoding() { + + String rid = "deflated:c2e76d84.78bf4d29.66k77fg69.pm57036.72jftc.1a947bnehtr3q8ajjieqj;column_id;-2855024043478117416"; + String encoded = igcRestClient.getEncodedPathVariable(rid); + assertEquals(encoded, "deflated%3Ac2e76d84.78bf4d29.66k77fg69.pm57036.72jftc.1a947bnehtr3q8ajjieqj%3Bcolumn_id%3B-2855024043478117416"); + + } + @AfterSuite void stopClient() { igcRestClient.disconnect(); diff --git a/test/src/main/java/org/odpi/egeria/connectors/ibm/information/server/mocks/MockConstants.java b/test/src/main/java/org/odpi/egeria/connectors/ibm/information/server/mocks/MockConstants.java index 9ea454f8..70efc5e7 100644 --- a/test/src/main/java/org/odpi/egeria/connectors/ibm/information/server/mocks/MockConstants.java +++ b/test/src/main/java/org/odpi/egeria/connectors/ibm/information/server/mocks/MockConstants.java @@ -38,6 +38,7 @@ public class MockConstants { // RIDs used for specific scenarios to test IGC mappers public static final String VIRTUAL_ASSET_TABLE_RID = "extern:fr:7599ac3c8e0d4869b032d151e8ffc86d"; + public static final String VIRTUAL_ASSET_TABLE_RID_ENCODED = "extern%3Afr%3A7599ac3c8e0d4869b032d151e8ffc86d"; public static final String NOTE_RID = "b1c497ce.1a21c74f.00270nau6.74dr5d1.dg30je.1sa0foiromdmt9c4ga8v2"; public static final String TERM_WITH_NOTES_RID = "6662c0f2.e1b1ec6c.00270n9bc.9a0o5ur.hsbem7.o7tuf0mn7hgv85dv4s707"; public static final String CATEGORY_RID = "6662c0f2.ee6a64fe.o1h6evehs.j0f25pn.ihsrb3.m7984f1jgfencf15nopk0"; diff --git a/test/src/main/java/org/odpi/egeria/connectors/ibm/information/server/mocks/MockServerExpectations.java b/test/src/main/java/org/odpi/egeria/connectors/ibm/information/server/mocks/MockServerExpectations.java index b35bceaa..2fa774bd 100644 --- a/test/src/main/java/org/odpi/egeria/connectors/ibm/information/server/mocks/MockServerExpectations.java +++ b/test/src/main/java/org/odpi/egeria/connectors/ibm/information/server/mocks/MockServerExpectations.java @@ -436,7 +436,7 @@ public class MockServerExpectations implements PluginExpectationInitializer { private void setVirtualAssets(MockServerClient mockServerClient) { String caseName = "VirtualAssets"; - String rid = MockConstants.VIRTUAL_ASSET_TABLE_RID; + String rid = MockConstants.VIRTUAL_ASSET_TABLE_RID_ENCODED; mockServerClient .withSecure(true) .when(assetByRidRequest(rid)) @@ -663,7 +663,7 @@ public class MockServerExpectations implements PluginExpectationInitializer { String rid = getRidFromFilename(filename); mockServerClient .withSecure(true) - .when(assetByRidRequest("extern:fr:" + rid)) + .when(assetByRidRequest("extern%3Afr%3A" + rid)) .respond(withResponse(getResourceFileContents("virtual_by_rid" + File.separator + rid + ".json"))); } }
['test/src/main/java/org/odpi/egeria/connectors/ibm/information/server/mocks/MockConstants.java', 'igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/IGCRestClient.java', 'igc-clientlibrary/src/test/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/ClientTest.java', 'test/src/main/java/org/odpi/egeria/connectors/ibm/information/server/mocks/MockServerExpectations.java']
{'.java': 4}
4
4
0
0
4
4,455,110
935,627
102,987
724
989
202
20
1
380
37
125
6
0
0
1970-01-01T00:26:38
24
Java
{'Java': 5061945, 'HTML': 20066, 'Shell': 2202, 'Mustache': 1022, 'CSS': 422}
Apache License 2.0
579
zeuswpi/hydra-android/481/355
zeuswpi
hydra-android
https://github.com/ZeusWPI/hydra-android/issues/355
https://github.com/ZeusWPI/hydra-android/pull/481
https://github.com/ZeusWPI/hydra-android/pull/481
1
fixes
Bug in time formatting
Some days are just a number instead of a day (e.g. 5 instead of next Wednesday)
94380c00e1b9681561ba210bd65723691540f158
55643c55e1709314f7a152c531da2328967629ab
https://github.com/zeuswpi/hydra-android/compare/94380c00e1b9681561ba210bd65723691540f158...55643c55e1709314f7a152c531da2328967629ab
diff --git a/app/src/main/java/be/ugent/zeus/hydra/common/utils/DateUtils.java b/app/src/main/java/be/ugent/zeus/hydra/common/utils/DateUtils.java index 04848b2e..488891bb 100644 --- a/app/src/main/java/be/ugent/zeus/hydra/common/utils/DateUtils.java +++ b/app/src/main/java/be/ugent/zeus/hydra/common/utils/DateUtils.java @@ -97,7 +97,7 @@ public class DateUtils { } else if (daysBetween == 2 && context.getResources().getBoolean(R.bool.date_supports_overmorrow)) { return context.getString(R.string.date_overmorrow); } else if (0 <= daysBetween && daysBetween < ONE_WEEK_DAYS) { - return date.getDayOfWeek().getDisplayName(TextStyle.FULL_STANDALONE, locale); + return date.getDayOfWeek().getDisplayName(TextStyle.FULL, locale); } else if (0 <= daysBetween && daysBetween < TWO_WEEKS_DAYS) { return context.getString(R.string.date_next_x, date.getDayOfWeek().getDisplayName(TextStyle.FULL, locale)); } else {
['app/src/main/java/be/ugent/zeus/hydra/common/utils/DateUtils.java']
{'.java': 1}
1
1
0
0
1
1,119,601
231,521
30,774
313
170
34
2
1
79
16
21
1
0
0
1970-01-01T00:27:11
20
Java
{'Java': 1925658, 'Groovy': 28345, 'Nix': 2589}
MIT License
8,929
telekom/testerra/234/233
telekom
testerra
https://github.com/telekom/testerra/issues/233
https://github.com/telekom/testerra/pull/234
https://github.com/telekom/testerra/pull/234
1
fixes
UIElement `hasWords` assertion occures `PatternSyntaxException`
**Describe the bug** Given is the Element `<label for="inputMillis"> TimeOut in Millis (0-inf) </label>` **To Reproduce** ````java element.expect().text().hasWords("TimeOut in Millis").is(true); // --> passed element.expect().text().hasWords("TimeOut in Millis (0-inf)").is(true); // -->java.util.regex.PatternSyntaxException: Unclosed group near index xx ```` **Expected behavior** The second assertion should passed, too. **Actual behavior** The method `DefaultStringAssertion.hasWords()` cannot handle special characters like `(`, because there is no escaping. The pattern matcher take the `(` for grouping. **Solution** Escape the characters like `(`, `)`, `[`, `]`, ... **Environment(please complete the following information):** Testerra 2
b134f2a1adf28d2b889ab87fa3224709a5496dcb
572ef7d6f2da0aadbfc95790bea2e690f845c473
https://github.com/telekom/testerra/compare/b134f2a1adf28d2b889ab87fa3224709a5496dcb...572ef7d6f2da0aadbfc95790bea2e690f845c473
diff --git a/driver-ui/src/main/java/eu/tsystems/mms/tic/testframework/internal/asserts/DefaultStringAssertion.java b/driver-ui/src/main/java/eu/tsystems/mms/tic/testframework/internal/asserts/DefaultStringAssertion.java index 5b41bef90..3e9eb7cee 100644 --- a/driver-ui/src/main/java/eu/tsystems/mms/tic/testframework/internal/asserts/DefaultStringAssertion.java +++ b/driver-ui/src/main/java/eu/tsystems/mms/tic/testframework/internal/asserts/DefaultStringAssertion.java @@ -22,17 +22,19 @@ package eu.tsystems.mms.tic.testframework.internal.asserts; import eu.tsystems.mms.tic.testframework.logging.Loggable; + import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; +import java.util.stream.Collectors; /** * Default implementation of {@link StringAssertion} + * * @author Mike Reiche */ public class DefaultStringAssertion<T> extends DefaultQuantityAssertion<T> implements StringAssertion<T>, Loggable { - public DefaultStringAssertion(AbstractPropertyAssertion parentAssertion, AssertionProvider<T> provider) { super(parentAssertion, provider); } @@ -99,8 +101,14 @@ public class DefaultStringAssertion<T> extends DefaultQuantityAssertion<T> imple @Override public BinaryAssertion<Boolean> hasWords(List<String> words) { - final String wordsList = String.join("|", words); - final Pattern wordsPattern = Pattern.compile("\\\\b(" + wordsList + ")\\\\b", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE); + final Pattern nonWordAtBegin = Pattern.compile("^\\\\W"); + final Pattern nonWordAtTheEnd = Pattern.compile("\\\\W$"); + + final String wordsList = words.stream() + .map(word -> (nonWordAtBegin.matcher(word).find() ? "\\\\B" : "\\\\b") + "\\\\Q" + word) // word boundary for begin + .map(word -> word + "\\\\E" + (nonWordAtTheEnd.matcher(word).find() ? "\\\\B" : "\\\\b")) // word boundary for end + .collect(Collectors.joining("|")); + final Pattern wordsPattern = Pattern.compile(wordsList, Pattern.CASE_INSENSITIVE | Pattern.MULTILINE); return propertyAssertionFactory.createWithParent(DefaultBinaryAssertion.class, this, new AssertionProvider<Boolean>() { @Override @@ -108,7 +116,7 @@ public class DefaultStringAssertion<T> extends DefaultQuantityAssertion<T> imple int found = 0; Matcher matcher = wordsPattern.matcher(provider.getActual().toString()); while (matcher.find()) found++; - return found >= words.size(); + return found == words.size(); } @Override @@ -118,7 +126,6 @@ public class DefaultStringAssertion<T> extends DefaultQuantityAssertion<T> imple }); } - @Override public QuantityAssertion<Integer> length() { return propertyAssertionFactory.createWithParent(DefaultQuantityAssertion.class, this, new AssertionProvider<Integer>() { diff --git a/integration-tests/src/test/java/eu/tsystems/mms/tic/testframework/test/guielement/UiElementActionTests.java b/integration-tests/src/test/java/eu/tsystems/mms/tic/testframework/test/guielement/UiElementActionTests.java index 9db4e66d4..75172bc18 100644 --- a/integration-tests/src/test/java/eu/tsystems/mms/tic/testframework/test/guielement/UiElementActionTests.java +++ b/integration-tests/src/test/java/eu/tsystems/mms/tic/testframework/test/guielement/UiElementActionTests.java @@ -24,7 +24,6 @@ import eu.tsystems.mms.tic.testframework.AbstractExclusiveTestSitesTest; import eu.tsystems.mms.tic.testframework.common.Testerra; import eu.tsystems.mms.tic.testframework.core.pageobjects.testdata.WebTestPage; import eu.tsystems.mms.tic.testframework.exceptions.TimeoutException; -import eu.tsystems.mms.tic.testframework.pageobjects.Attribute; import eu.tsystems.mms.tic.testframework.pageobjects.UiElement; import eu.tsystems.mms.tic.testframework.testing.AssertProvider; import eu.tsystems.mms.tic.testframework.testing.TestController; diff --git a/integration-tests/src/test/java/eu/tsystems/mms/tic/testframework/test/guielement/UiElementCommonTests.java b/integration-tests/src/test/java/eu/tsystems/mms/tic/testframework/test/guielement/UiElementCommonTests.java index 4bbfe365a..2b3c717f0 100644 --- a/integration-tests/src/test/java/eu/tsystems/mms/tic/testframework/test/guielement/UiElementCommonTests.java +++ b/integration-tests/src/test/java/eu/tsystems/mms/tic/testframework/test/guielement/UiElementCommonTests.java @@ -27,6 +27,7 @@ import eu.tsystems.mms.tic.testframework.exceptions.ElementNotFoundException; import eu.tsystems.mms.tic.testframework.exceptions.UiElementAssertionError; import eu.tsystems.mms.tic.testframework.internal.asserts.ImageAssertion; import eu.tsystems.mms.tic.testframework.pageobjects.UiElement; +import eu.tsystems.mms.tic.testframework.pageobjects.XPath; import eu.tsystems.mms.tic.testframework.testing.AssertProvider; import org.testng.Assert; import org.testng.annotations.Test; @@ -105,4 +106,20 @@ public class UiElementCommonTests extends AbstractExclusiveTestSitesTest<WebTest Assert.assertEquals(empty.toString(true), "WebTestPage -> EmptyUiElement(SubmitButton)"); } + @Test + public void testT10_UiElement_text_assert() { + WebTestPage page = getPage(); + UiElement element = page.getFinder().find(XPath.from("label").text().hasWords("TimeOut in Millis (0-inf)")); + element.expect().text().hasWords("TimeOut in Millis (0-inf)").is(true); + element.expect().text().hasWords("TimeOut in Millis").is(true); + element.expect().text().hasWords("(0-inf)").is(true); + element.expect().text().hasWords("TimeOut in Millis".split("\\\\s+")).is(true); + element.expect().text().hasWords("TimeOut", "in", "Millis").is(true); + element.expect().text().hasWords("tIMEoUT", "iN", "mILLIS").is(true); + element.expect().text().hasWords("tIMEoUT in mILLIS").is(true); + + element.expect().text().hasWords("Out").is(false); + element.expect().text().hasWords("TimeOut", "in", "foo").is(false); + } + }
['driver-ui/src/main/java/eu/tsystems/mms/tic/testframework/internal/asserts/DefaultStringAssertion.java', 'integration-tests/src/test/java/eu/tsystems/mms/tic/testframework/test/guielement/UiElementActionTests.java', 'integration-tests/src/test/java/eu/tsystems/mms/tic/testframework/test/guielement/UiElementCommonTests.java']
{'.java': 3}
3
3
0
0
3
2,859,496
614,760
83,305
518
928
206
17
1
773
84
183
22
0
1
1970-01-01T00:27:31
18
Java
{'Java': 2244526, 'TypeScript': 249890, 'HTML': 231553, 'JavaScript': 62655, 'SCSS': 26587, 'CSS': 3054, 'Shell': 828, 'EJS': 408}
Apache License 2.0
9,325
grails/gorm-neo4j/56/45
grails
gorm-neo4j
https://github.com/grails/gorm-neo4j/issues/45
https://github.com/grails/gorm-neo4j/pull/56
https://github.com/grails/gorm-neo4j/pull/56
1
fixes
Old relationships are not deleted
Having this classes: ``` class Player { String name Application application static mapping = { dynamicAssociations true } } class Application { String name String appVersion static constraints = { appVersion nullable: true } } ``` I create a player1 with an Application app1. Then in a controller actuib I update the player's application to be app2 but in the database I see both relationships: ``` neo4j-sh (?)$ ls -a 48 :Player *dateCreated =[1492546127413] *lastUpdated =[1492546127413] *name =[player1] *version =[0] (player1,48)-[:club]->(club2,47) (player1,48)-[:APPLICATION]->(app2,45) (player1,48)-[:APPLICATION]->(app1,44) ``` You can reproduce this by downloading the project at https://github.com/mburak/sampleapp, branch 'dup-assoc'. 1 - Start up the app 2 - Access rest controller action club/updatePlayer
efe101b6822d6b316eab160c0d66626bf3977022
07858f0f9888e623076fba4adb81ea4d9174bb92
https://github.com/grails/gorm-neo4j/compare/efe101b6822d6b316eab160c0d66626bf3977022...07858f0f9888e623076fba4adb81ea4d9174bb92
diff --git a/grails-datastore-gorm-neo4j/src/main/groovy/org/grails/datastore/gorm/neo4j/engine/RelationshipPendingInsert.java b/grails-datastore-gorm-neo4j/src/main/groovy/org/grails/datastore/gorm/neo4j/engine/RelationshipPendingInsert.java index 99d0a8ae..0d7be589 100644 --- a/grails-datastore-gorm-neo4j/src/main/groovy/org/grails/datastore/gorm/neo4j/engine/RelationshipPendingInsert.java +++ b/grails-datastore-gorm-neo4j/src/main/groovy/org/grails/datastore/gorm/neo4j/engine/RelationshipPendingInsert.java @@ -148,12 +148,15 @@ public class RelationshipPendingInsert extends PendingInsertAdapter<Object, Seri relMatch = RelationshipUtils.matchForAssociation(association, "r"); } - if(isUpdate && (association instanceof DynamicAssociation || (association.isBidirectional() && (association instanceof OneToMany)) && !RelationshipUtils.useReversedMappingFor(association))) { + if(isUpdate && + (association instanceof DynamicAssociation || + ((association.isBidirectional() && (association instanceof OneToMany)) || (association instanceof OneToOne)) && + !RelationshipUtils.useReversedMappingFor(association))) { // delete any previous StringBuilder cypher = new StringBuilder(CypherBuilder.buildRelationshipMatch(labelsFrom, relMatch, labelsTo)); Map<String, Object> deleteParams; - if(association instanceof DynamicToOneAssociation) { + if(association instanceof DynamicToOneAssociation || association instanceof OneToOne) { cypher.append(graphChild.formatId(FROM)); deleteParams = Collections.<String, Object>singletonMap(CypherBuilder.START, Collections.singletonList(parentId)); }
['grails-datastore-gorm-neo4j/src/main/groovy/org/grails/datastore/gorm/neo4j/engine/RelationshipPendingInsert.java']
{'.java': 1}
1
1
0
0
1
230,653
43,696
5,606
23
645
112
7
1
931
109
234
43
1
2
1970-01-01T00:24:59
17
Groovy
{'Groovy': 429631, 'Java': 236635}
Apache License 2.0
603
tweetwallfx/tweetwallfx/661/660
tweetwallfx
tweetwallfx
https://github.com/TweetWallFX/TweetwallFX/issues/660
https://github.com/TweetWallFX/TweetwallFX/pull/661
https://github.com/TweetWallFX/TweetwallFX/pull/661
1
fixes
NodeFadeOutStep shall look for all nodes which match the selector
### Expected Behavior All nodes with id's matching the configure selector shall be added to the fad out transition. ### Current Behavior Only one node is selected.
86c421f7c1dd4c8fc9d01c63e4b8e7e446e8bc83
877a1414f86ccfb99afa7dc040c0351de659aaf3
https://github.com/tweetwallfx/tweetwallfx/compare/86c421f7c1dd4c8fc9d01c63e4b8e7e446e8bc83...877a1414f86ccfb99afa7dc040c0351de659aaf3
diff --git a/controls/src/main/java/org/tweetwallfx/controls/steps/NodeFadeOutStep.java b/controls/src/main/java/org/tweetwallfx/controls/steps/NodeFadeOutStep.java index 7b18786..01a0bd6 100644 --- a/controls/src/main/java/org/tweetwallfx/controls/steps/NodeFadeOutStep.java +++ b/controls/src/main/java/org/tweetwallfx/controls/steps/NodeFadeOutStep.java @@ -24,6 +24,8 @@ package org.tweetwallfx.controls.steps; import java.util.Objects; +import java.util.Set; +import javafx.animation.ParallelTransition; import javafx.scene.Node; import org.tweetwallfx.controls.WordleSkin; import org.tweetwallfx.stepengine.api.Step; @@ -48,14 +50,18 @@ public class NodeFadeOutStep implements Step { @Override public void doStep(final StepEngine.MachineContext context) { final WordleSkin wordleSkin = (WordleSkin) context.get("WordleSkin"); - final Node node = wordleSkin.getNode().lookup(config.getNodeSelector()); + final Set<Node> nodes = wordleSkin.getNode().lookupAll(config.getNodeSelector()); - final FlipOutXTransition flipOutXTransition = new FlipOutXTransition(node); - flipOutXTransition.setOnFinished(e -> { - wordleSkin.getPane().getChildren().remove(node); + final ParallelTransition fadeOutAll = new ParallelTransition(); + nodes.forEach(node -> { + fadeOutAll.getChildren().add(new FlipOutXTransition(node)); + + }); + fadeOutAll.setOnFinished(e -> { + wordleSkin.getPane().getChildren().removeAll(nodes); context.proceed(); }); - flipOutXTransition.play(); + fadeOutAll.play(); } @Override
['controls/src/main/java/org/tweetwallfx/controls/steps/NodeFadeOutStep.java']
{'.java': 1}
1
1
0
0
1
648,193
133,706
18,234
141
811
159
16
1
170
27
33
6
0
0
1970-01-01T00:25:41
14
Java
{'Java': 935089, 'CSS': 2115}
MIT License
8,655
fieldenms/tg/1839/1838
fieldenms
tg
https://github.com/fieldenms/tg/issues/1838
https://github.com/fieldenms/tg/pull/1839
https://github.com/fieldenms/tg/pull/1839
1
resolve
Vulcanizer: workaround for Windows idiosyncrasies
### Description As described in Java bug [JDK-4715154](https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4715154), Windows does not allow a mapped file to be deleted, and the mapped memory buffer is only released when the GC decides to invoke `finalize()`, or something like that. Therefore, in order for `VulcanizingUtility` to have a reasonable chance to delete all intermediate files after vulcanization, it is necessary to force `System.gc()` at the beginning of `clearObsoleteResources()`. ### Expected outcome `Vulcanize` executes successfully and intermediate files are deleted. ### Actual outcome ``` java.nio.file.FileSystemException: vulcan\\resources\\filesaver\\FileSaver.min.js: The process cannot access the file because it is being used by another process ``` and intermediate files are not deleted. ### Steps to reproduce Execute `Vulcanize`. ### Client environment #### Operating systems - Windows
53df994b5a0a014675d8798d45d4802a18ed56bd
7dcf447035548b1af5db3169c799c533e1ac6237
https://github.com/fieldenms/tg/compare/53df994b5a0a014675d8798d45d4802a18ed56bd...7dcf447035548b1af5db3169c799c533e1ac6237
diff --git a/platform-web-resources/src/main/java/ua/com/fielden/platform/web/vulcanizer/VulcanizingUtility.java b/platform-web-resources/src/main/java/ua/com/fielden/platform/web/vulcanizer/VulcanizingUtility.java index 967e3ff664..8ff1cf8339 100644 --- a/platform-web-resources/src/main/java/ua/com/fielden/platform/web/vulcanizer/VulcanizingUtility.java +++ b/platform-web-resources/src/main/java/ua/com/fielden/platform/web/vulcanizer/VulcanizingUtility.java @@ -290,6 +290,12 @@ public class VulcanizingUtility { * Removes all intermediate files after vulcanisation. */ private static void clearObsoleteResources() { + // As described in Java bug JDK-4715154, Windows does not allow a mapped file to be deleted, and the mapped memory buffer is only released when the GC decides to invoke finalize(), or something like that. + // Therefore, in order to have a reasonable chance to delete all intermediate files after vulcanization, it is necessary to force System.gc() here. + // While this is only significant for Windows, there should be no ill effects on other operating systems. + LOGGER.info("\\tForce System.gc()..."); + System.gc(); + LOGGER.info("\\tClear obsolete files..."); try { deleteDirectory(new File("vulcan"));
['platform-web-resources/src/main/java/ua/com/fielden/platform/web/vulcanizer/VulcanizingUtility.java']
{'.java': 1}
1
1
0
0
1
8,199,970
1,691,300
205,085
3,064
565
112
6
1
943
117
206
22
1
1
1970-01-01T00:27:35
14
JavaScript
{'JavaScript': 34453671, 'Java': 12969926, 'HTML': 2295791, 'TeX': 1296798, 'CSS': 177044, 'Makefile': 28094, 'Shell': 13899, 'XSLT': 6158, 'Batchfile': 4729, 'Python': 3798, 'Roff': 3102, 'CoffeeScript': 2455, 'TSQL': 1058}
MIT License
9,748
dougnoel/sentinel/94/60
dougnoel
sentinel
https://github.com/dougnoel/sentinel/issues/60
https://github.com/dougnoel/sentinel/pull/94
https://github.com/dougnoel/sentinel/pull/94
1
fixed
Sometimes a wait of 0.002 seconds will make the next click go faster
Adding in a step of "And I wait 0.002 seconds" will make elements that couldn't be found on pop up divs suddenly found immediately. Not sure why this is, but I've found that taking the it down to a millisecond also works. Solution is to add a millisecond wait in front of every element discovery. I'm not a fan of this solution, but I don't have a better one at this time.
ccc93befde67df25d50e2d4fdc018241929e81c6
a22b83e2a63973b10d325219767c05e1bfc4a107
https://github.com/dougnoel/sentinel/compare/ccc93befde67df25d50e2d4fdc018241929e81c6...a22b83e2a63973b10d325219767c05e1bfc4a107
diff --git a/src/main/java/com/dougnoel/sentinel/elements/PageElement.java b/src/main/java/com/dougnoel/sentinel/elements/PageElement.java index f2a694b3..1cb62de7 100644 --- a/src/main/java/com/dougnoel/sentinel/elements/PageElement.java +++ b/src/main/java/com/dougnoel/sentinel/elements/PageElement.java @@ -99,7 +99,13 @@ public class PageElement { .withTimeout(timeout) .pollingEvery(interval) .ignoring(NoSuchElementException.class); - + try { + Thread.sleep(2); //Added to deal with intermittent issues that require 2 millisecond waits. + } catch (InterruptedException e) { + String message = StringUtils.format( + "Thread Interrupted: {}", e.getMessage()); + log.error(message); + } WebElement element = wait.until(new Function<WebDriver, WebElement>() { public WebElement apply(WebDriver driver) { return driver.findElement(locator);
['src/main/java/com/dougnoel/sentinel/elements/PageElement.java']
{'.java': 1}
1
1
0
0
1
275,848
60,404
6,948
77
265
60
8
1
372
72
90
1
0
0
1970-01-01T00:26:27
12
Java
{'Java': 569225, 'Gherkin': 80584, 'JavaScript': 1110, 'PowerShell': 573, 'Shell': 315}
Apache License 2.0
9,747
dougnoel/sentinel/95/75
dougnoel
sentinel
https://github.com/dougnoel/sentinel/issues/75
https://github.com/dougnoel/sentinel/pull/95
https://github.com/dougnoel/sentinel/pull/95
1
fixed
pageObjectPackages configuration option is spelled incorrectly in error message
When you do not have any pageObject Packages defined, an error is thrown asking you to set the value pageObjectPackage. It should be pageObjectPackages. Though at this point we should probably just search the entire program for them and mark where they exist for future use.
28f9aa532d3c680586c4313a1e8042ee34cbb126
c4afa618437a8a42ea33816da98216843db3b9a7
https://github.com/dougnoel/sentinel/compare/28f9aa532d3c680586c4313a1e8042ee34cbb126...c4afa618437a8a42ea33816da98216843db3b9a7
diff --git a/src/main/java/com/dougnoel/sentinel/apis/APIFactory.java b/src/main/java/com/dougnoel/sentinel/apis/APIFactory.java index 21691c84..c0fa8d34 100644 --- a/src/main/java/com/dougnoel/sentinel/apis/APIFactory.java +++ b/src/main/java/com/dougnoel/sentinel/apis/APIFactory.java @@ -76,7 +76,7 @@ public class APIFactory { } } if(api == null) { - throw new ConfigurationNotFoundException("The API you want to test could not be built. At least one Page object package is required to run a test. Please add a pageObjectPackage property to your conf/sentinel.yml configuration file and try again."); + throw new ConfigurationNotFoundException("The API you want to test could not be built. At least one Page object package is required to run a test. Please add a pageObjectPackages property to your conf/sentinel.yml configuration file and try again."); } return api; } diff --git a/src/main/java/com/dougnoel/sentinel/pages/PageFactory.java b/src/main/java/com/dougnoel/sentinel/pages/PageFactory.java index 928e6935..49d564fd 100644 --- a/src/main/java/com/dougnoel/sentinel/pages/PageFactory.java +++ b/src/main/java/com/dougnoel/sentinel/pages/PageFactory.java @@ -66,7 +66,7 @@ public class PageFactory { */ public static Page buildOrRetrievePage(String pageName) throws PageNotFoundException, ConfigurationNotFoundException { Page page = pages.get(pageName); - final String errorMessage = "The page you want to test could not be built. At least one Page object package is required to run a test. Please add a pageObjectPackage property to your conf/sentinel.yml configuration file and try again."; + final String errorMessage = "The page you want to test could not be built. At least one Page object package is required to run a test. Please add a pageObjectPackages property to your conf/sentinel.yml configuration file and try again."; if (page != null) { return page; } else {
['src/main/java/com/dougnoel/sentinel/pages/PageFactory.java', 'src/main/java/com/dougnoel/sentinel/apis/APIFactory.java']
{'.java': 2}
2
2
0
0
2
276,100
60,462
6,954
77
988
200
4
2
277
46
55
3
0
0
1970-01-01T00:26:27
12
Java
{'Java': 569225, 'Gherkin': 80584, 'JavaScript': 1110, 'PowerShell': 573, 'Shell': 315}
Apache License 2.0
9,746
dougnoel/sentinel/368/367
dougnoel
sentinel
https://github.com/dougnoel/sentinel/issues/367
https://github.com/dougnoel/sentinel/pull/368
https://github.com/dougnoel/sentinel/pull/368
1
fix
Custom element types in projects extending sentinel cause exception
1. use any test project that consumes sentinel and provides custom element types 2. reference an element of a custom element type anywhere in any test Expected condition: sentinel loads the custom type, finds the element, and performs the step Error seen: ``` com.dougnoel.sentinel.exceptions.FileException: <path to page object file, redacted> could not find suitable class for element in this file. Caught at com.dougnoel.sentinel.elements.ElementFactory.createElement(ElementFactory.java:101) at com.dougnoel.sentinel.pages.Page.lambda$getElement$0(Page.java:77) at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1220) at com.dougnoel.sentinel.pages.Page.getElement(Page.java:77) at com.dougnoel.sentinel.elements.ElementFunctions.getElement(ElementFunctions.java:34) ``` This is caused by a recent change to the FileManager.getClassPath() method.
a52d530942337a35ab42dea16eb99f77da37fa86
ddea120d1810b63568a81d047fc7c6c37d2c564e
https://github.com/dougnoel/sentinel/compare/a52d530942337a35ab42dea16eb99f77da37fa86...ddea120d1810b63568a81d047fc7c6c37d2c564e
diff --git a/src/main/java/com/dougnoel/sentinel/system/FileManager.java b/src/main/java/com/dougnoel/sentinel/system/FileManager.java index 202fadb2..eb44cab1 100644 --- a/src/main/java/com/dougnoel/sentinel/system/FileManager.java +++ b/src/main/java/com/dougnoel/sentinel/system/FileManager.java @@ -100,7 +100,7 @@ public class FileManager { public static String getClassPath(String className) { try { String filePath = findFilePath(className + ".java").getPath(); - String returnValue = convertPathSeparators(StringUtils.removeEnd(filePath, ".java")); + String returnValue = StringUtils.removeEnd(filePath, ".java").replace(File.separator, "."); return StringUtils.substringAfter(returnValue, "java."); } catch (FileException fe) { return null;
['src/main/java/com/dougnoel/sentinel/system/FileManager.java']
{'.java': 1}
1
1
0
0
1
308,487
69,315
7,943
59
185
33
2
1
886
83
193
17
0
1
1970-01-01T00:27:33
12
Java
{'Java': 569225, 'Gherkin': 80584, 'JavaScript': 1110, 'PowerShell': 573, 'Shell': 315}
Apache License 2.0
9,745
dougnoel/sentinel/507/506
dougnoel
sentinel
https://github.com/dougnoel/sentinel/issues/506
https://github.com/dougnoel/sentinel/pull/507
https://github.com/dougnoel/sentinel/pull/507
1
closes
Fix Unit Test Timeouts
We keep getting timeouts in our unit tests when run in Actions due to internet wonkiness. I want to implement 2 fixes: 1.) Change downloads to use long process timeout (60 seconds) 2.) Change the timeout in the Actions file by passing in an argument to increase it to 20 seconds to deal with NGNX page timeouts.
273fe58eb92956232a2e4a4754ec039d880ff03c
b2b491e4fe948917ac7cd29c0fcd1f3cf1aa2f37
https://github.com/dougnoel/sentinel/compare/273fe58eb92956232a2e4a4754ec039d880ff03c...b2b491e4fe948917ac7cd29c0fcd1f3cf1aa2f37
diff --git a/src/main/java/com/dougnoel/sentinel/system/DownloadManager.java b/src/main/java/com/dougnoel/sentinel/system/DownloadManager.java index d934bd84..68491c31 100644 --- a/src/main/java/com/dougnoel/sentinel/system/DownloadManager.java +++ b/src/main/java/com/dougnoel/sentinel/system/DownloadManager.java @@ -97,7 +97,7 @@ public class DownloadManager { String downloadedFileName = null; var valid = true; - long timeOut = Time.out().toSeconds(); + long timeOut = Time.longProcessTimeout().toSeconds(); long loopTime = Time.loopInterval().toMillis(); var downloadFolderPath = Paths.get(downloadDir); var watchService = FileSystems.getDefault().newWatchService();
['src/main/java/com/dougnoel/sentinel/system/DownloadManager.java']
{'.java': 1}
1
1
0
0
1
443,655
99,796
11,105
82
110
24
2
1
315
57
69
4
0
0
1970-01-01T00:27:57
12
Java
{'Java': 569225, 'Gherkin': 80584, 'JavaScript': 1110, 'PowerShell': 573, 'Shell': 315}
Apache License 2.0
8,976
aalto-letech/aplus-courses/989/986
aalto-letech
aplus-courses
https://github.com/Aalto-LeTech/aplus-courses/issues/986
https://github.com/Aalto-LeTech/aplus-courses/pull/989
https://github.com/Aalto-LeTech/aplus-courses/pull/989
1
fixes
Handle errors better when reading exercises
It happened that one exercise had a form field defined as follows in the A+ API ```json { "key": "field_4", "type": null, "title": "", "required": false } ``` That caused our plugin to fail rendering the exercises, because [this line](https://github.com/Aalto-LeTech/aplus-courses/blob/671aca37eaf20d458f164d67c08cc33b216d3188/src/main/java/fi/aalto/cs/apluscourses/model/SubmissionInfo.java#L44) ```java String type = spec.getString("type"); ``` can't handle null values. (The exception it threw was caught somewhere.) Fix at least that line! Consider other similar lines there as well.
280be43fe5fa3ae0e20fbeb1408d53b1b2d13bf1
0bdd5f86f78a00670b2586448e7f1a86bd28c17c
https://github.com/aalto-letech/aplus-courses/compare/280be43fe5fa3ae0e20fbeb1408d53b1b2d13bf1...0bdd5f86f78a00670b2586448e7f1a86bd28c17c
diff --git a/src/main/java/fi/aalto/cs/apluscourses/model/SubmissionInfo.java b/src/main/java/fi/aalto/cs/apluscourses/model/SubmissionInfo.java index b841841a..da8186c3 100644 --- a/src/main/java/fi/aalto/cs/apluscourses/model/SubmissionInfo.java +++ b/src/main/java/fi/aalto/cs/apluscourses/model/SubmissionInfo.java @@ -41,8 +41,8 @@ public class SubmissionInfo { for (int i = 0; i < formSpec.length(); ++i) { JSONObject spec = formSpec.getJSONObject(i); - String type = spec.getString("type"); - if (!type.equals("file")) { + String type = spec.optString("type"); + if (!"file".equals(type)) { continue; }
['src/main/java/fi/aalto/cs/apluscourses/model/SubmissionInfo.java']
{'.java': 1}
1
1
0
0
1
861,387
176,121
26,019
358
159
37
4
1
703
69
168
19
1
2
1970-01-01T00:27:54
11
Java
{'Java': 1189385, 'Scala': 27365, 'Kotlin': 24924, 'Python': 19620, 'Shell': 1875}
MIT License
8,893
gisaia/arlas-server/781/780
gisaia
arlas-server
https://github.com/gisaia/ARLAS-server/issues/780
https://github.com/gisaia/ARLAS-server/pull/781
https://github.com/gisaia/ARLAS-server/pull/781
1
fix
H3 aggregations with geometries as bbox returns invalid geojson
The first coordinate and the last coordinate must be equal : "geometry": { "type": "Polygon", "coordinates": [ [ [ **-123.63288293592632, 39.00875060353428** ], [ -123.6217990424484, 39.00875060353428 ], [ -123.6217990424484, 38.85480898898095 ], [ **-123.63288293592632, 38.85480898898095** ] ] ] }
f52ef1858369be29bc9d90fe517931e984bfbf88
e70d4bb1e40dbb83640a95a318f7e5df092e509f
https://github.com/gisaia/arlas-server/compare/f52ef1858369be29bc9d90fe517931e984bfbf88...e70d4bb1e40dbb83640a95a318f7e5df092e509f
diff --git a/arlas-core/src/main/java/io/arlas/server/core/impl/elastic/services/ElasticExploreService.java b/arlas-core/src/main/java/io/arlas/server/core/impl/elastic/services/ElasticExploreService.java index 94be4275..04761887 100644 --- a/arlas-core/src/main/java/io/arlas/server/core/impl/elastic/services/ElasticExploreService.java +++ b/arlas-core/src/main/java/io/arlas/server/core/impl/elastic/services/ElasticExploreService.java @@ -574,6 +574,7 @@ public class ElasticExploreService extends ExploreService { bounds.add(new LngLatAlt(bottomRight.getLon(), topLeft.getLat())); bounds.add(new LngLatAlt(bottomRight.getLon(), bottomRight.getLat())); bounds.add(new LngLatAlt(topLeft.getLon(), bottomRight.getLat())); + bounds.add(new LngLatAlt(topLeft.getLon(), topLeft.getLat())); box.add(bounds); return box;
['arlas-core/src/main/java/io/arlas/server/core/impl/elastic/services/ElasticExploreService.java']
{'.java': 1}
1
1
0
0
1
1,476,335
293,147
32,854
278
71
17
1
1
589
37
135
25
0
0
1970-01-01T00:27:29
10
Java
{'Java': 2030791, 'Shell': 34849, 'Mustache': 1917, 'Python': 971, 'Dockerfile': 942, 'HTML': 282, 'JavaScript': 67}
Apache License 2.0