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

duplicate results with group listing

Đang mở
#963 2 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
cli, cloud

Hướng nghiên cứu

Bắt đầu với lệnh oci identity-domains groups list đã được báo cáo và so sánh hành vi của --all, --limit 2 và --limit 100 bằng truy vấn display-name rút gọn. Theo dõi phân trang khi liệt kê nhóm và việc xử lý truy vấn JSON, sau đó xác minh rằng --all hoàn tất và trả về một kết quả cho mỗi nhóm thay vì các hàng thành viên hoặc chủ sở hữu được mở rộng bị trùng lặp.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

IAM

I am trying to export all groups with their members to JSON so I can determine groups which may or may not be in use. We have multiple domains set up at my company, so I picked one with the fewest groups to build my query. The domain in question has 2 groups in it.
When I run my query, with the "--all" parameter, it never completes. I let it run for 30+ minutes and no results were returned to screen.
I changed the --all parameter to --limit 2 and it came back very fast which made me happy as I could script that out and I'd be good, but this was not a realistic approach for other domains where group numbers are inconsistent and growing.
So I decided to try a large number for the limit knowing that there are only 2 groups in that domain - I set it to 1000 thinking it should still be quick with a limit 1000 for 2 groups but nope - it sat there thinking for 20 minutes before I cancelled it.
Dropped that 1000 down to 100 and it completed in a few minutes, but instead of giving me 2 results, I got 100 rows. So loaded up the JSON to see and there are 67 records BUT if I expand all of the elements in there that I extracted (members and owners), 100 rows are in the output.
So, the only way to get the proper number of rows back is for me to limit it to 2, but that means I need to check how many rows I should be getting back prior to requesting everything which is a bit silly, no? I mean, it's not THAT hard to do, but feels like overkill.

Note - this works fine using --all with users with the query I have in place but with groups it is just unhappy.
My full command is:
`set query="data.resources[].{GroupName: "display-name" }"

oci identity-domains groups list --endpoint %endpoint% --attribute-sets all --query %query% --output json --config-file c:\users\.oci\config --profile DEFAULT --limit 100
`

Plus I define my endpoint, but I'd rather not publish my endpoint. I reduced my query down to just the display-name for testing purposes and I get 67 rows back with that above query. My actual query has a lot more details than that.

EDIT - edited to remove my username from the command for the config file for privacy reasons.

Ngôn ngữ chính
Python
Star
672
Fork
236
Merge trung bình
1 phút
Pull request đã merge (30 ngày)
4

Chuẩn bị môi trường

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 oracle/oci-cli

Tất cả issue của oracle/oci-cli

Issue tương tự

Thêm issue về Python

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.