Skip to content

Update zwik client to handle obsolete and unsafe packages#8

Merged
jdmarques merged 12 commits into
zwikdev:mainfrom
rudispr:update_zwik_client_to_handle_obsolete_and_unsafe_packages
Mar 26, 2026
Merged

Update zwik client to handle obsolete and unsafe packages#8
jdmarques merged 12 commits into
zwikdev:mainfrom
rudispr:update_zwik_client_to_handle_obsolete_and_unsafe_packages

Conversation

@rudispr
Copy link
Copy Markdown
Contributor

@rudispr rudispr commented Mar 16, 2026

  • Update tests

This comment was marked as outdated.

Comment thread scripts/zwik_client.py Outdated
Comment thread scripts/zwik_client.py Outdated
Comment thread scripts/zwik_client.py Outdated
Comment thread scripts/zwik_client.py Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Zwik client’s handling of packages coming from obsolete/unsafe labeled channels, shifting from persisting per-package labels in the lockfile to re-discovering labeled packages at install time and enforcing/suggesting YAML “CAUTION” comments. It also introduces a new YAML hashing strategy with a backward-compatible legacy-hash fallback when validating older lockfiles.

Changes:

  • Update YAML hashing: new normalized hash for channels/dependencies plus a legacy-hash fallback for lockfiles created by versions <= 5.16.
  • Remove writing/reading labels metadata in lockfiles; detect obsolete/unsafe packages via channel lookups and enforce unsafe-package comments.
  • Update tests to reflect the new behavior (warnings/errors driven by YAML comments rather than lockfile labels).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
scripts/zwik_client.py Implements new YAML hashing + legacy fallback, removes lockfile labels, and changes obsolete/unsafe resolution/enforcement behavior in lockfile creation and env creation.
tests/test_labels.py Adjusts tests for new obsolete/unsafe behavior, including comment-based unsafe override and warning expectations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/zwik_client.py Outdated
Comment thread scripts/zwik_client.py
Comment thread tests/test_labels.py Outdated
Comment thread tests/test_labels.py Outdated
rudispr added 2 commits March 18, 2026 10:39
…n replaces the CAUTION comments for unsafe packages. Update relevant tests.
Comment thread scripts/zwik_client.py
Comment thread scripts/zwik_client.py Outdated
Comment thread scripts/zwik_client.py Outdated
rudispr added 2 commits March 24, 2026 13:42
…ise CondaError if env_data does not exists when yaml_hash is calculated.
Comment thread scripts/zwik_client.py Outdated
Comment thread scripts/zwik_client.py Outdated
Comment thread scripts/zwik_client.py Outdated
Comment thread scripts/zwik_client.py
Comment thread scripts/zwik_client.py Outdated
Comment thread scripts/zwik_client.py Outdated
Comment thread scripts/zwik_client.py
@jdmarques jdmarques self-requested a review March 26, 2026 11:23
@jdmarques jdmarques merged commit 47f3d11 into zwikdev:main Mar 26, 2026
3 checks passed
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.

4 participants