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

[CT-2174] [Regression] Package max version range throwing error #7039

Closed
2 tasks done
fivetran-joemarkiewicz opened this issue Feb 23, 2023 · 3 comments · Fixed by #7040
Closed
2 tasks done

[CT-2174] [Regression] Package max version range throwing error #7039

fivetran-joemarkiewicz opened this issue Feb 23, 2023 · 3 comments · Fixed by #7040
Labels
bug Something isn't working deps dbt's package manager regression

Comments

@fivetran-joemarkiewicz
Copy link
Contributor

Is this a regression in a recent version of dbt-core?

  • I believe this is a regression in dbt-core functionality
  • I have searched the existing issues, and I could not find an existing issue for this regression

Current Behavior

On the latest 1.4.2 version of dbt-core when installing a dbt package with the range including a range with a max of 0.10.0 you will receive an erroneous failure. For example:

packages:
   - package: fivetran/google_ads_source
     version: [">=0.9.0", "<0.10.0"]

Will result in

Version error for package fivetran/google_ads_source: Could not find a satisfactory version from options: ['>=0.9.0', '<0.10.0']

However, the latest version of fivetran/google_ads is 0.9.0 and should be fine with that version range.

If I then adjust the range to just not include 0.10.0 it will succeed:

packages:
   - package: fivetran/google_ads_source
     version: [">=0.9.0", "<0.9.9"]

Result

22:28:23  Installing fivetran/google_ads_source
22:28:24    Installed from version 0.9.0
22:28:24    Up to date!

Expected/Previous Behavior

The range would succeed with 0.10.0.

Steps To Reproduce

  1. Install the google_ads_source package with the following range
packages:
   - package: fivetran/google_ads_source
     version: [">=0.9.0", "<0.10.0"]
  1. Run dbt deps
  2. See the following error:
Version error for package fivetran/google_ads_source: Could not find a satisfactory version from options: ['>=0.9.0', '<0.10.0']

Relevant log output

Version error for package fivetran/google_ads_source: Could not find a satisfactory version from options: ['>=0.9.0', '<0.10.0']

Environment

- OS: Mac OS
- Python: 3.9.6
- dbt (working version): 1.4.1
- dbt (regression version): 1.4.2

Which database adapter are you using with dbt?

bigquery

Additional Context

Here is a slack thread where a user experienced a similar issue when trying to install the fivetran/ad_reporting package.

@github-actions github-actions bot changed the title [Regression] Package Max Version Range Throwing Error [CT-2174] [Regression] Package Max Version Range Throwing Error Feb 23, 2023
@fivetran-joemarkiewicz fivetran-joemarkiewicz changed the title [CT-2174] [Regression] Package Max Version Range Throwing Error [CT-2174] [Regression] Package max version range throwing error Feb 23, 2023
@jtcohen6
Copy link
Contributor

@fivetran-joemarkiewicz Thanks for opening!

I'm guessing this must be related somehow to the change in #6838. Taking a look

@jtcohen6
Copy link
Contributor

dbt-core/core/dbt/semver.py

Lines 154 to 158 in 5ddd408

else: # major/minor/patch, should all be numbers
if a > b:
return 1
elif a < b:
return -1

Drop a breakpoint after line 154:

            else:  # major/minor/patch, should all be numbers
                if key == "minor":
                    first = a
                    second = b
                    import ipdb; ipdb.set_trace()
ipdb> first
'9'
ipdb> second
'10'
ipdb> first > second
True

should all be numbers

let's make sure of it :)

@fivetran-joemarkiewicz
Copy link
Contributor Author

Brilliant, @jtcohen6 thanks for working so quickly to address this! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working deps dbt's package manager regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants