Skip to content

Commit

Permalink
make branch tool only
Browse files Browse the repository at this point in the history
  • Loading branch information
noursaidi committed Oct 26, 2022
1 parent bde1950 commit d86017c
Show file tree
Hide file tree
Showing 16 changed files with 57 additions and 50 deletions.
10 changes: 5 additions & 5 deletions .gencode_hash.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ e1f62882576d0f4332360f2aedb79b37a43973fb31d862c829af924f8f310ec1 gencode/docs/c
5598402bde04860394d91ecf43f5c653ff539cce49d011db4b5b17d596b72c2a gencode/docs/configuration_endpoint.html
b7ca70e3176f997f254c32bd8d53dff1462ac8a71c0e166aaa85193d67bff60b gencode/docs/configuration_execution.html
00e8646fd8117d47ddf32f2488228cd35b66fd711cb21288dc6bb5a5715978cb gencode/docs/configuration_pubber.html
82fbf41e4e88593f22a929fc8ade4d1e8f75a0fc1aa8452ea1d3b19023bee314 gencode/docs/envelope.html
0f0355e343cb8197dfbae1481c0eca3a0566d73181bc968e33fd469a1c94d1e6 gencode/docs/envelope.html
f1fde870638541bea6de16acd64365c89a7d56ee3270d6fd1bcdbb5bdb141887 gencode/docs/event.html
a8800ab8384de3b846af0d72cf310acf01644842b557e42eec20b69a0bfa1868 gencode/docs/event_discovery.html
3019d06826576d287edbf69116ec712c74c8fdfcc5653b51f2573cb9755ebb23 gencode/docs/event_mapping.html
Expand Down Expand Up @@ -44,8 +44,8 @@ d8a80ab3180d33bfa17564c969018e1d4350a47dbc70c4ae8a5abbfb25cfedc9 gencode/java/u
04112dd47b0f761131c276c67d3cd8b789d25e6716b5732be9fef14fc6831f1d gencode/java/udmi/schema/DiscoveryModel.java
9962b0eb7d5adf52af6160e9f3131f8eeb52ae9e518954dbb6aead1bcad0245e gencode/java/udmi/schema/DiscoveryState.java
b90ab40a281c5e383881629bd8a791ba3d30491e06ebc623a476e2735a3f6c3a gencode/java/udmi/schema/EndpointConfiguration.java
6fea7710d4eb64bfc568820f7063a89ce7808853ef7a56763fa90f323e09362f gencode/java/udmi/schema/Entry.java
9b92e03774ed0b9159ff3ab462822699ef7f824161b166a881889ea1eb6a62ad gencode/java/udmi/schema/Envelope.java
885859ea9de29217186c34f3a90b112411d1beddaf58a88b85e7934cd3c92b6f gencode/java/udmi/schema/Entry.java
017f8e237efa959b81d72f3dd2e78b915856198ceef02c041c657b30df93b7c2 gencode/java/udmi/schema/Envelope.java
e9f5c77be81486b6b8c6d88f70f2d50583d8c3fafa2ac09ead80f44b8d5e751e gencode/java/udmi/schema/Event.java
69c3c12ce057b6ab8e27ab8cab6fb009bfd1c997652214b49e6f2a26a58f302c gencode/java/udmi/schema/ExecutionConfiguration.java
2e77a29988e6c17875d3f781be931e3b835bb310639f60d3bb28f24405a86bed gencode/java/udmi/schema/FamilyDiscoveryConfig.java
Expand Down Expand Up @@ -98,11 +98,11 @@ d3968b92497e83a63f18cc0e74484a9807f1bb92db0c92d556ec2caaa143d645 gencode/java/u
ac6f8fd87c8986cce01e872460c15ff6fe71e3816f9bde610acfe25f7d38c8d4 gencode/java/udmi/schema/ValidationEvent.java
f7d117dc8b9764acf0c95a13a2bfdfbdf31d1a8ec83a707448aa4d7391ef07e2 gencode/java/udmi/schema/ValidationState.java
e007ddd1ceeae3603c85110c33e1bb4a418ff9c7a791ca0df25b7ea3caeafd36 gencode/java/udmi/schema/ValidationSummary.java
fb9618d9177765ef7c4494b6ecfce8e69c9df193b7dc8c2124425b290fa4e359 gencode/python/udmi/schema/__init__.py
67256cd379f8b456a2d8c3b5e64c9bde740569338f8e32be626ecb65ad6fd23c gencode/python/udmi/schema/__init__.py
4b25dd95f863059b761269f93adcae7049507924a1c6e74d6856849203c179db gencode/python/udmi/schema/ancillary_properties.py
5ecd6c542f33450cb4ce75d940a6dff4d3bd67d4b9de4aff5ee88abcc301dbff gencode/python/udmi/schema/building_config.py
dab4f5fca272ec48c2881bca2b6bc43786ada47fa1f6dd935c35f7ce0eb6b0f6 gencode/python/udmi/schema/building_translation.py
470b688984b89b25fcdfa8e08bd95b0c5d8c551d53a6ab5512503ee39419e6fa gencode/python/udmi/schema/category.py
c33fab16eb86b93692ddbb243a2d6cfe202ca1a0fd76b351a18727a35940d958 gencode/python/udmi/schema/category.py
6578d68f65b87b781086e72566de910db4bef365599fe3188862d4d8a81e84fb gencode/python/udmi/schema/command_discovery.py
1254c34d973c9099ae99dcea4534e234e9019f49255e2e27d2afa1bc074fd596 gencode/python/udmi/schema/command_mapping.py
c5a62f92328e2ede167fc1f53bece6e48696a0ab0e37e3a41f65cd98494ba0d7 gencode/python/udmi/schema/common.py
Expand Down
13 changes: 3 additions & 10 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,6 @@ jobs:
if: "${{ env.GCP_TARGET_PROJECT != '' }}"
run: |
bin/test_validator $GCP_TARGET_PROJECT
more sites/udmi_site_model/devices/AHU-22/*
more sites/udmi_site_model/devices/AHU-22/out/*
more sites/udmi_site_model/out/devices/AHU-22/*
more /tmp/validator.out
echo Comparing test run results with golden file:
diff -u /tmp/validator.out etc/validator.out
Expand All @@ -131,19 +128,15 @@ jobs:
sites/udmi_site_model/out/devices/AHU-1/tests/%/sequence.md \
validator/sequences/%/sequence.md
- name: output logs
env:
GCP_TARGET_PROJECT: ${{ secrets.GCP_TARGET_PROJECT }}
if: "${{ env.GCP_TARGET_PROJECT != '' }}"
if: ${{ always() }}
run: |
cd sites/udmi_site_model/out
echo Output from `pwd`
more `find out -type f`
cd sites/udmi_site_model/out && more `find . -type f` || true
- name: validator logs
if: ${{ always() }}
run: |
cat out/validator.out || true
- name: pubber logs
if: ${{ always() }}
run: |
cat pubber.out || true
more pubber.out* out/pubber.out* || true
more pubber/out/*/*.json
4 changes: 2 additions & 2 deletions gencode/docs/envelope.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions gencode/java/udmi/schema/Entry.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions gencode/java/udmi/schema/Envelope.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions gencode/python/udmi/schema/__init__.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions gencode/python/udmi/schema/category.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class LocalDevice {
ES_CERT_TYPE, ES_CERT_FILE);
private static final String ERROR_FORMAT_INDENT = " ";
private static final int MAX_METADATA_LENGTH = 32767;
private static final String UDMI_VERSION = "1.4.0";
private static final String UDMI_VERSION = "1.3.14";
private final String deviceId;
private final Map<String, JsonSchema> schemas;
private final File siteDir;
Expand All @@ -212,11 +212,7 @@ class LocalDevice {
this.generation = generation;
this.siteDir = siteDir;
this.validateMetadata = validateMetadata;
if (siteMetadata != null) {
this.siteMetadata = JsonUtil.asMap(siteMetadata);
} else {
this.siteMetadata = null;
}
this.siteMetadata = siteMetadata == null ? null : JsonUtil.asMap(siteMetadata);
exceptionMap = new ExceptionMap("Exceptions for " + deviceId);
deviceDir = new File(devicesDir, deviceId);
outDir = new File(deviceDir, OUT_DIR);
Expand Down Expand Up @@ -317,7 +313,7 @@ private Metadata readMetadataWithValidation(boolean validate) {
try {
String intermediary = JsonUtil.stringify(instance);
if (siteMetadata == null) {
return JsonUtil.convertTo(Metadata.class, intermediary);
return JsonUtil.fromString(Metadata.class, intermediary);
} else {
Map<String, Object> mergedMetadata = GeneralUtils.deepCopy(siteMetadata);
GeneralUtils.mergeObject(mergedMetadata, asMap(intermediary));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
public abstract class ConfigUtil {

public static final String EXCEPTIONS_JSON = "exceptions.json";
public static final String UDMI_VERSION = "1.4.0";
public static final String UDMI_VERSION = "1.3.14";

private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper()
.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void upgrade() {
if (minor < 3) {
upgrade_1_3();
}
if (minor == 3 && patch < 14) {
if (patch < 14) {
upgrade_1_3_14();
}
if (message.has(VERSION_PROPERTY_KEY)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -532,9 +532,8 @@ private void sendValidationResult(Map<String, String> origAttributes,
String subFolder = origAttributes.get("subFolder");
event.sub_folder = subFolder;
event.sub_type = origAttributes.getOrDefault("subType", UNKNOWN_TYPE_DEFAULT);
List<Entry> errors = reportingDevice.getErrors(validationStart);
event.status = ReportingDevice.getSummaryEntry(errors);
event.errors = errors != null && errors.size() > 1 ? errors : null;
event.errors = reportingDevice.getErrors(validationStart);
event.status = ReportingDevice.getSummaryEntry(event.errors);
if (POINTSET_SUBFOLDER.equals(subFolder)) {
PointsetSummary pointsSummary = new PointsetSummary();
pointsSummary.missing = arrayIfNotNull(reportingDevice.getMissingPoints());
Expand Down
10 changes: 8 additions & 2 deletions validator/traces/simple.out/devices/AHU-1/event_pointset.out
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"timestamp" : "1999-10-20T01:02:03Z",
"version" : "1.4.0",
"version" : "1.3.14",
"sub_folder" : "pointset",
"sub_type" : "event",
"status" : {
Expand All @@ -12,5 +12,11 @@
"pointset" : {
"missing" : [ "filter_differential_pressure_setpoint" ],
"extra" : [ ]
}
},
"errors" : [ {
"message" : "Device has missing points: filter_differential_pressure_setpoint",
"category" : "validation.error.simple",
"timestamp" : "1999-10-20T01:02:03Z",
"level" : 500
} ]
}
11 changes: 9 additions & 2 deletions validator/traces/simple.out/devices/AHU-22/event_pointset.out
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"timestamp" : "1999-10-20T01:02:03Z",
"version" : "1.4.0",
"version" : "1.3.14",
"sub_folder" : "pointset",
"sub_type" : "event",
"status" : {
Expand All @@ -13,5 +13,12 @@
"pointset" : {
"missing" : [ ],
"extra" : [ ]
}
},
"errors" : [ {
"message" : "While converting to json node: 2 schema violations found",
"detail" : "While converting to json node: 2 schema violations found @Validator.validateMessage(redacted); 2 schema violations found; object instance has properties which are not allowed by the schema: [\"yesvalue\"]; object has missing required properties ([\"version\"])",
"category" : "validation.error.simple",
"timestamp" : "1999-10-20T01:02:03Z",
"level" : 500
} ]
}
11 changes: 9 additions & 2 deletions validator/traces/simple.out/devices/AHU-22/event_system.out
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"timestamp" : "1999-10-20T01:02:03Z",
"version" : "1.4.0",
"version" : "1.3.14",
"sub_folder" : "system",
"sub_type" : "event",
"status" : {
Expand All @@ -9,5 +9,12 @@
"category" : "validation.error.simple",
"timestamp" : "1999-10-20T01:02:03Z",
"level" : 500
}
},
"errors" : [ {
"message" : "While converting to json node: 1 schema violations found",
"detail" : "While converting to json node: 1 schema violations found @Validator.validateMessage(redacted); 1 schema violations found; instance entry category not recognized",
"category" : "validation.error.simple",
"timestamp" : "1999-10-20T01:02:03Z",
"level" : 500
} ]
}
10 changes: 8 additions & 2 deletions validator/traces/simple.out/devices/SNS-4/event_pointset.out
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"timestamp" : "1999-10-20T01:02:03Z",
"version" : "1.4.0",
"version" : "1.3.14",
"sub_folder" : "pointset",
"sub_type" : "event",
"status" : {
Expand All @@ -12,5 +12,11 @@
"pointset" : {
"missing" : [ ],
"extra" : [ "rocket_count" ]
}
},
"errors" : [ {
"message" : "Device has extra points: rocket_count",
"category" : "validation.error.simple",
"timestamp" : "1999-10-20T01:02:03Z",
"level" : 500
} ]
}
2 changes: 1 addition & 1 deletion validator/traces/simple.out/validation_report.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"timestamp" : "1999-10-20T01:02:03Z",
"version" : "1.4.0",
"version" : "1.3.14",
"summary" : {
"correct_devices" : [ "AHU-1" ],
"extra_devices" : [ ],
Expand Down

0 comments on commit d86017c

Please sign in to comment.