Skip to content

Conversation

alvarolopez
Copy link
Member

Fix serialization of fields, using correct method (i.e. JSON serialization always).

@alvarolopez alvarolopez force-pushed the fix/113 branch 5 times, most recently from 7fe2968 to 5077ad2 Compare May 26, 2023 09:03
@alvarolopez
Copy link
Member Author

@aidaph I have created in this branch some tests for the Cloud and IP records, we should implement them also for the accelerators and the storage records...

@codecov
Copy link

codecov bot commented May 29, 2023

Codecov Report

❗ No coverage uploaded for pull request base (master@7b8bbfe). Click here to learn what that means.
Patch has no changes to coverable lines.

❗ Current head 681c50b differs from pull request most recent head 9667bfc. Consider uploading reports for the commit 9667bfc to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #117   +/-   ##
=========================================
  Coverage          ?   51.29%           
=========================================
  Files             ?       23           
  Lines             ?     1084           
  Branches          ?      117           
=========================================
  Hits              ?      556           
  Misses            ?      520           
  Partials          ?        8           

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@alvarolopez alvarolopez force-pushed the fix/113 branch 4 times, most recently from 80e054c to dd230f5 Compare June 6, 2023 08:03
The `dict` method of the records are, by design, meant to just conver
the record to a dictionary, without converting data types. If we want to
serialize the records correcty, as we are doing when generating the SSM
records, we need to rely on serialization. See [1] for more context.

[1]: pydantic/pydantic#5155 (comment)

Fixes: #113
SemVer: bugfix
Include missing fields in CloudRecord when being rendered (i.e. remove
the `exlude_unset` argument when exporting, and remove versions from
rendering.

Fixes: #118
SemVer: bufgix
@alvarolopez alvarolopez linked an issue Jun 7, 2023 that may be closed by this pull request
Instead of rendering the individual records in the SSM messenger, the
records classes must now implement a `ssm_message` method that provides
an export of the mode, with correct serialized values for each field,
that the SSM messenger will append to a SSM message.
@alvarolopez alvarolopez merged commit fb37c0a into master Jun 7, 2023
@alvarolopez alvarolopez deleted the fix/113 branch June 7, 2023 08:01
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.

cASO does not fill the CloudType field in CloudRecords Block storage reported in GBytes instead of Bytes Increase unit testing coverage

2 participants