Skip to content

RSDK-8440: fix license finder #706

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

Merged

Conversation

purplenicole730
Copy link
Member

@purplenicole730 purplenicole730 commented Aug 12, 2024

Based on the available logs, this workflow has been failing for at least 3 months. Before that, the git logs have been removed, so we're not sure when the failure started.

license_finder has some issues with Python version 3.12, so now the workflow is using 3.11.5.
In the workflow, the command to run license_finder was changed so that errors fail the workflow instead of letting it succeed.

Things I tried that didn't work, wasn't the best solution, or introduced more errors:

  • pip install six doesn't change anything
  • pip install pip==22.0 introduces another error
  • pip install pip==23.0 introduces another error
  • pip install pip==20.0.2 introduces another error
  • pip install pip==9.0.0 introduces another error
  • curl -sS https://bootstrap.pypa.io/get-pip.py | python3 doesn't change anything
  • python version 3.11 doesn't change anything
  • pip install pyenv doesn't change anything
  • /opt/hostedtoolcache/Ruby/*/x64/lib/ruby/gems/*/gems/license_finder-*/bin/license_finder_pip.py requirements.txt doesn't actually run license_finder
  • poetry run license_finder --python-version=3 fails even after using python v3.11.5
  • poetry run license_finder fails even after using python v3.11.5

@purplenicole730 purplenicole730 changed the title RSDK-8440-fix-license-finder RSDK-8440: fix license finder Aug 12, 2024
@purplenicole730 purplenicole730 marked this pull request as ready for review August 13, 2024 21:24
@purplenicole730 purplenicole730 requested a review from a team as a code owner August 13, 2024 21:24

- name: Run license finder
run: |
poetry run license_finder --python-version=3
/opt/hostedtoolcache/Ruby/*/x64/lib/ruby/gems/*/gems/license_finder-*/bin/license_finder_pip.py requirements.txt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to invoke this via python3. It looks like in the failed jobs it's python3 /path/to/license_finder_pip.py /path/to/requirements.txt, and in successful runs in other SDKs the output is different from here (it should say All dependencies are approved for use).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me try that!

Copy link
Member Author

@purplenicole730 purplenicole730 Aug 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're absolutely right about the expected output! Using python3 was not the method since the problem was the script itself, so I fixed it. Thanks for catching that!

Copy link
Member

@stuqdog stuqdog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Looks good and the license_finder check succeeds 🎉

@purplenicole730 purplenicole730 merged commit df753cb into viamrobotics:main Aug 15, 2024
12 checks passed
@purplenicole730 purplenicole730 deleted the RSDK-8440-fix-license-finder branch August 15, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants