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 exception when version is missing when installing from the Hub package index #10049

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dbeatty10
Copy link
Contributor

@dbeatty10 dbeatty10 commented Apr 25, 2024

resolves #10048

Problem

When version is missing, it raises an exception that spits out an ugly stacktrace.

This is because the Python here will fail when version is completely missing:

if not package["version"]:

It looks like the tests in the original implementation (#5812) weren't covering this case.

Solution

Allow it to be completely missing so we can raise the appropriate error message.

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • Tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc)

@cla-bot cla-bot bot added the cla:yes label Apr 25, 2024
@dbeatty10 dbeatty10 marked this pull request as ready for review April 25, 2024 23:44
@dbeatty10 dbeatty10 requested a review from a team as a code owner April 25, 2024 23:44
Copy link

codecov bot commented Apr 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.16%. Comparing base (bcbde3a) to head (63c6dad).
Report is 224 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10049      +/-   ##
==========================================
- Coverage   88.22%   88.16%   -0.06%     
==========================================
  Files         181      181              
  Lines       22643    22643              
==========================================
- Hits        19976    19963      -13     
- Misses       2667     2680      +13     
Flag Coverage Δ
integration 85.46% <100.00%> (-0.13%) ⬇️
unit 62.31% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jtcohen6
Copy link
Contributor

jtcohen6 commented May 2, 2024

@dbeatty10 Thank you, this is better!

(Future enhancement, out of scope here: if version is missing, assume it means "unbounded," the same as >=0.0.1)

Copy link
Contributor

This PR has been marked as Stale because it has been open with no activity as of late. If you would like the PR to remain open, please comment on the PR or else it will be closed in 7 days.

@github-actions github-actions bot added stale Issues that have gone stale and removed stale Issues that have gone stale labels Oct 30, 2024
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.

[Bug] packages.yml missing version gives an error
2 participants