-
Notifications
You must be signed in to change notification settings - Fork 42
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
feat: Support core-keeper for registry and config. #520
Conversation
Signed-off-by: Corey Mutter <[email protected]>
src/c/keeper.c
Outdated
{ | ||
free(keeper->topic_root); | ||
} | ||
if (impl) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check is redundant because keeper
is cast from impl
and has been checked at the beginning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in bb9db18
src/c/keeper.c
Outdated
} keeper_impl_t; | ||
|
||
static int32_t edgex_keeper_client_notify(void *impl, const iot_data_t *request, const iot_data_t *pathparams, const iot_data_t *params, iot_data_t **reply); | ||
#define CONF_PREFIX "edgex/v3/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#define CONF_PREFIX "edgex/v3/" |
unused macro
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in bb9db18
src/c/keeper.c
Outdated
err_msg = "'key' or 'value' member not found in object"; | ||
} | ||
} | ||
else | ||
{ | ||
err_msg = "An element of 'response' is not a JSON object"; | ||
} | ||
} /* End loop over responses */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
break the loop when an error occurs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in bb9db18
src/c/keeper.c
Outdated
|
||
// iot_log_info(logger, "At key-root alloc, service->name %p", keeper->service->name); | ||
keeper->key_root = calloc(URL_BUF_SIZE, 1); | ||
snprintf(keeper->key_root, URL_BUF_SIZE-1, "edgex/v3/%s", keeper->service->name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
snprintf(keeper->key_root, URL_BUF_SIZE-1, "edgex/v3/%s", keeper->service->name); | |
snprintf(keeper->key_root, URL_BUF_SIZE-1, "edgex/v4/%s", keeper->service->name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in bb9db18
src/c/keeper.c
Outdated
{ | ||
t1 = iot_time_msecs (); | ||
*err = EDGEX_OK; | ||
ccReady = edgex_keeper_get_tree(impl, "edgex/v3/core-common-config-bootstrapper", err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ccReady = edgex_keeper_get_tree(impl, "edgex/v3/core-common-config-bootstrapper", err); | |
ccReady = edgex_keeper_get_tree(impl, "edgex/v4/core-common-config-bootstrapper", err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in bb9db18
src/c/keeper.c
Outdated
devsdk_nvpairs_free (ccReady); | ||
} | ||
|
||
result = edgex_keeper_get_tree(impl, "edgex/v3/core-common-config-bootstrapper/all-services", err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
result = edgex_keeper_get_tree(impl, "edgex/v3/core-common-config-bootstrapper/all-services", err); | |
result = edgex_keeper_get_tree(impl, "edgex/v4/core-common-config-bootstrapper/all-services", err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in bb9db18
src/c/keeper.c
Outdated
result = originalResult; | ||
|
||
devsdk_nvpairs *privateConfig = NULL; | ||
privateConfig = edgex_keeper_get_tree(impl, "edgex/v3/core-common-config-bootstrapper/device-services", err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
privateConfig = edgex_keeper_get_tree(impl, "edgex/v3/core-common-config-bootstrapper/device-services", err); | |
privateConfig = edgex_keeper_get_tree(impl, "edgex/v4/core-common-config-bootstrapper/device-services", err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in bb9db18
@eaton-coreymutter do you need Felix to help address the change request? |
I should be able to fix it. I missed it because we migrated to common config but have not done much editing of the common configs. |
Signed-off-by: FelixTing <[email protected]>
4f3715c
to
bb9db18
Compare
@eaton-coreymutter I have pushed a commit to address the change requests. Could you take a look when you get a chance, please? |
@FelixTing please merge this PR first to proceede the continous testing |
The changes all seem good. Are we changing the Keeper keys from /v3 to /v4 even though the APIs are remaining /v3? One consequence of that is that fielded products will need config migration. Then again that's probably a problem unique to Eaton, as early adopters we had that with /v2 to /v3. |
@eaton-coreymutter although the api version is v3, the key prefix is the software version |
If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/device-sdk-c/blob/main/.github/Contributing.md
PR Checklist
Please check if your PR fulfills the following requirements:
BREAKING CHANGE:
describing the break)Testing Instructions
New Dependency Instructions (If applicable)