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 incorrect commands registration in test of docs generation #2011

Closed
wants to merge 1 commit into from

Conversation

sfc-gh-pjob
Copy link
Contributor

@sfc-gh-pjob sfc-gh-pjob commented Jan 21, 2025

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

  • Fixed flaky test of docs generation.
  • app_context_holder.app_context = click.get_current_context() from cli_app.py is not invoked when snow --help is used because --help is eager option causing CLI exit before the line called. As the result side effects from previous tests were still visible in app_context_holder.app_context and caused issues in test_docs_generation_output tests. I changed snow --help to just snow.
  • This is only a patch which does not resolve the root cause of issue - command registration state shared by tests. This will be improved in SNOW-1747456.

@sfc-gh-pjob sfc-gh-pjob marked this pull request as ready for review January 21, 2025 16:24
@sfc-gh-pjob sfc-gh-pjob requested a review from a team as a code owner January 21, 2025 16:24
@sfc-gh-pjob
Copy link
Contributor Author

Closing in favour of #1945

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.

1 participant