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

Fix macro modified from previous state #4820

Merged
merged 3 commits into from
Mar 7, 2022
Merged

Conversation

stu-k
Copy link
Contributor

@stu-k stu-k commented Mar 3, 2022

resolves #4678

Description

Previously, if the first node selected by state:modified had multiple dependencies, the first of which had not been changed, the rest of the macro dependencies of the node would not be checked for changes. This commit fixes this behavior, so the remainder of the macro dependencies of the node will be checked as well.

Checklist

  • I have signed the CLA
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the CHANGELOG.md and added information about my change

Previously, if the first node selected by state:modified had multiple
dependencies, the first of which had not been changed, the rest of the
macro dependencies of the node would not be checked for changes. This
commit fixes this behavior, so the remainder of the macro dependencies
of the node will be checked as well.
@stu-k stu-k requested a review from a team March 3, 2022 19:34
@stu-k stu-k requested a review from a team as a code owner March 3, 2022 19:34
@cla-bot cla-bot bot added the cla:yes label Mar 3, 2022
Copy link
Contributor

@ChenyuLInx ChenyuLInx left a comment

Choose a reason for hiding this comment

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

LGTM! Newly added test would fail without the fix added so we know this fixed the issue.

core/dbt/graph/selector_methods.py Outdated Show resolved Hide resolved
@stu-k stu-k merged commit c45147f into main Mar 7, 2022
@stu-k stu-k deleted the stu/CT-231-macro-state-modfied branch March 7, 2022 14:24
@stu-k stu-k added the backport 1.0.latest Tag for PR to be backported to the 1.0.latest branch label Mar 7, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2022

The backport to 1.0.latest failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-1.0.latest 1.0.latest
# Navigate to the new working tree
cd .worktrees/backport-1.0.latest
# Create a new branch
git switch --create backport-4820-to-1.0.latest
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick --mainline 1 c45147fe6d31a2cd8e4d6f06f313053cb27883f1
# Push it to GitHub
git push --set-upstream origin backport-4820-to-1.0.latest
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-1.0.latest

Then, create a pull request where the base branch is 1.0.latest and the compare/head branch is backport-4820-to-1.0.latest.

stu-k added a commit that referenced this pull request Mar 7, 2022
* Fix macro modified from previous state

Previously, if the first node selected by state:modified had multiple
dependencies, the first of which had not been changed, the rest of the
macro dependencies of the node would not be checked for changes. This
commit fixes this behavior, so the remainder of the macro dependencies
of the node will be checked as well.
stu-k added a commit that referenced this pull request Mar 7, 2022
* Fix macro modified from previous state

Previously, if the first node selected by state:modified had multiple
dependencies, the first of which had not been changed, the rest of the
macro dependencies of the node would not be checked for changes. This
commit fixes this behavior, so the remainder of the macro dependencies
of the node will be checked as well.
stu-k added a commit that referenced this pull request Mar 9, 2022
* Fix macro modified from previous state

Previously, if the first node selected by state:modified had multiple macro
dependencies, the first of which had not been changed, the rest of the
macro dependencies of the node would not be checked for changes. This
commit fixes this behavior, so the remainder of the macro dependencies
of the node will be checked as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.0.latest Tag for PR to be backported to the 1.0.latest branch cla:yes
Projects
None yet
2 participants