-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(keycloak): update more than 10 sub-groups (#9690) #9692
base: main
Are you sure you want to change the base?
Conversation
This PR fix the issue on my side but I couldn't launch integration tests.
|
Thanks for your contribution! You need the community.docker collection to run the keycloak integration tests (see |
Thanks for your reply. How I can install it correctly for ansible integration tests ? It is already installed on my computer but the error still persist :
|
Ah, I missed that you're using |
Thanks. I have another issue now :
I don't know how to retrieve more useful information. It seems docker installation does not work properly :
|
when you pass If I may suggest, give it a try to https://pypi.org/project/andebox/ You can run this somewhat easily in your local machine using vagrant by simply running:
In fact I have just executed this (on the main branch, so not testing your PR at the moment) and other than the violent aggression to the swap partitions of my old laptop, everything ran just fine. ;-) Naturally you will need vagrant installed and you will have to create your Vagrantfile at the project dir (do not commit that file). Mine looks like this for the ubuntu part, YMMV: config.vm.define "ubuntu-noble" do |noble| # Ubuntu 24.04
noble.vm.hostname = 'ubuntu-noble'
noble.vm.box = "jcpetro97/ubuntu2404"
noble.vm.synced_folder ".", "/vagrant", rsync__exclude: ['.tox/', '.git/', '.vagrant']
noble.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--audio", "none"]
vb.customize ["modifyvm", :id, "--memory", "4096"]
end
noble.vm.provision "shell", inline: <<-SHELL
apt-get -y update
apt-get -y install python3-pip virtualenv python3-venv
virtualenv --python 3 /venv
/venv/bin/pip install -U pip setuptools
/venv/bin/pip install andebox ansible-core decorator
SHELL
end |
@russoz thank you a lot for the explanation I managed to get the tests to work but :
To finish, I don't think integration tests are the best place to test this. I'm sorry, I don't think I'll have time to go any further. Would it be possible to stop there? Tanks again for your time (you to @felixfontein 🙏) See below my Ansible integration tests which should fail (for the update case) but pass even if I remove my fix :
|
Hi @FabienSalles if you don't mind, keep the PR open (and don't delete the branch), we can take this slowly - no rush from our side. About your initial comments:
How does that sound to you? |
SUMMARY
Fixes #9690
When we want to create or update a sub-group, we fetch children of the parent group to know which sub group exist and should be updated.
The API is paginated by default with a maximum of 10 result and the api call did not set the corresponding paremeter (
max
).This PR set
max
parameter with the number of existing sub-groups retrieve by another API endpointISSUE TYPE
Bugfix Pull Request
COMPONENT NAME
community.general.keycloak_group