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

List of Vorto Function Blocks in Info Model Creation wizard shows all released Function Blocks #2137

Closed
aedelmann opened this issue Dec 4, 2019 · 18 comments

Comments

@aedelmann
Copy link
Contributor

Steps:

  1. Log in to Repository
  2. Create Model and choose "Inforamtion Model"
    2.1) In Semantic Abstract dialog, open the drop down of Function Blocks
    Expected: Only released Function Blocks of namespace 'org.eclipse.vorto.*' are displayed and selectable
    Actual: List displays released Function Blocks of any namespace
@aedelmann
Copy link
Contributor Author

aedelmann commented Dec 4, 2019

Side note:

  1. Remove internal REST Endoint ../released in backend
  2. Change Javascript to re-use the existing /api/1/search Rest Endpoint with the following search expression

state:Released namespace:org.eclipse.vorto type:Functionblock

@ghost
Copy link

ghost commented Dec 4, 2019

Thanks for the thorough specs on this one @aedelmann . Taking this for myself and starting soon.

@ghost
Copy link

ghost commented Dec 4, 2019

Thanks for the thorough specs on this one @aedelmann . Taking this for myself and starting soon.

"starting soon" --> actually this bears waiting for the search feature to be merged, so we can leverage the full tags.

@aedelmann
Copy link
Contributor Author

@mena-bosch You are right. I will merge your PR, once all the checks are done :)

@ghost
Copy link

ghost commented Dec 4, 2019

@mena-bosch You are right. I will merge your PR, once all the checks are done :)

Cool. I had to push again just now because I stupidly left one of the two malformed links out, but am hoping this is the last bit.

After that, the one thing we may want to do is to recreate the index on the dev machine first, to verify it works as expected.
This is a crucial step in my opinion, otherwise the search will not work as expected due to the schema changes (namely, the few "key to text" type changes).
If no issue there, we can proceed with prod in time.

@aedelmann
Copy link
Contributor Author

Good point: Can we add this to the migration guide 0.12.x -> 1.0 ?
@somesh-kumar : We need to mention the needed changes, with the introduction of mode shape5 there as well.

@ghost
Copy link

ghost commented Dec 4, 2019

Good point: Can we add this to the migration guide 0.12.x -> 1.0 ?
@somesh-kumar : We need to mention the needed changes, with the introduction of mode shape5 there as well.

@aedelmann Thanks for mentioning this. Having a look at the existing 0.11 guide now. I will probably have questions for you e.g. tomorrow.
Something you can probably answer right away if you're still up: do we want the version change and addendum to migration_0.11.md to be part of the change set for the feature itself, i.e. same branch, or do we scope it to a separate one?

@ghost
Copy link

ghost commented Dec 4, 2019

@aedelmann nearly done here.

Suspect we eliminate the other endpoint ("/public") too, and therefore the entire the controller, so that public models for tenant are also directly searched from angular. As I recall, tenant == namespace so I'd just need to call the search with 'namespace:'+tenant.defaultNamespace+'visibility:public' in angular.

I would rather do this in a new task for cleanliness, assuming you agree with the reasoning above.

@aedelmann
Copy link
Contributor Author

Agreed :)

@ghost
Copy link

ghost commented Dec 4, 2019

Agreed :)

Geez you're still up?! 💪

@aedelmann
Copy link
Contributor Author

Hi @mena-bosch
I just tested this feature on dev but it seems that no org.eclipse.vorto released Function blocks are populated in the drop down at Information Model Creation time.

@ghost
Copy link

ghost commented Dec 9, 2019

@aedelmann did you re-create the index before testing?
This bit of code is dependent on the new search feature, which is itself dependent on re-creating the index, as we discussed last week.
Not doing so will prevent the search from working appropriately, as it will throw query string queries at fields still indexed as keys rather than text.

@aedelmann aedelmann moved this from To Do to In Progress in 0.13 (E01.19) Dec 9, 2019
@ghost
Copy link

ghost commented Dec 9, 2019

@aedelmann looks like my search criteria was exactly following the requirements in the description, i.e. state:Released namespace:org.eclipse.vorto.* . As expected, that would only load namespaces from vorto that have a sub-package. Will fix that shortly and replace with state:Released namespace:org.eclipse.vorto

@ghost
Copy link

ghost commented Dec 9, 2019

Btw you might be able to test this in the meantime, by intercepting and tampering with the request. But it won't take long to fix.

@ghost
Copy link

ghost commented Dec 9, 2019

PR for fix here.

@ghost
Copy link

ghost commented Dec 9, 2019

Task for fix here

@ghost
Copy link

ghost commented Dec 10, 2019

I think this is fixed now in the dev machine. @aedelmann let me know if we can close this.

@aedelmann
Copy link
Contributor Author

@mena-bosch
Awesome :) Works now perfectly.

@aedelmann aedelmann moved this from In Progress to Done in 0.13 (E01.19) Dec 11, 2019
@kolotu kolotu added this to the 0.13 milestone Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
0.13 (E01.19)
  
Done
Development

No branches or pull requests

2 participants