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

[68] added utils.check_roles_enabled helper #69

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

Satbek
Copy link
Contributor

@Satbek Satbek commented Jan 25, 2024

This helper check are provided roles enabled on instance.
It might be very usefull if you want to run migration code only on specific roles.

Closes #68

@Satbek Satbek self-assigned this Jan 25, 2024
@Satbek Satbek linked an issue Jan 25, 2024 that may be closed by this pull request
@Satbek Satbek changed the title added utils.check_roles_enabled helper [68] added utils.check_roles_enabled helper Jan 25, 2024
Copy link
Member

@DifferentialOrange DifferentialOrange left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! See several comments below.

My main concern is the support of role dependencies. I hope you'll help me to clarify this question.

migrator/utils.lua Outdated Show resolved Hide resolved
migrator/utils.lua Outdated Show resolved Hide resolved
test/unit/check_roles_enabled_test.lua Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
test/unit/check_roles_enabled_test.lua Show resolved Hide resolved
Copy link
Member

@DifferentialOrange DifferentialOrange left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the patch, I think we still can improve tests a bit and then I'll merge it

test/entrypoint/check_roles_enabled_init.lua Outdated Show resolved Hide resolved
migrator/utils.lua Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
test/integration/check_roles_enabled_test.lua Outdated Show resolved Hide resolved
test/integration/check_roles_enabled_test.lua Outdated Show resolved Hide resolved
test/integration/check_roles_enabled_test.lua Outdated Show resolved Hide resolved
test/integration/check_roles_enabled_test.lua Outdated Show resolved Hide resolved
@DifferentialOrange
Copy link
Member

It also look like you tests had failed for some reason. We'll need to fix it before merging.

Copy link
Member

@DifferentialOrange DifferentialOrange left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the updates! You can merge the changes into a single commit as we discussed above (after adding the last missing newline)

test/integration/check_roles_enabled_test.lua Outdated Show resolved Hide resolved
@DifferentialOrange DifferentialOrange merged commit e5a0872 into master Jan 30, 2024
1 check passed
@DifferentialOrange DifferentialOrange deleted the check_roles_enabled branch January 30, 2024 14:42
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.

Add helper to check is role enabled
2 participants