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

Apply meta_server-tag from default/override create parameters early in create #1066

Merged

Conversation

Ithanil
Copy link
Collaborator

@Ithanil Ithanil commented May 15, 2024

Description

This PR adds early handling of any meta_server-tag parameter found in DEFAULT_CREATE_PARAMS /OVERRIDE_CREATE_PARAMS or the respective tenantSettings to the create call procedure. This is necessary to ensure the parameter has the desired effect on server selection, which occurs way before the passed create parameters are merged with configured parameters usually.
In the later occurring merging of parameters, the meta_server-tag is then excluded, to maintain the fact that the final meta_server-tag parameter is always equal to the chosen server's tag.

This PR is required to make my suggestion in #1053 actually work.

Testing Steps

Tested combinations of passed vs. configured meta_server-tag via API Mate.

Other notes

At a first glance, e.g. meta_lrs parameters would also require this treatment. I wonder if it would be better to handle all meta parameters early.

Ithanil added 2 commits May 15, 2024 10:57
…the create call, to actually achieve the effect on server selection
…nce of defaults/override as in add_additional_params
@farhatahmad farhatahmad force-pushed the master branch 2 times, most recently from a64bbb9 to 4a57c23 Compare June 27, 2024 19:06
@Ithanil
Copy link
Collaborator Author

Ithanil commented Jul 2, 2024

@farhatahmad Please let me test this again after I made your suggested change, just to be sure.

@Ithanil Ithanil force-pushed the handle_tenant_server-tag branch from 53d1495 to 9c622d0 Compare July 2, 2024 14:59
@Ithanil
Copy link
Collaborator Author

Ithanil commented Jul 2, 2024

After changing the assignment operator from ||= to = the code with your suggested change appears to be fine. With ||= the right hand side will not be evaluated and assigned if the left hand side is a truthy value.

@farhatahmad farhatahmad merged commit d5e1434 into blindsidenetworks:master Jul 2, 2024
2 checks passed
@Ithanil Ithanil deleted the handle_tenant_server-tag branch July 2, 2024 15:17
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.

2 participants