Describe the Housekeeping
The are ~400 submission templates in the production database which contain Ruby objects as part of their definition in the submission_parameters column. This code can conflict with the permitted_classes in the YAML/Psych deserialisation command causing production-blocking errors.
-
At a minimum, put a comment in the (de)serialisation code highlighting this challenge and noting the table and column in the database that should be checked.
-
Potentially synchronise the production submission templates with the seed-data used for development and CI testing.
-
Potentially put together a suite of unit or integration tests that exercise the submissions process including the use of these templates.
-
Potentially add unit test for models that contains serialize : macro for fields, to test it can be saved and loaded for the example values that are in production.
Blocking issues
None
Additional context
See FreshService ticket [#SR-64875] Issues Creating Cherrypicks and fixes #5814 and #5816
Serialisation/Deserialisation Unit tests
For example,
SubmissionTemplate, submission_parameters column must be able to store/load YAML as generated by lib/submission_serializer.rb with lists, symbols, !ruby/object:FieldInfo object.
RequestType::Validator, valid_options column must be able able to store/load YAML that contains !ruby/object:RequestType::Validator::LibraryTypeValidator
Describe the Housekeeping
The are ~400 submission templates in the production database which contain Ruby objects as part of their definition in the
submission_parameterscolumn. This code can conflict with thepermitted_classesin the YAML/Psych deserialisation command causing production-blocking errors.At a minimum, put a comment in the (de)serialisation code highlighting this challenge and noting the table and column in the database that should be checked.
Potentially synchronise the production submission templates with the seed-data used for development and CI testing.
Potentially put together a suite of unit or integration tests that exercise the submissions process including the use of these templates.
Potentially add unit test for models that contains
serialize :macro for fields, to test it can be saved and loaded for the example values that are in production.Blocking issues
None
Additional context
See FreshService ticket [#SR-64875] Issues Creating Cherrypicks and fixes #5814 and #5816
Serialisation/Deserialisation Unit tests
For example,
SubmissionTemplate, submission_parameters column must be able to store/load YAML as generated by
lib/submission_serializer.rbwith lists, symbols, !ruby/object:FieldInfo object.RequestType::Validator, valid_options column must be able able to store/load YAML that contains !ruby/object:RequestType::Validator::LibraryTypeValidator