Static external IP sample entry point passes invalid keyword arguments
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
- 88/100
Hướng nghiên cứu
Bắt đầu với compute/client_library/recipes/instances/ip_address/assign_static_external_ip_to_new_vm.py và phiên bản tương ứng được tạo tại compute/client_library/snippets/instances/ip_address/assign_static_external_ip_to_new_vm.py. Kiểm tra entry point của dòng lệnh và chạy kiểm tra mypy được báo cáo hoặc sample để xác nhận rằng lệnh gọi sử dụng đối số được hàm chấp nhận; được xem là hoàn tất khi sample được tạo không còn báo các lỗi keyword và có thể chạy qua bước xác thực đối số.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
In which file did you encounter the issue?
compute/client_library/recipes/instances/ip_address/assign_static_external_ip_to_new_vm.pycompute/client_library/snippets/instances/ip_address/assign_static_external_ip_to_new_vm.py
Did you change the file? If so, how?
No.
Describe the issue
The command-line entry point calls assign_static_external_ip_to_new_vm with external_ipv4 and external_access keyword arguments, but the function accepts a single ip_address argument. The generated snippet and its source recipe contain the same incorrect call.
Static reproduction:
compute\\client_library\\snippets\\instances\\ip_address\\assign_static_external_ip_to_new_vm.py:313: error: Unexpected keyword argument "external_ipv4" for "assign_static_external_ip_to_new_vm" [call-arg]
compute\\client_library\\snippets\\instances\\ip_address\\assign_static_external_ip_to_new_vm.py:313: error: Unexpected keyword argument "external_access" for "assign_static_external_ip_to_new_vm" [call-arg]
At runtime, the call raises TypeError: assign_static_external_ip_to_new_vm() got an unexpected keyword argument 'external_ipv4' before the instance is created.
Expected behavior: the sample entry point passes the pre-created address as ip_address. Actual behavior: the generated sample cannot run.
Environment: Python 3.12, mypy 1.14.1, repository main at commit 430a87ada6f2d33f318b5d16b77464679905a140.
- Ngôn ngữ chính
- Jupyter Notebook
- Star
- 8.1k
- Fork
- 6.7k
- Merge trung bình
- 4 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 8
Hướng dẫn đóng góp
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 GoogleCloudPlatform/python-docs-samples
-
samples
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
samples
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
samples
GoogleCloudPlatform/python-docs-samples#14117 · 1 người được giao ·
-
samples
GoogleCloudPlatform/python-docs-samples#14091 · 1 người được giao ·
-
Add doc samples for Agent Engine Đang mởsamples
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
GoogleCloudPlatform/python-docs-samples#13734 · 4 bình luận ·
Tất cả issue của GoogleCloudPlatform/python-docs-samples
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
area-deployment area-integrations triage:bot-seen
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 86/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
canonical/postgresql-watcher-operator#111 · 2 bình luận ·