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 error thrown when updating dependencies in poetry non-package mode #9400

Merged
merged 2 commits into from Apr 26, 2024

Conversation

ewilliamson-patreon
Copy link
Contributor

@ewilliamson-patreon ewilliamson-patreon commented Apr 1, 2024

fixes #9399

When we have package-mode=false the name field in pyproject.toml is optional.

Before this change, that means when we test library? we will get an error

2024/04/01 14:34:23 ERROR <job_808235580> undefined method `downcase' for nil:NilClass
updater | 
updater |         name.downcase.gsub(/[-_.]+/, "-").gsub(extras_regex, "")
updater |             ^^^^^^^^^

because the nil is passed down.

Verification

Added a test for this behavious that failed before this change.

After this change we early out on a nil name (because the only situation with a nil name is package-mode=false)

Other Changes

Unfortunately had to modify the existing package-mode=false specfile as the python dependency version with || would throw errors in parsing the python dependency, so will need to be fixed separatly

Gem::Requirement::BadRequirementError:
       Illformed requirement [">= 3.6 || ^3.7"]
```https://gist.github.com/ewilliamson-patreon/142c18532ef04f919f79819af65c4949


@ewilliamson-patreon ewilliamson-patreon changed the title Fix error thrown then updating dependencies in poetry non-package mode Fix error thrown when updating dependencies in poetry non-package mode Apr 1, 2024
@ewilliamson-patreon ewilliamson-patreon marked this pull request as ready for review April 1, 2024 16:12
@ewilliamson-patreon ewilliamson-patreon requested a review from a team as a code owner April 1, 2024 16:12
Fix an error with a nil name (due to being optional in package-mode=false) breaking depedebot when we do the library check
@thavaahariharangit thavaahariharangit merged commit 60337fc into dependabot:main Apr 26, 2024
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Poetry non package mode cannot update dependencies
2 participants