Skip to content

Y26-176 - Address potential serialisation issues with submission templates #5828

@StephenHulme

Description

@StephenHulme

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions