Navigation Menu

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
merged 2 commits into from Jun 29, 2021
Merged

Conversation

tmeasday
Copy link
Member

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

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 June 29, 2021 05:51
@nx-cloud
Copy link

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.

@tmeasday tmeasday added bug core patch:yes Bugfix & documentation PR that need to be picked to main branch labels Jun 29, 2021
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

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
@shilman shilman deleted the 15400-decorators-pass-context branch June 29, 2021 08:29
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Jun 29, 2021
shilman added a commit that referenced this pull request 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
Labels
bug core patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants