Skip to content

Add new config option :use_yaml_unsafe_load - #1051

Merged
andrykonchin merged 3 commits into
masterfrom
ak/add-yaml-related-config-options
Oct 2, 2026
Merged

andrykonchin merged 3 commits into
masterfrom
ak/add-yaml-related-config-options

Conversation

@andrykonchin

@andrykonchin andrykonchin commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Adds two new configuration options: use_yaml_unsafe_load and yaml_permitted_classes. They control how YAML-serialized fields are deserialized (YAML.unsafe_load vs. YAML.safe_load).

These options mirror ActiveRecord's configuration in Rails:

Previously, safe loading was unconditionally used on Ruby >= 3.1 with a hardcoded list of permitted classes ([Symbol, Set, Date, Time, DateTime]). Deserialization is now fully configurable while preserving the existing defaults for complete backward compatibility.

Previous PR - #889, #757.

@andrykonchin
andrykonchin force-pushed the ak/add-yaml-related-config-options branch from 2e42a23 to 6701257 Compare October 2, 2026 21:07
@andrykonchin
andrykonchin force-pushed the ak/add-yaml-related-config-options branch from 6701257 to 5ec08de Compare October 2, 2026 22:22
@andrykonchin
andrykonchin force-pushed the ak/add-yaml-related-config-options branch from 5ec08de to a0a5d92 Compare October 2, 2026 22:32
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

Code Coverage

Package Line Rate Health
dynamoid 93% ➖
Summary 93% (4151 / 4462) ➖

Minimum allowed line rate is 90%

@codecov

codecov Bot commented Oct 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.77778% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.03%. Comparing base (ebde2e2) to head (a0a5d92).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
lib/dynamoid/undumping.rb 71.42% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1051      +/-   ##
==========================================
- Coverage   93.07%   93.03%   -0.05%     
==========================================
  Files          84       84              
  Lines        4449     4462      +13     
==========================================
+ Hits         4141     4151      +10     
- Misses        308      311       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@andrykonchin
andrykonchin merged commit 313dc75 into master Oct 2, 2026
80 of 82 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant