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

Core: Fix decorator context update #15408

merged 2 commits into from Jun 29, 2021

Core: Fix decorator context update #15408

merged 2 commits into from Jun 29, 2021


Copy link

@tmeasday tmeasday commented Jun 29, 2021

Issue: #15400

Previously we always passed the combination of the original context and the previous decorator's passed arguments into the next decorator.

That meant if an earlier decorator set something on the context, it would get lost by the time it reached the story.

What I did

Updated the "decorator with context store" so that the context store keeps getting updated after each decorator along the chain.

How to test

PR includes a jest test and a story that demonstrate the behaviour

tmeasday added 2 commits Jun 29, 2021
As each decorator runs, we need to keep updating the "context store" to include the partial update that potentially was passed.
@tmeasday tmeasday requested a review from shilman Jun 29, 2021
Copy link

@nx-cloud nx-cloud bot commented Jun 29, 2021

Nx Cloud Report

CI ran the following commands for commit 66b12b8. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch

Status Command
#000000 nx run-many --target=prepare --all --parallel --max-parallel=15

Sent with 💌 from NxCloud.

Copy link

@shilman shilman left a comment

LGTM -- tricky!

@shilman shilman changed the title Ensure we keep passing updating context through decorators Core: Fix decorator context update Jun 29, 2021
@shilman shilman merged commit 55321f9 into next Jun 29, 2021
40 of 47 checks passed
@shilman shilman deleted the 15400-decorators-pass-context branch Jun 29, 2021
@shilman shilman added the picked label Jun 29, 2021
shilman added a commit that referenced this issue Jun 29, 2021
@shilman shilman added this to the 6.4 PRs milestone Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants