Skip to content

Conversation

@sfc-gh-jwilkowski
Copy link
Contributor

@sfc-gh-jwilkowski sfc-gh-jwilkowski commented Jun 2, 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

https://snowflakecomputing.atlassian.net/browse/SNOW-2131951

@sfc-gh-jwilkowski sfc-gh-jwilkowski force-pushed the jw/SNOW-2131951-less-freqent-update-messages branch from 05ba6aa to b476470 Compare June 4, 2025 10:56
@sfc-gh-jwilkowski sfc-gh-jwilkowski marked this pull request as ready for review June 4, 2025 12:15
@sfc-gh-jwilkowski sfc-gh-jwilkowski requested a review from a team as a code owner June 4, 2025 12:15
except: # anything, this it not crucial feature
return None

def was_warning_shown_recently(self) -> bool:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd separate this logic from _VersionCache - I imagine this class as a layer for reading/writing the cache file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What would you suggest instead? I agree that the original intent of _VersionCache was probably to not hit pypi too often, but our requirements have changed. If we were very strict, the info when upgrade message was last displayed could go to another file, but that seems to be adding more complexity if you ask me. After all _last_time_shown is also related to the functionality of displaying version upgrade message, so I'd rather have that in a single file instead of worrying about management of another file.

Copy link
Collaborator

Choose a reason for hiding this comment

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

How about returning last_time_shown: Optional[int] and doing a comparison with a constant in get_new_version_msg?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, that sounds like a good idea 👌

@sfc-gh-jwilkowski sfc-gh-jwilkowski force-pushed the jw/SNOW-2131951-less-freqent-update-messages branch from f36e526 to 058a39e Compare June 4, 2025 13:32
sfc-gh-astus
sfc-gh-astus previously approved these changes Jun 5, 2025
@sfc-gh-jwilkowski sfc-gh-jwilkowski force-pushed the jw/SNOW-2131951-less-freqent-update-messages branch 2 times, most recently from fd21b2e to 9aba625 Compare June 6, 2025 08:18
@sfc-gh-jwilkowski sfc-gh-jwilkowski force-pushed the jw/SNOW-2131951-less-freqent-update-messages branch from 9aba625 to 9619c55 Compare June 6, 2025 08:26
@sfc-gh-jwilkowski sfc-gh-jwilkowski merged commit 8f2ea79 into main Jun 9, 2025
22 checks passed
@sfc-gh-jwilkowski sfc-gh-jwilkowski deleted the jw/SNOW-2131951-less-freqent-update-messages branch June 9, 2025 08:23
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.

4 participants