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

Static external IP sample entry point passes invalid keyword arguments

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

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
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ệ
gcp, python
Lĩnh vực
cloud

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ả

samples

In which file did you encounter the issue?

  • compute/client_library/recipes/instances/ip_address/assign_static_external_ip_to_new_vm.py
  • compute/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

Mở hướng dẫn đóng góp

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 GoogleCloudPlatform/python-docs-samples

Tất cả issue của GoogleCloudPlatform/python-docs-samples

Issue tương tự

Thêm issue về Cloud

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.