Skip to content

Commit

Permalink
fix(package): fixes several issues with rending packages from apply m…
Browse files Browse the repository at this point in the history
…anifests

* fixed invalid ros config rendering

* fix maximum memory limit typo

* fixed typos related ros QoS, maximum memory limit

* fixed package cloning issue

* ran generate-validation script

Co-authored-by: aditya_jha4 <[email protected]>
Co-authored-by: Yifei Xu <[email protected]>
Co-authored-by: Pallab Pain <[email protected]>
  • Loading branch information
4 people authored Nov 23, 2022
1 parent 0831a0c commit c1acc1e
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 23 deletions.
2 changes: 1 addition & 1 deletion jsonschema/package-schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ definitions:
memory:
type: number
min: 256
max: 32678
max: 32768
required:
- type
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion riocli/build/validation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = "2.16.1"
VERSION = "2.16.2"
import re
from fastjsonschema import JsonSchemaValueException

Expand Down
2 changes: 1 addition & 1 deletion riocli/deployment/validation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = "2.16.1"
VERSION = "2.16.2"
import re
from fastjsonschema import JsonSchemaValueException

Expand Down
2 changes: 1 addition & 1 deletion riocli/device/validation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = "2.16.1"
VERSION = "2.16.2"
import re
from fastjsonschema import JsonSchemaValueException

Expand Down
2 changes: 1 addition & 1 deletion riocli/disk/validation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = "2.16.1"
VERSION = "2.16.2"
import re
from fastjsonschema import JsonSchemaValueException

Expand Down
2 changes: 1 addition & 1 deletion riocli/network/validation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = "2.16.1"
VERSION = "2.16.2"
import re
from fastjsonschema import JsonSchemaValueException

Expand Down
19 changes: 13 additions & 6 deletions riocli/package/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,19 @@ def create_object(self, client: Client):
'name': 'default',
'packageVersion': 'v1.0.0',
'apiVersion': "2.1.0",
'description': '',
'bindable': True,
'plans': [
{
"inboundROSInterfaces": {
"anyIncomingScopedOrTargetedRosConfig": False
},
'singleton': False,
'bindable': True,
'name' : 'default',
'metadata': {},
'name': 'default',
'dependentDeployments': [],
'exposedParameters': [],
'includePackages': [],
'components': [
]
}
Expand All @@ -71,7 +74,8 @@ def create_object(self, client: Client):
'parameters': [],
'ros': {'services': [], 'topics': [], 'isROS': False, 'actions': []},
'exposedParameters': [],
'metadata': {},
'includePackages': [],
'rosBagJobDefs':[]
})

# metadata
Expand All @@ -90,6 +94,9 @@ def create_object(self, client: Client):

# TODO validate transform. specially nested secret.
component_obj.executables = list(map(self._map_executable, self.spec.executables))
for exec in component_obj.executables:
if hasattr(exec, 'cmd') is False:
setattr(exec, 'cmd', [])
component_obj.requiredRuntime = self.spec.runtime


Expand Down Expand Up @@ -143,11 +150,11 @@ def create_object(self, client: Client):
# ✓ action
# rosbagjob
if 'ros' in self.spec:
component_obj.ros.isRos = True
component_obj.ros.isROS = True
component_obj.ros.ros_distro = self.spec.ros.version
pkg_object.inboundROSInterfaces = munchify({})
pkg_object.plans[0].inboundROSInterfaces = munchify({})

pkg_object.inboundROSInterfaces.anyIncomingScopedOrTargetedRosConfig = self.spec.ros.inboundScopedTargeted if 'inboundScopedTargeted' in self.spec.ros else False
pkg_object.plans[0].inboundROSInterfaces.anyIncomingScopedOrTargetedRosConfig = self.spec.ros.inboundScopedTargeted if 'inboundScopedTargeted' in self.spec.ros else False
if 'rosEndpoints' in self.spec.ros:
component_obj.ros.topics = list(self._get_rosendpoint_struct(self.spec.ros.rosEndpoints, 'topic'))
component_obj.ros.services = list(self._get_rosendpoint_struct(self.spec.ros.rosEndpoints, 'service'))
Expand Down
16 changes: 8 additions & 8 deletions riocli/package/validation.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion riocli/project/validation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = "2.16.1"
VERSION = "2.16.2"
import re
from fastjsonschema import JsonSchemaValueException

Expand Down
2 changes: 1 addition & 1 deletion riocli/secret/validation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = "2.16.1"
VERSION = "2.16.2"
import re
from fastjsonschema import JsonSchemaValueException

Expand Down
2 changes: 1 addition & 1 deletion riocli/static_route/validation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = "2.16.1"
VERSION = "2.16.2"
import re
from fastjsonschema import JsonSchemaValueException

Expand Down

0 comments on commit c1acc1e

Please sign in to comment.