generated from thoth-station/template-project
-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.priority/critical-urgentHighest priority. Must be actively worked on as someone's top priority right now.Highest priority. Must be actively worked on as someone's top priority right now.sig/stack-guidanceCategorizes an issue or PR as relevant to SIG Stack Guidance.Categorizes an issue or PR as relevant to SIG Stack Guidance.triage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.
Description
Describe the bug
2022-04-25 16:13:32,881 226484 WARNING thoth.common:340: Logging to a Sentry instance is turned off
2022-04-25 16:13:32,882 226484 INFO thoth.adviser:253: Version: 0.53.0
2022-04-25 16:13:32,883 226484 INFO thoth.adviser:978: Validating prescriptions in '../prescriptions/prescriptions'
2022-04-25 16:13:32,883 226484 INFO thoth.adviser.prescription.v1.prescription:334: Using prescriptions 'thoth' release 'dev+git'
2022-04-25 16:14:07,634 226484 ERROR thoth.adviser.prescription.v1.prescription:199: Failed to validate schema for prescription: expected str for dictionary value @ data['units']['wraps'][0]['run']['release_notes']['organization']
Traceback (most recent call last):
File "/home/fpokorny/git/thoth-station/adviser/thoth/adviser/prescription/v1/prescription.py", line 197, in from_dict
PRESCRIPTION_SCHEMA(prescription)
File "/home/fpokorny/.local/share/virtualenvs/adviser-1eaKppR3/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 272, in __call__
return self._compiled([], data)
File "/home/fpokorny/.local/share/virtualenvs/adviser-1eaKppR3/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict
return base_validate(path, iteritems(data), out)
File "/home/fpokorny/.local/share/virtualenvs/adviser-1eaKppR3/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: expected str for dictionary value @ data['units']['wraps'][0]['run']['release_notes']['organization']
2022-04-25 16:14:07,694 226484 ERROR thoth.adviser.prescription.v1.prescription:302: Failed to load prescription from '../prescriptions/prescriptions/py_/pynvx/gh_release_notes.yaml'
2022-04-25 16:14:07,697 226484 CRITICAL root:105: Traceback (most recent call last):
File "/home/fpokorny/git/thoth-station/adviser/thoth/adviser/prescription/v1/prescription.py", line 197, in from_dict
PRESCRIPTION_SCHEMA(prescription)
File "/home/fpokorny/.local/share/virtualenvs/adviser-1eaKppR3/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 272, in __call__
return self._compiled([], data)
File "/home/fpokorny/.local/share/virtualenvs/adviser-1eaKppR3/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict
return base_validate(path, iteritems(data), out)
File "/home/fpokorny/.local/share/virtualenvs/adviser-1eaKppR3/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: expected str for dictionary value @ data['units']['wraps'][0]['run']['release_notes']['organization']
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./thoth-adviser", line 1011, in <module>
__name__ == "__main__" and cli()
File "/home/fpokorny/.local/share/virtualenvs/adviser-1eaKppR3/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/fpokorny/.local/share/virtualenvs/adviser-1eaKppR3/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/fpokorny/.local/share/virtualenvs/adviser-1eaKppR3/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/fpokorny/.local/share/virtualenvs/adviser-1eaKppR3/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/fpokorny/.local/share/virtualenvs/adviser-1eaKppR3/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "./thoth-adviser", line 979, in validate_prescription
prescription = Prescription.validate(prescriptions)
File "/home/fpokorny/git/thoth-station/adviser/thoth/adviser/prescription/v1/prescription.py", line 116, in validate
prescription_instance = cls.load(prescriptions)
File "/home/fpokorny/git/thoth-station/adviser/thoth/adviser/prescription/v1/prescription.py", line 295, in load
prescription_instance = cls.from_dict(
File "/home/fpokorny/git/thoth-station/adviser/thoth/adviser/prescription/v1/prescription.py", line 203, in from_dict
raise PrescriptionSchemaError(str(exc))
thoth.adviser.exceptions.PrescriptionSchemaError: expected str for dictionary value @ data['units']['wraps'][0]['run']['release_notes']['organization']
prescriptions/prescriptions/py_/pynvx/gh_release_notes.yaml
Lines 11 to 14 in 458f264
| run: | |
| release_notes: | |
| organization: 1132719438 | |
| repository: pynvx |
To Reproduce
Steps to reproduce the behavior:
- Validate prescriptions
- See the error
Expected behavior
Prescription validation should succeed.
Additional context
We place organization into the prescription template here:
This means that the organization will be placed to the template and become an integer (instead of staying as a string):
release_notes:
- organization: 1132719438
+ organization: '1132719438'Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.priority/critical-urgentHighest priority. Must be actively worked on as someone's top priority right now.Highest priority. Must be actively worked on as someone's top priority right now.sig/stack-guidanceCategorizes an issue or PR as relevant to SIG Stack Guidance.Categorizes an issue or PR as relevant to SIG Stack Guidance.triage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.
Type
Projects
Status
📋 Backlog