This fixes #468 JIRA: FACTORY-4899
Signed-off-by: Valerij Maljulin vmaljuli@redhat.com
This section should be part of RemotePolicy. Or maybe you can just use:
'product_versions': SafeYAMLList(str, optional=True, default=['*']),
Can you also change the examples in documentation? (I.e. remove the product_versions there.)
product_versions
rebased onto ef336214881f276f67c255724413e02bca0a8c78
rebased onto 30012b79f0089111c03b012678489e67c0ab94a9
This section should be part of RemotePolicy. Or maybe you can just use: 'product_versions': SafeYAMLList(str, optional=True, default=['*']),
I've tried to make it multiple ways and it's not working. So, let's keep it as it is.
Add a couple of sentences to docs.
This section should be part of RemotePolicy. Or maybe you can just use: 'product_versions': SafeYAMLList(str, optional=True, default=['*']), I've tried to make it multiple ways and it's not working. So, let's keep it as it is.
Oh, it's because SafeYAMLList doesn't support default argument. Can you add it?
SafeYAMLList
default
Setting default product_versions value really shouldn't be handled outside the RemotePolicy class, it would lead to inconsistencies.
RemotePolicy
This section should be part of RemotePolicy. Or maybe you can just use: 'product_versions': SafeYAMLList(str, optional=True, default=['*']), I've tried to make it multiple ways and it's not working. So, let's keep it as it is. Oh, it's because SafeYAMLList doesn't support default argument. Can you add it? Setting default product_versions value really shouldn't be handled outside the RemotePolicy class, it would lead to inconsistencies.
Oh, it's because SafeYAMLList doesn't support default argument. Can you add it? Setting default product_versions value really shouldn't be handled outside the RemotePolicy class, it would lead to inconsistencies.
I've tried it, I've even tried to create a subclass just for a product version, but it's not working.
"values from the global policy will be used."
But more importantly, if gating.yaml defines product versions, then it will be used for matching.
You need to add default argument to constructor of SafeYAMLList in "greenwave/safe_yaml.py" and return the value in the default_value() method. Is that what you have tried?
default_value()
rebased onto 574a393110ade2dcfa56e4c8e4d8af8707c43fcd
2 new commits added
fixup! product_versions in remote rule can now be optional
product_versions in remote rule can now be optional
It's said there. Or do you mean that settings from gating.yaml supposed to override the global policy? Because now it only works when it's matched.
gating.yaml
rebased onto 340bb05553280a4cd3b6c88993b69aeb35f4208d
Please review now
You can avoid creating list and use just iterator (i.e. remove the brackets).
+1
rebased onto 0c1f57d337634f193525565e9ea14ed353c73251
Pull-Request has been merged by vmaljulin
This fixes #468
JIRA: FACTORY-4899
Signed-off-by: Valerij Maljulin vmaljuli@redhat.com