Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

publish.yml: the TestPyPI verification step is unreachable (and installs the wrong package name)

Đang mở Phù hợp với người mới
#242 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
62/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
bash, github-actions, python, yaml
Lĩnh vực
ci-cd, release

Hướng nghiên cứu

Bắt đầu từ .github/workflows/publish.yml: job verify-built-dist có hai bước (Publish package to TestPyPI và Check uploaded package) được điều kiện hóa bởi github.event_name == 'push', trong khi workflow chỉ được kích hoạt bởi release và workflow_dispatch. Hãy xác nhận rằng các bước này bị bỏ qua trong mọi lần chạy, sau đó sửa dòng cài đặt đang nêu sai tên gói ('de' thay vì xarray-sql). Hoàn thành khi điều kiện đã được sửa, hoặc các bước được thay bằng cài đặt wheel cục bộ và kiểm tra import, đồng thời job thực sự chạy kiểm tra đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Found while modelling ddx's PyPI publish workflow on this one — thanks for the reference implementation, it was genuinely useful. Two things in publish.yml that look unintended.

The TestPyPI verification never runs

publish.yml triggers on:

on:
  release:
    types: [published]
  workflow_dispatch:

but both steps in verify-built-dist are gated on a push:

      - name: Publish package to TestPyPI
        if: github.event_name == 'push'          # L186
      - name: Check uploaded package
        if: github.event_name == 'push'          # L190

github.event_name can only ever be release or workflow_dispatch here, so both steps are skipped on every run. The job succeeds without doing anything, which means the whole verify-before-publish safety net is quietly absent — the first real exercise of a wheel is when a user installs it from PyPI.

The install check names the wrong package

Line 193, inside that same (unreachable) step:

uv pip install --extra-index-url https://test.pypi.org/simple --upgrade de

de looks like a truncated xarray-sql. So even once the gate is fixed, the check would install some unrelated package and the import xarray_sql on the next line would pass or fail for reasons unconnected to the build.

Suggestion

Either drop the TestPyPI round trip, or make it reachable — and consider verifying the artifact locally instead, which needs no second index and no token:

      - name: Install the built wheel and exercise it
        run: |
          uv venv --python 3.10
          uv pip install --no-index --find-links dist xarray-sql
          uv run python -c "import xarray_sql; print(xarray_sql.__version__)"

That runs on every trigger, catches a wheel that builds but does not import, and cannot be skipped by a stale event-name condition. A bad PyPI release can only be yanked, never replaced, so this is the last cheap place to catch one.

Happy to send a PR if useful.

Ngôn ngữ chính
Python
Star
142
Fork
19
Merge trung bình
1 ngày 9 giờ
Pull request đã merge (30 ngày)
10

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của xqlsystems/xarray-sql

Tất cả issue của xqlsystems/xarray-sql

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.