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

actionType is not checked before calling searchContextProviders() in updateEntity() function #2874

Closed
fgalan opened this issue Mar 21, 2017 · 6 comments

Comments

@fgalan
Copy link
Member

fgalan commented Mar 21, 2017

We have found that updateEntity() functions calls indiscriminately searchContextProviders() no matter the action type, i.e. even with APPEND and APPEND_STRICT. See the following fragment, at the end of updateEntity():

  /* To finish with this entity processing, search for CPrs in not found attributes and
   * add the corresponding ContextElementResponse to the global response */
  searchContextProviders(tenant, servicePathV, *enP, ceP->contextAttributeVector, cerP);

And compare with a similar (and correct) call in the creation entity flow:

    if ((strcasecmp(action.c_str(), "update") == 0) || (strcasecmp(action.c_str(), "replace") == 0))
    {
      /* In the case of UPDATE or REPLACE we look for context providers */
      searchContextProviders(tenant, servicePathV, *enP, ceP->contextAttributeVector, cerP);
      cerP->statusCode.fill(SccOk);
      ...
    }

We are not sure if we have a functional test covering update context APPEND with CPr registration in place covering this case. That should be the first thing to check.

It could also happen that we have a funct test, but some other part of the code (e.g. the forwarding logic) is "masking" the problem at updateEntity().

@fgalan
Copy link
Member Author

fgalan commented May 5, 2017

Flow diagram MB-03 should be changed once this issue gets completed.

@fgalan
Copy link
Member Author

fgalan commented May 5, 2017

Flow diagram MB-05 should be changed once this issue gets completed.

@fgalan
Copy link
Member Author

fgalan commented May 22, 2018

Fixed (code) in PR #3177

@fgalan fgalan added this to the 1.14.0 milestone May 22, 2018
fgalan added a commit that referenced this issue Jun 4, 2018
Fix for issue actionType is not checked before calling searchContextProviders() in updateEntity() function #2874
@ghost
Copy link

ghost commented Jun 4, 2018

Hi @fgalan Sir,
Thanks for your continuous support.
Do i have to change Flow diagram MB-03 and MB-05, to close this bug. If yes, please guide me so we can close this issue.
Thank you

@fgalan
Copy link
Member Author

fgalan commented Jun 4, 2018

No, don't worry. I'll deal with modifications on MB-03 and MB-05. You can skip to the next item to contribute, if you want to continue ;)

@fgalan
Copy link
Member Author

fgalan commented Jun 8, 2018

MB-03 and MB-05 fixed in PR #3203

@fgalan fgalan closed this as completed Jun 8, 2018
AlvaroVega added a commit that referenced this issue Jun 12, 2018
FIX flow diagrams in devel manual with regards issue #2874
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant