Pagination does not work for `identity_domains_client.list_groups` if attributes are added
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện ví dụ với IdentityDomainsClient.list_groups bằng attribute_sets và attributes, sau đó kiểm tra cách response của nó xác định has_next_page và next_page. Hoàn tất khi một response đầy đủ không còn báo cáo trang tiếp theo khi các thuộc tính đó được cung cấp, với coverage cho trường hợp oci==2.131.0 đã được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The below code attempts to list all groups in an identity domain. However, adding either attribute_sets or attributes will cause the response to indicate has_next_page == True and next_page to have a value even if the results are already complete.
import oci
config = oci.config.from_file("~/.oci/config", "DEFAULT")
tenancy_ocid = config["tenancy"]
# Get the domain endpoint
identity_client = oci.identity.IdentityClient(config)
list_domains_response = identity_client.list_domains(tenancy_ocid)
domain01_endpoint = list_domains_response.data[0].url
# Get the groups
identity_domains_client = oci.identity_domains.IdentityDomainsClient(
config, domain01_endpoint
)
list_groups_response = identity_domains_client.list_groups(
# BUG: adding attribute_sets or attributes causes the `has_next_page` to be true
attribute_sets=["request"],
attributes="members,ocid",
)
print(list_groups_response.has_next_page)
# outputs True even if the response is already complete and no more pages are expected
Versions
- oci==2.131.0
- Ngôn ngữ chính
- Python
- Star
- 474
- Fork
- 321
- Merge trung bình
- 23 phút
- Pull request đã merge (30 ngày)
- 4
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 oracle/oci-python-sdk
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
oracle/oci-python-sdk#890 · 3 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
oracle/oci-python-sdk#879 · 3 bình luận ·
-
Example uses non-existent API Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 66/100
oracle/oci-python-sdk#878 ·
-
SDK
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
oracle/oci-python-sdk#861 · 5 bình luận ·
-
SDK
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 48/100
oracle/oci-python-sdk#852 ·
Tất cả issue của oracle/oci-python-sdk
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
xinnan-tech/xiaozhi-fde-talk#263 ·
-
rules
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
huggingface/Repo2RLEnv#163 · 1 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
huggingface/sentence-transformers#4074 ·
-
comp/dashboard invalid P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
NousResearch/hermes-agent#121143 ·