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

flags.THREADS defaults to None #6887

Merged
merged 3 commits into from
Feb 7, 2023

Conversation

MichelleArk
Copy link
Contributor

@MichelleArk MichelleArk commented Feb 7, 2023

resolves: N/A

Currently, threads defaults to 1 and is overriding the profile-configured threads value (because it's not None by default!)

Updates the default for --threads to None so that it only overrides the profile-configured threads value if explicitly set.

From the documentation: https://docs.getdbt.com/docs/get-started/connection-profiles#understanding-threads

You can use a different number of threads than the value defined in your target by using the --threads option when executing a dbt command.

Description

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have signed the CLA
  • I have run this code in development and it appears to resolve the stated issue

🎩 threads: 4 set in profiles.yml:

python3 core/dbt/cli/main.py run 
22:07:05  Unable to do partial parsing because a project config has changed
22:07:06  Found 7 models, 21 tests, 0 snapshots, 0 analyses, 502 macros, 0 operations, 3 seed files, 0 sources, 0 exposures, 0 metrics
22:07:06  
22:07:08  Concurrency: 4 threads (target='dev')
...

threads: 4 set in profiles.yml, --threads 1:

❯ python3 core/dbt/cli/main.py run --threads 1
22:07:18  Found 7 models, 21 tests, 0 snapshots, 0 analyses, 502 macros, 0 operations, 3 seed files, 0 sources, 0 exposures, 0 metrics
22:07:18  
22:07:22  Concurrency: 1 threads (target='dev')

cc @jtcohen6

@cla-bot cla-bot bot added the cla:yes label Feb 7, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2023

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

@MichelleArk MichelleArk marked this pull request as ready for review February 7, 2023 22:11
@MichelleArk MichelleArk requested a review from a team as a code owner February 7, 2023 22:11
@MichelleArk MichelleArk requested review from stu-k, dbeatty10, ChenyuLInx, iknox-fa and aranke and removed request for stu-k and dbeatty10 February 7, 2023 22:11
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

@ChenyuLInx ChenyuLInx added Skip Changelog Skips GHA to check for changelog file and removed Skip Changelog Skips GHA to check for changelog file labels Feb 7, 2023
@MichelleArk MichelleArk merged commit dcf6544 into feature/click-cli Feb 7, 2023
@MichelleArk MichelleArk deleted the arky/fix-threads-default branch February 7, 2023 22:15
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.

3 participants