Skip to content
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

Feature: default_roles in keycloak_realm resource & data source #599

Merged
merged 15 commits into from
Oct 13, 2021
Merged

Feature: default_roles in keycloak_realm resource & data source #599

merged 15 commits into from
Oct 13, 2021

Conversation

Vlad-Kirichenko
Copy link
Contributor

Hello @mrparkers.

Changes in this PR gonna implement feature mentioned in #324.(Realm level roles assigned to new users)

Best regards,
Vlad

Signed-off-by: Vlad Kirichenko <v.kirichenko@napoleongames.be>
@Vlad-Kirichenko Vlad-Kirichenko changed the title Feature default_roles in keycloak_realm resource & data source Feature: default_roles in keycloak_realm resource & data source Sep 21, 2021
Signed-off-by: Vlad Kirichenko <v.kirichenko@napoleongames.be>
keycloak/realm.go Outdated Show resolved Hide resolved
provider/resource_keycloak_realm_test.go Outdated Show resolved Hide resolved
docs/resources/realm.md Outdated Show resolved Hide resolved
@StianHaugland1
Copy link

Would be nice to have default client roles as well 😄

Signed-off-by: Vlad Kirichenko <v.kirichenko@napoleongames.be>
Signed-off-by: Vlad Kirichenko <v.kirichenko@napoleongames.be>
Signed-off-by: Vlad Kirichenko <v.kirichenko@napoleongames.be>
Signed-off-by: Vlad Kirichenko <v.kirichenko@napoleongames.be>
Signed-off-by: Vlad Kirichenko <v.kirichenko@napoleongames.be>
@Vlad-Kirichenko
Copy link
Contributor Author

Vlad-Kirichenko commented Oct 12, 2021

Hi @mrparkers.

Something strange is happening with the tests in circleCI.
Errors occur that shouldn't be here. For example:
TestAccKeycloakOpenidClientDefaultScopes was failed when in this PR it was untouched.
image
Same was with PR 582
image

While on my local environment tests related to this PR works.(tested with keycloak version 13.0.1, 14.0.0 and 15.0.2)
image

Can you pay attention to this?

@mrparkers
Copy link
Owner

Don't worry about any of the failing tests that you didn't touch, sometimes the tests are flaky or Keycloak throws random 500 errors here and there. Restarting the CI workflow usually resolves that.

Regarding the tests you added that are failing - I think the reason they're failing is because these tests make changes to a realm (what roles are assigned by default), so it's possible for these tests to make changes in a way that affects the results of other running tests. I went ahead and opened #608 with the contents of this branch plus some additional changes (https://github.com/mrparkers/terraform-provider-keycloak/pull/608/files#diff-38017bff6c2fe290880e2924576aeebc5b4d3d7f17ae33cb128bde82ed4aeacdR94-R97) to test this out in CI. These tests are passing because they're isolated to a specific realm, so they can't bleed into other tests.

keycloak/default_roles.go Outdated Show resolved Hide resolved
provider/data_source_keycloak_realm_keys.go Outdated Show resolved Hide resolved
provider/resource_keycloak_default_roles.go Outdated Show resolved Hide resolved
provider/resource_keycloak_default_roles.go Outdated Show resolved Hide resolved
provider/resource_keycloak_default_roles.go Outdated Show resolved Hide resolved
provider/resource_keycloak_default_roles.go Outdated Show resolved Hide resolved
provider/resource_keycloak_default_roles.go Outdated Show resolved Hide resolved
Signed-off-by: Vlad Kirichenko <v.kirichenko@napoleongames.be>
Signed-off-by: Vlad Kirichenko <v.kirichenko@napoleongames.be>
@Vlad-Kirichenko
Copy link
Contributor Author

Hi @mrparkers, can you please review this PR?

@mrparkers mrparkers merged commit b1f0801 into mrparkers:master Oct 13, 2021
@mrparkers
Copy link
Owner

Thanks for your work on this @Vlad-Kirichenko - I'm going to make a few changes and cut a release today

@Vlad-Kirichenko Vlad-Kirichenko deleted the default-roles branch October 13, 2021 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants