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

Snow 1703629 log pip error message #1701

Merged
merged 8 commits into from
Oct 10, 2024

Conversation

sfc-gh-pczajka
Copy link
Contributor

@sfc-gh-pczajka sfc-gh-pczajka commented Oct 10, 2024

Pre-review checklist

  • I've confirmed that instructions included in README.md are still correct after my changes in the codebase.
  • I've added or updated automated unit tests to verify correctness of my new code.
  • I've added or updated integration tests to verify correctness of my new code.
  • I've confirmed that my changes are working by executing CLI's commands manually on MacOS.
  • I've confirmed that my changes are working by executing CLI's commands manually on Windows.
  • I've confirmed that my changes are up-to-date with the target branch.
  • I've described my changes in the release notes.
  • I've described my changes in the section below.

Changes description

Add pip error details to logs.
Small refactor of download_unavailable_packages (raise exception earlier, as all usages were immediately raising in case succeded==False)

@sfc-gh-pczajka sfc-gh-pczajka requested a review from a team as a code owner October 10, 2024 13:25
f"pip wheel finished with error code {result.returncode}. Please re-run with --verbose or --debug for more details."
)
else:
log.info("Pip wheel command executed successfully")
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want spam this message?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I kept that as I liked the log consistency - "running pip" -> "pip error" or "running pip" -> "pip success", no strong opinion though

Comment on lines 236 to 239
f"pip wheel finished with error code {result.returncode}. Please re-run with --verbose or --debug for more details."
)
else:
log.info("Pip wheel command executed successfully")
Copy link
Contributor

Choose a reason for hiding this comment

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

Please decide on one version 😄 pip wheel vs Pip wheel.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

pip wheel, fixed

@pytest.mark.integration
def test_incorrect_input(self, runner):
# TODO: refactor snowpark, so pip error is always thrown
Copy link
Contributor

Choose a reason for hiding this comment

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

For who is this TODO? Do we want to create jira ticket for it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, it was for me from the morning, changes are already applied. Removed :D

@sfc-gh-pczajka sfc-gh-pczajka merged commit 8f54f47 into main Oct 10, 2024
21 checks passed
@sfc-gh-pczajka sfc-gh-pczajka deleted the SNOW-1703629-log-pip-error-message branch October 10, 2024 15:03
sfc-gh-mraba pushed a commit that referenced this pull request Oct 14, 2024
* Add test

* implement fix

* move test to integration

* refactor

* Fix tests

* update release notes

* review fixes
sfc-gh-mraba pushed a commit that referenced this pull request Oct 14, 2024
* Add test

* implement fix

* move test to integration

* refactor

* Fix tests

* update release notes

* review fixes
sfc-gh-mraba pushed a commit that referenced this pull request Oct 14, 2024
* Add test

* implement fix

* move test to integration

* refactor

* Fix tests

* update release notes

* review fixes
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.

2 participants