-
Notifications
You must be signed in to change notification settings - Fork 8
Dashboard support for ES7 / Pbench server 0.71 #114
Conversation
4e89c20
to
a8c21fb
Compare
So Travis failed at
|
run_index: 'vn.run-data.', | ||
run_toc_index: 'vn.run-toc.', | ||
result_index: 'vn.result-data-sample.', | ||
result_data_index: 'vn.result-data.', |
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.
These five above don't seem like end points. This seems like what we want the initial server load to give the dashboard.
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.
Yeah, "endpoints" might be better termed "server configuration". More obvious now that I split the two main indices. In my configuration API I put these in a "metadata" section separate from the "endpoints" (URI) section.
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.
Hey @dbutenhof, I suppose this file is in .gitignore
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.
Hey @dbutenhof, I suppose this file is in
.gitignore
Yes, it is; although for some reason that pattern isn't working for me. Which in this case is fine as I had to add additional configuration keys.
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.
Wait, if public/endpoints.js is in .gitignore, why are we not removing it instead of changing it in the PR?
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.
Actually, that's a good point; .gitignore is only for untracked files. Maybe we should really have a public/endpoints.example.js
that's tracked and updated, with the build looking for an untracked public/endpoints.js
that's in .gitignore.
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.
Hmm; that, unfortunately, breaks the current end-to-end testing because the search test requires endpoints.js
placeholders that match the internal test framework placeholders. (This is actually a problem if you run the tests with a "real" endpoints.js
, too.) It's probably possible to get npm/yarn/umi to "build" the example file as the endpoints.js
to use, but I don't know enough about the capabilities and structure of package.json
to do that.
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'll take a look into possibly using a mocked endpoint file for enabling e2e testing without the requirement of endpoints.js
. @dbutenhof we should update the fields present in the README.md file at the root of the project directory.
run_index: 'vn.run-data.', | ||
run_toc_index: 'vn.run-toc.', | ||
result_index: 'vn.result-data-sample.', | ||
result_data_index: 'vn.result-data.', |
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.
Wait, if public/endpoints.js is in .gitignore, why are we not removing it instead of changing it in the PR?
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.
Travis CI is failing due to an incompatible version of node running the test environment.
error postcss@8.2.3: The engine "node" is incompatible with this module. Expected version "^10 || ^12 || >=14". Got "13.14.0"
We should consider upgrading the node environment to >=14 in .travis.yml
to resolve this issue.
run_index: 'vn.run-data.', | ||
run_toc_index: 'vn.run-toc.', | ||
result_index: 'vn.result-data-sample.', | ||
result_data_index: 'vn.result-data.', |
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'll take a look into possibly using a mocked endpoint file for enabling e2e testing without the requirement of endpoints.js
. @dbutenhof we should update the fields present in the README.md file at the root of the project directory.
src/models/search.js
Outdated
@@ -55,18 +55,37 @@ export default { | |||
searchResults.resultCount = response.hits.total; |
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.
It seems resultCount
is being assigned an object opposed to an integer specified from the total
field. This is causing [Object] [object]
to be rendered in the Search page component once a search query has been made.
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.
Thanks. Somehow I missed that, both visually and comparing my Postman ES7 output... hits.total is an object {value: 1, relation: 'eq'}
... I want response.hits.total.value
here.
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.
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.
LGTM, just needs a rebase to resolve TravisCI issues!
Well, this is interesting. I had done some brief experimentation with renaming So now I've got to restore it to match the internal mocking. It'll be a minute... |
I suppose it's worth a note here that when this PR is merged, the dashboard Should we cut a dashboard branch before merging this? And possibly even updating it to bump the dashboard version? |
FYI: After consulting with Gurbir, I've updated the dashboard version to 3.0.0 for this change. |
Revise dashboard Elasticsearch queries to be compatible with Elasticsearch 7 syntax in order to work with 0.71 Pbench server, which now indexes to Elasticsearch 7.
Of special note: this also switches the dashboard over to use the two Pbench server "native query" APIs I've implemented, replacing both the
query
services and thefetch
model effect transformations forqueryControllers
/fetchControllers
andqueryMonthIndices
/fetchMonthIndices
.Also, during testing I found inconsistencies in the search behavior that seem to have been pre-existing bugs; e.g., the search state passed on to
fetchIterationSamples
didn't contain theid
property required by that code to construct the queries. (Pay special attention to these changes.)The dashboard actually runs on my 0.71 server VM and the RDU2 elasticsearch instance. The
yarn test
passes, with a warning for theSiderMenu
test which apparently isn't including akey
prop in a component list: not my change, and I decided not to mess with it. The e2e test script passes locally; hopefully will also on TravisCI.The new
endpoints.js
should look something like this:Note that I changed the placeholders for the index strings to be a bit more useful. Ideally, we'll be able to convert the dashboard over to a server-driven configuration like my #2024 endpoint configuration API, which would remove all of this complexity.
Also of note is my Server API Architecture document, which has before/after payload samples and additional notes.