`Azure/static-web-apps-deploy@v1` is ambiguous: branch `v1` and tag `v1` point to different commits (breaks Actions lockfiles)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- github-actions
- Lĩnh vực
- release
Hướng nghiên cứu
Start by inspecting the repository refs for Azure/static-web-apps-deploy, especially the v1 branch and tag, and compare the commits they identify. Decide which ref should define v1 and whether immutable SemVer tags can be published consistently. Done means the action resolves to one commit for v1 and users have an unambiguous way to pin releases.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
Azure/static-web-apps-deploy has both a branch and a tag named v1, and they point to different commits:
$ git ls-remote https://github.com/Azure/static-web-apps-deploy v1
4d27395796ac319302594769cfe812bd207490b1 refs/heads/v1 (2024-09-11)
1a947af9992250f3bc2e68ad0754c0b0c11566c9 refs/tags/v1 (2021-03-03)
The same applies to v0.0.1-preview: the branch points to 1a947af9, and the tag points to 920eddf8.
When a repository uses GitHub Actions workflow dependency lockfiles (public preview), uses: Azure/static-web-apps-deploy@v1 cannot be resolved. The job fails at "Set up job", before the deploy step runs:
##[error]Lockfile ref `v1` for `azure/static-web-apps-deploy` is ambiguous: a branch and a tag with that name point to different commits. lockfile verification did not produce a result for this action
Pinning the action to a commit SHA does not avoid this. gh actions-lock looks up the tag that points to the SHA and records ref: 'v1' in the lockfile, so the runner fails with the same error. When the lockfile is generated from scratch, gh actions-lock also rewrites @1a947af... in the workflow back to @v1.
This affects both the upload job and the close job of the default Static Web Apps workflow, so production deployments are blocked.
Also, the only tags in the repository are v0.0.1-preview and v1. There is no way to pin a specific release by tag.
To Reproduce
Steps to reproduce the behavior:
- Use the default Static Web Apps workflow (
uses: Azure/static-web-apps-deploy@v1). - Generate
.github/workflows/actions.lockwithgh actions-lock. The generated lockfile has an entry withref: 'v1'. - Trigger the workflow (push to the production branch, or open, update, or close a pull request).
- See the error above in "Set up job".
The same happens if step 1 uses Azure/static-web-apps-deploy@1a947af9992250f3bc2e68ad0754c0b0c11566c9.
Expected behavior
Azure/static-web-apps-deploy@v1 should resolve to a single commit. For example:
- Make
v1unambiguous, either by keeping only one ref namedv1or by keeping the branch and the tag on the same commit. - Publish immutable SemVer tags/releases (e.g.
v1.0.0,v1.1.0), so users can pin an exact version and lockfiles/Dependabot can track updates.
Additional context
- Our current workaround: pin the action to
1a947af9992250f3bc2e68ad0754c0b0c11566c9, which is the commit of tagv1and the commit that@v1resolved to in our runs without a lockfile. Then manually change that lockfile entry'sreffromv1tov1-self-hosted, a branch that contains this commit and has no tag with the same name. Settingrefto the SHA itself or torefs/tags/v1was rejected by the runner withinvalid lockfile pin. - This workaround is fragile. It requires editing the lockfile by hand, which the documentation tells users not to do. It depends on an unrelated branch, and regenerating the lockfile from scratch brings back
@v1/ref: 'v1'. - The lockfile documentation also says that "For repositories that adopt a lockfile, SHA pinning within workflow files is no longer necessary." It also says Dependabot "will not create alerts for actions pinned to SHA values". So we would prefer not to keep the SHA pin at all.
- The branch
v1is 28 commits ahead of the tagv1. It adds inputs such asproduction_branchandgithub_id_token, which are used in the Microsoft Learn samples (https://learn.microsoft.com/azure/static-web-apps/build-configuration). It is unclear which commit@v1is intended to reference.
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 347
- Fork
- 68
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Azure/static-web-apps
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Azure/static-web-apps#1764 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Azure/static-web-apps#1827 ·
-
Managed Functions Not RestartingĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Azure/static-web-apps#1826 · 5 bình luận · 1 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
Azure/static-web-apps#1825 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 18/100
Azure/static-web-apps#1824 ·
Tất cả issue của Azure/static-web-apps
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
dimitar-radenkov/Pointframe#362 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug documentation github_actions
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 77/100
Sh1n1230/PunctuationToggle#342 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Help-Wanted Needs-Triage Package-Update
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
microsoft/winget-pkgs#495560 ·
Maintainer thường phản hồi trong vòng 1 ngày