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

BUG: our contributor build is currently broken (this is likely a pyosmeta bug) #560

Open
lwasser opened this issue Feb 12, 2025 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@lwasser
Copy link
Member

lwasser commented Feb 12, 2025

We have a but in our contributor build here that is causing it to fail.

https://github.com/pyOpenSci/pyopensci.github.io/actions/runs/13272538893/job/37055135801

@lwasser lwasser added the bug Something isn't working label Feb 12, 2025
@pllim
Copy link
Contributor

pllim commented Feb 12, 2025

I don't wanna go too deep but I think this is the path I dug up

https://github.com/pyOpenSci/pyosMeta/blob/0baa1542d436320bfce6299d59c7263aa4a5a8d1/src/pyosmeta/parse_issues.py#L436

Processing review EarthPy: Software Submission for Review
    reviews[pkg_name].gh_meta = pkg_meta[pkg_name]
  File "pydantic/main.py", line 922, in __setattr__
    self.__pydantic_validator__.validate_assignment(self, name, value)
pydantic_core._pydantic_core.ValidationError: 1 validation error for ReviewModel
gh_meta.description
  Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.10/v/string_type

Without actually running the stuff locally, I cannot tell if it is trying to parse

description: A package built to support working with spatial data using open
source python
, pyOpenSci/software-submission#3 , or a file from https://github.com/earthlab/earthpy

@pllim
Copy link
Contributor

pllim commented Feb 12, 2025

@lwasser
Copy link
Member Author

lwasser commented Feb 12, 2025

Based on that field gh_meta.description the gh_meta object is what we use to grab metadata for each package! You are correct; it's something associated with validating that field!! Thank you for looking into it. The actual description l ooks ok on the package

https://github.com/earthlab/earthpy

We should actually also sunset Earthpy as it's no longer maintained.
@banesullivan when you work on this let's also archive earthpy! but fix the bug first as it could come up again!

@pllim
Copy link
Contributor

pllim commented Feb 12, 2025

The pydantic error message could have been more verbose but that is neither here nor there... 😅

@lwasser
Copy link
Member Author

lwasser commented Feb 13, 2025

🤣 posmeta has a few features like this
This is a new one. The other one that is my favorite is if your token isn't setup properly it just quietly runs and does nothing.
🙃

I'm sure there are other gems in the code too.

@banesullivan
Copy link
Contributor

banesullivan commented Feb 15, 2025

I've landed a hotfix for this in pyOpenSci/pyosMeta#257, below are my notes from this incident

Sequence of Events

  • Moritz reports issue with package not showing up on website
  • Leah responds assuming a build just needs to be triggered
  • Moritz attempts to run update and notices several warnings
  • Leah provides reasurance warnings are normal
  • Leah then notices that the thztools author deleted one of the YAML headings so it couldn’t be parsed (BUG TO ADDRESS?). Leah manually fixed the review and reran.
  • Moritz suggests a daily cron job to help narrow down these errors sooner

Issue opened here for CI failure. Problem has been around for ~2 weeks at this point

Processing review EarthPy: Software Submission for Review
    reviews[pkg_name].gh_meta = pkg_meta[pkg_name]
  File "pydantic/main.py", line 922, in __setattr__
    self.__pydantic_validator__.validate_assignment(self, name, value)
pydantic_core._pydantic_core.ValidationError: 1 validation error for ReviewModel
gh_meta.description
  Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.10/v/string_type
  • Problem package is thought to be EarthPy
  • Leah mentions we should archive EarthPy as well (comment)
  • Leah also mentions that pyosmeta will silently fail if the github token is missing
  • Bane starts investigating
  • The failure is coming from the get_gh_metrics step of the src/pyosmeta/cli/process_reviews.py script
  • EarthPy is not the problem, it just happens to be the last printed in the previous parse_issues step.
  • Adding logs to the get_gh_metrics funstion show the problem package to be astrodata
  • The issue is in process_repo_meta returning None for the description. If we look at astrodata's GitHub page there indeed is no description. This is something our parsers should handle

Immediate To Do's

  • Fix validation issue and see if we can make the validation errors more verbose/meaningful
  • Archive EarthPy
  • Make sure pyosmeta errors when token is missing per Leah's comment. I looked into this and of the few ways I misconfigured my token, the script failed with an appropriate error message regarding the token

Follow Up To Do's

We should probably open seperate issues for some of these

  • We should use tqdm for progress monitoring since we have a lot of print outs
  • A good number of warnings are thrown, let's define a custom warning type and make sure its clear what's a problem and what's okay.
  • Make sure a missing "community partnerships" section is tested
  • Can we set up a Slack Alert that pings us any time the build is failing like this?
  • Address what went wrong with thztools and see if we can gracefully handle it - The One-Line Description of Package: field label was removed and it hust had the description

@pllim
Copy link
Contributor

pllim commented Feb 15, 2025

Thanks! Does something else still need to run after the fix because I still don't see the new package listed under Astropy page.

@pllim
Copy link
Contributor

pllim commented Feb 15, 2025

P.s. Astropy tried the Slack thingy years ago but it didn't work. Slack has GitHub app but it's for issues, not workflows. Might be something new now so maybe worth checking their app selections again.

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

No branches or pull requests

3 participants