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

Log missing or non-string RepodataState items at debug level instead … #13151

Merged
merged 3 commits into from
Sep 26, 2023

Conversation

dholth
Copy link
Contributor

@dholth dholth commented Sep 26, 2023

…of warning

Description

This can be triggered by the server not returning an Etag header or by another *.info.json-writer (does mamba use the new extension?) for example. Log at debug level.

@dholth dholth requested a review from a team as a code owner September 26, 2023 14:31
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Sep 26, 2023
@kenodegard kenodegard changed the base branch from main to 23.9.x September 26, 2023 14:34
@dholth dholth enabled auto-merge (squash) September 26, 2023 14:40
@jezdez jezdez changed the title log missing or non-string RepodataState items at debug level instead … Log missing or non-string RepodataState items at debug level instead … Sep 26, 2023
@@ -468,7 +468,7 @@ def __setitem__(self, key: str, item: Any) -> None:
if key in self._aliased:
key = key[1:] # strip underscore
if key in self._strings and not isinstance(item, str):
log.warn(f'Replaced non-str RepodataState[{key}] with ""')
log.debug('Replaced non-str RepodataState[%s] with ""', key)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This form doesn't perform the substitution unless debug logs are enabled. Not exactly a hot path but why not?

@dholth dholth merged commit 129ad9b into 23.9.x Sep 26, 2023
67 checks passed
@dholth dholth deleted the etag-debug-not-warning branch September 26, 2023 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed [bot] added once the contributor has signed the CLA
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

5 participants