Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(storage-plugin): require explicit options when providing storage plugin #2100

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

arturovt
Copy link
Member

@arturovt arturovt commented Feb 19, 2024

This commit updates the implementation of the register signature for the storage plugin.
It now always requires options to be provided. We want to ensure clarity regarding the
states that we're going to serialize. When no options are provided, we implicitly provide
the @@STATE key, which defines that all states should be serialized. This implementation
doesn't compromise extendability because we implicitly rely on the internal mechanism that
transforms options. We should always require options to be provided and require developers
to specify serializable states explicitly.

This would allow us to have feature states because the feature registration mechanism would
also know if the user explicitly specified all states to be serialized at the root level or not.

Note: This change is breaking. However, it's time to make breaking changes to move forward,
as the current implementation is stale and acts as a blocker.

Copy link

nx-cloud bot commented Feb 19, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 05e965c. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 4 targets

Sent with 💌 from NxCloud.

@arturovt arturovt force-pushed the feat/storage-plugin-all branch 3 times, most recently from 8b65619 to 5d54118 Compare February 19, 2024 09:49
Copy link

bundlemon bot commented Feb 19, 2024

BundleMon (Integration Projects)

Files updated (2)
Status Path Size Limits
Main bundles(Gzip)
hello-world-ng16/dist-integration/main.(hash)
.js
65.92KB (+12B +0.02%) +1%
Main bundles(Gzip)
hello-world-ng17/dist-integration/main.(hash)
.js
67.41KB (+12B +0.02%) +1%

Total files change +24B +0.02%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@arturovt arturovt marked this pull request as ready for review February 19, 2024 09:57
Copy link
Contributor

@Carniatto Carniatto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@arturovt Should we plan to add a migration schematics to ease the impact of these breaking changes?

@arturovt arturovt force-pushed the feat/storage-plugin-all branch from 5d54118 to 4356b0a Compare February 19, 2024 20:35
@arturovt arturovt force-pushed the feat/storage-plugin-all branch from 4356b0a to 705cf3d Compare February 28, 2024 23:30
… plugin

This commit updates the implementation of the register signature for the storage plugin.
It now always requires `options` to be provided. We want to ensure clarity regarding the
states that we're going to serialize. When no `options` are provided, we implicitly provide
the `@@STATE` key, which defines that all states should be serialized. This implementation
doesn't compromise extendability because we implicitly rely on the internal mechanism that
transforms options. We should always require options to be provided and require developers
to specify serializable states explicitly.

This would allow us to have feature states because the feature registration mechanism would
also know if the user explicitly specified all states to be serialized at the root level or not.

**Note:** This change is breaking. However, it's time to make breaking changes to move forward,
as the current implementation is stale and acts as a blocker.
@arturovt arturovt force-pushed the feat/storage-plugin-all branch from 705cf3d to 05e965c Compare March 1, 2024 19:30
Copy link

codeclimate bot commented Mar 1, 2024

Code Climate has analyzed commit 05e965c and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 95.5% (0.0% change).

View more on Code Climate.

@arturovt
Copy link
Member Author

arturovt commented Mar 2, 2024

LGTM

@arturovt Should we plan to add a migration schematics to ease the impact of these breaking changes?

Yeah, I talked to @profanis .

@arturovt arturovt merged commit 6740f55 into master Mar 4, 2024
13 checks passed
@arturovt arturovt deleted the feat/storage-plugin-all branch March 4, 2024 17:24
@markwhitfeld markwhitfeld added this to the v.18.0.0 milestone Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants