-
Notifications
You must be signed in to change notification settings - Fork 78
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
Focus on Namespace handling for targeted field mirror #328
Focus on Namespace handling for targeted field mirror #328
Conversation
the contents of an Info object.
Instead implement Import-/ExportState naming based on compLabel for more clarity.
explicitly provided VM, and use this to target acceptor VM for field mirroring with NameSpace.
With the new focus on |
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.
I am not very familiar to the namespace concept but this looks more clean solution. Maybe we could spend little bit time in the next core meeting and discuss about it little bit more. BTW, I just need to test this with the real application that I am working on. I think you are also proposing to change the name of the Transfer attribute. If so, we also need to update the documentation.
@theurich let me know when you want me to merge this. |
call NUOPC_SetAttribute(exportNestedState, "FieldTransferPolicy", "transferAll", rc=rc) | ||
! set namespace on exportState, creating a nestedState on acceptor VM | ||
call NUOPC_AddNamespace(exportState, namespace=trim(namespace), & | ||
nestedStateName=trim(stateName)//"-namespace:"//trim(namespace), & |
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.
The nested state name is appearing in the NUOPC app prototype something like atm-importstate-namespace:ocn
and this is aligned with the change in here. So, this is little bit different than the convention that I was using before. Are we plaining to go with this naming convention? If so, I need to couple of adjustment in my real application. Also, I think we need to document this convention in the documentation.
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.
Let's discuss this further next week (on a call, or under your PR). I am thinking your code should only be going off of the Namespace
attribute, which is part of the NUOPC standard, and documented. The nested State name itself is a NUOPC implementation detail, and user code should not depend on it (I just made it something meaningful for the purpose of internal NUOPC development and debugging). But we can discuss this in more detail... I may be overlooking something.
@uturuncoglu I think you could merge this into your PR branch. We can discuss more details under your PR. |
@uturuncoglu if you and @danrosen25 are okay with it, I would like to rename the new "transferAllAsNests" to "transferAllWithNamespace", and also adjust the associated documentation. The implementation of course does not change. It's just that the user facing focus will be on "Namespace" which is an existing NUOPC concept. I am all set up locally to do this quickly. I would also adjust the prototype code accordingly. |
@theurich That sounds good to me. Do you also plan to change the structure of the metadata (i.e. |
Base the implementation of the new
"transferAllAsNests"
mirror option on the existingNamespace
concept: Fields advertised viaNUOPC_Connector
into a State that hasFieldTransferPolicy="transferAllAsNests"
set becomes indistinguishable from manually advertised Fields under the target componentNamespace
.Also ensure the implementation is compliant with the optimized
ESMF_StateReconcile()
behavior. Specifically do not depend on top level State Info being reconciled for empty States, or constituent fields (e.g. in nested State) being reconciled if nested State is object of the reconciling VM context.