Skip to content

chore(ENG-13226): ensuring matrix build jobs run after code validation - #348

Closed
coillteoir wants to merge 2 commits into
masterfrom
pr348
Closed

chore(ENG-13226): ensuring matrix build jobs run after code validation#348
coillteoir wants to merge 2 commits into
masterfrom
pr348

Conversation

@coillteoir

@coillteoir coillteoir commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary:
Updating CI to use ruff, and fixing lints from changes
Ensuring binaries workflow runs after code validation
Copilot AI lite review requested due to automatic review settings August 10, 2026 14:22
@coillteoir
coillteoir requested a review from a team as a code owner August 10, 2026 14:22
@coillteoir coillteoir closed this Aug 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates CI and codebase formatting/typing to align with the ruff-based toolchain and to sequence the binaries workflow behind code validation.

Changes:

  • Adds ruff lint configuration (global ignores + per-file ignores) and updates pre-commit to use ruff-format/ruff-check.
  • Refactors a large set of modules/tests for modern Python style (f-strings/.format, context-manager grouping, UTC-aware datetimes, minor simplifications).
  • Updates the binaries GitHub Actions workflow to also trigger via workflow_run after the Lint workflow completes.

Reviewed changes

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

Show a summary per file
File Description
pyproject.toml Adds ruff lint ignore configuration.
cloudsmith_cli/credential_helpers/docker/runtime.py Adjusts unknown-operation error string formatting.
cloudsmith_cli/credential_helpers/docker/installer.py Simplifies action string formatting.
cloudsmith_cli/credential_helpers/common.py Modernizes hostname/domain helpers.
cloudsmith_cli/core/tests/test_metadata.py Rewraps long expected error strings.
cloudsmith_cli/core/tests/test_keyring.py Updates tests to UTC-aware timestamps.
cloudsmith_cli/core/tests/test_keyring_provider.py Collapses nested patches into one with block.
cloudsmith_cli/core/tests/test_credential_chain_priority.py Collapses nested patches into one with block.
cloudsmith_cli/core/tests/test_cache_utils.py Assertion formatting tweaks.
cloudsmith_cli/core/rest.py Uses exc!s string formatting.
cloudsmith_cli/core/ratelimits.py Refactors string formatting + UTC reset time.
cloudsmith_cli/core/pagination.py Refactors string formatting.
cloudsmith_cli/core/mcp/server.py Typing/formatting cleanups and minor logic refactor.
cloudsmith_cli/core/keyring.py Switches keyring timestamps to UTC-aware datetimes.
cloudsmith_cli/core/download.py Simplifies filtering and selects latest via max.
cloudsmith_cli/core/credentials/oidc/exchange.py Simplifies OIDC error string formatting.
cloudsmith_cli/core/config.py Refactors CLI messaging formatting.
cloudsmith_cli/core/api/vulnerabilities.py Simplifies dict iteration.
cloudsmith_cli/core/api/upstreams.py Uses f-strings for dynamic SDK method names.
cloudsmith_cli/core/api/quota.py Refactors branching and simplifies return.
cloudsmith_cli/core/api/packages.py Uses f-strings for dynamic SDK method names.
cloudsmith_cli/cli/webserver.py Uses bare re-raise to preserve tracebacks.
cloudsmith_cli/cli/validators.py Modernizes constants/formatting and timestamp parsing.
cloudsmith_cli/cli/utils.py Refactors output formatting and error serialization.
cloudsmith_cli/cli/tests/utils.py Uses UTC-aware datetime in helper.
cloudsmith_cli/cli/tests/test_webserver.py Collapses nested patches into one with block.
cloudsmith_cli/cli/tests/test_utils.py Simplifies test parameter inputs.
cloudsmith_cli/cli/tests/test_push.py Collapses nested context managers.
cloudsmith_cli/cli/tests/conftest.py Uses f-string in skip message.
cloudsmith_cli/cli/tests/commands/test_upstream.py Uses f-strings for config names/paths.
cloudsmith_cli/cli/tests/commands/test_tokens.py Removes stray blank line.
cloudsmith_cli/cli/tests/commands/test_package_commands.py Normalizes f-string quoting.
cloudsmith_cli/cli/tests/commands/test_mcp.py Collapses nested patches into one with block.
cloudsmith_cli/cli/tests/commands/test_login.py Uses f-strings for expected output.
cloudsmith_cli/cli/tests/commands/test_entitlements.py Normalizes f-string quoting.
cloudsmith_cli/cli/tests/commands/test_credential_helper.py Import/branch refactor in helper tests.
cloudsmith_cli/cli/tests/commands/test_credential_helper_install.py Assertion formatting tweaks.
cloudsmith_cli/cli/saml.py Simplifies Authorization header creation.
cloudsmith_cli/cli/exceptions.py Refactors error/field rendering formatting and flow.
cloudsmith_cli/cli/decorators.py Refactors retry message formatting.
cloudsmith_cli/cli/config.py Adds ClassVar annotations and refactors parsing/strings.
cloudsmith_cli/cli/commands/whoami.py Collapses nested context managers.
cloudsmith_cli/cli/commands/vulnerabilities.py Collapses nested context managers.
cloudsmith_cli/cli/commands/upstream.py Refactors docstring formatting and context managers.
cloudsmith_cli/cli/commands/tokens.py Refactors token rotation flow and context managers.
cloudsmith_cli/cli/commands/tags.py Refactors imports, output strings, and context managers.
cloudsmith_cli/cli/commands/status.py Refactors output strings and context managers.
cloudsmith_cli/cli/commands/resync.py Collapses nested context managers.
cloudsmith_cli/cli/commands/repos.py Refactors output strings and context managers.
cloudsmith_cli/cli/commands/quota/quota.py Collapses nested context managers.
cloudsmith_cli/cli/commands/quota/history.py Collapses nested context managers.
cloudsmith_cli/cli/commands/quarantine.py Collapses nested context managers.
cloudsmith_cli/cli/commands/push.py Import refactor, UTC timestamps, and context-manager flattening.
cloudsmith_cli/cli/commands/policy/vulnerability.py Collapses nested context managers and refactors strings.
cloudsmith_cli/cli/commands/policy/license.py Collapses nested context managers and refactors strings.
cloudsmith_cli/cli/commands/policy/deny.py Collapses nested context managers and refactors strings.
cloudsmith_cli/cli/commands/move.py Collapses nested context managers and refactors strings.
cloudsmith_cli/cli/commands/metrics/packages.py Simplifies attribute access and context managers.
cloudsmith_cli/cli/commands/metrics/entitlements.py Simplifies attribute access and context managers.
cloudsmith_cli/cli/commands/metadata.py Refactors imports/strings and flattens context managers.
cloudsmith_cli/cli/commands/mcp.py Uses e!s in error output; refactors atomic write flow.
cloudsmith_cli/cli/commands/main.py Refactors context settings and help/epilog formatting.
cloudsmith_cli/cli/commands/login.py Refactors output strings and context managers.
cloudsmith_cli/cli/commands/list_.py Refactors output strings and context managers.
cloudsmith_cli/cli/commands/entitlements.py Refactors output strings and context managers.
cloudsmith_cli/cli/commands/download.py Refactors filter kwargs, context managers, typing.
cloudsmith_cli/cli/commands/dependencies.py Refactors output strings and context managers.
cloudsmith_cli/cli/commands/delete.py Refactors output strings and context managers.
cloudsmith_cli/cli/commands/copy.py Collapses nested context managers and refactors strings.
cloudsmith_cli/cli/commands/check.py Collapses nested context managers and refactors strings.
cloudsmith_cli/cli/commands/auth.py Tweaks owner string normalization.
cloudsmith_cli/cli/command.py Simplifies JSON-output flag detection and help alias handling.
.pre-commit-config.yaml Replaces black/flake8/isort/pylint hooks with ruff hooks.
.github/workflows/binaries.yml Adds workflow_run trigger after Lint completes.
.github/scripts/check_wheel.py Minor comprehension simplification and spacing.
Suppressed comments (1)

cloudsmith_cli/core/api/quota.py:59

  • quota_history() can leave res/headers undefined when the SDK client does not expose the expected *_with_http_info method (you already guard with hasattr). In that case ratelimits.maybe_rate_limit(client, headers) will raise UnboundLocalError. Initialize defaults before the conditional so the function behaves predictably when the method is missing.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 81 to +84
if token_refreshed_at:
return token_refreshed_at < (datetime.utcnow() - timedelta(minutes=30))
return token_refreshed_at < (
datetime.now(tz=timezone.utc) - timedelta(minutes=30)
)
Comment on lines +140 to +141
if value and len(value) < minimum or maximum and len(value) > maximum:
value = None
Comment on lines +30 to +34
elif not oss and hasattr(client, "quota_read_with_http_info"):
with catch_raise_api_exception():
res, _, headers = client.quota_read_with_http_info(
owner=owner, **api_kwargs
)
Comment on lines 3 to +8
on:
workflow_run:
workflows:
- 'Lint'
types:
- completed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants