Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Pagination does not work for `identity_domains_client.list_groups` if attributes are added

オープン
#708 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
api

調査の方向性

まず、attribute_sets と attributes を使用して IdentityDomainsClient.list_groups の例を再現し、次に、そのレスポンスが has_next_page と next_page をどのように決定するかを調べます。これらの属性を指定した場合に完全なレスポンスが別のページを示さなくなり、報告されている oci==2.131.0 のケースをカバーできれば完了です。

索引モデルが issue の本文から書いたものです。

説明

SDK

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
主要言語
Python
スター
474
フォーク
321
平均マージ
23分
マージ済み PR(30日)
4

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

oracle/oci-python-sdk のほかの issue

oracle/oci-python-sdk の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。