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

dependencies for roles #3883

Open
TarantoolBot opened this issue Nov 29, 2023 · 0 comments · May be fixed by #4221
Open

dependencies for roles #3883

TarantoolBot opened this issue Nov 29, 2023 · 0 comments · May be fixed by #4221
Assignees

Comments

@TarantoolBot
Copy link
Collaborator

TarantoolBot commented Nov 29, 2023

Related dev. issue(s): tarantool/tarantool#9078
Related doc. issue(s): #3702
Related Cartridge docs: Defining role dependencies

Product: Tarantool
Since: 3.0
Root document:

SME: @ ImeevMA

Details

Roles can now have dependencies. This means that the verify() and
apply() methods will be executed for these roles, taking into account
the dependencies. Dependencies should be written in the "dependencies"
field of the array type. Note, the roles will be loaded (not applied!)
in the same order in which they were specified, i.e. not taking
dependencies into account.

Roles dependencies are specified in a role's code - not in a config:

return {
    dependencies = {'four', 'two'},
    validate = function() end,
    apply = apply,
    stop = function() end,
}

Example:

Dependencies of role A: B, C
Dependencies of role B: D
No other role has dependencies.

Order in which roles were given: [E, C, A, B, D, G]
They will be loaded in the same order: [E, C, A, B, D, G]
The order, in which functions verify() and apply() will be executed:
[E, C, D, B, A, G].
Requested by @ ImeevMA in tarantool/tarantool@7fbc1d0.

@andreyaksenov andreyaksenov mentioned this issue Mar 4, 2024
@andreyaksenov andreyaksenov self-assigned this Mar 4, 2024
@andreyaksenov andreyaksenov removed their assignment Mar 5, 2024
@andreyaksenov andreyaksenov self-assigned this May 23, 2024
@andreyaksenov andreyaksenov linked a pull request May 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants