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

Incorrect route is used in getAllNodes() call #2123

Closed
jpellizzari opened this issue Jan 11, 2017 · 5 comments
Closed

Incorrect route is used in getAllNodes() call #2123

jpellizzari opened this issue Jan 11, 2017 · 5 comments
Assignees
Labels
bug Broken end user or developer functionality; not working as the developers intended it
Milestone

Comments

@jpellizzari
Copy link
Contributor

jpellizzari commented Jan 11, 2017

Moved from weaveworks/service#1053

The leading slash in the topologyUrlsById is causing the incorrect route to be requested.

Repro steps:

  1. Within cloud, enter some search terms in scope.
  2. JSON.parse() errors will appear in the console, as a result of a call to /api/topology/containers
  3. Notice that the cloud index.html file is served instead of a JSON response.

The request to
https://cloud.weave.works/api/topology/containers
should be
https://cloud.weave.works/api/app/loud-breeze-77/api/topology/containers

@jpellizzari jpellizzari added the bug Broken end user or developer functionality; not working as the developers intended it label Jan 11, 2017
@jpellizzari jpellizzari self-assigned this Jan 11, 2017
@rade
Copy link
Member

rade commented Jan 11, 2017

What functionality, if any, does this break? Search seems to work fine in Weave Cloud.

@rade rade added this to the EOY 2016 milestone Jan 11, 2017
@jpellizzari
Copy link
Contributor Author

Searching triggers a fetch of topologies which is throwing errors in the console. The search functionality itself seems to still work, since it does not rely on the result of the fetch. I'm not sure why searching needs to trigger that request, but its not working.

@rade
Copy link
Member

rade commented Jan 11, 2017

I'm not sure why searching needs to trigger that request,

This is worth investigating.

@jpellizzari
Copy link
Contributor Author

@rade Found it!:

    dispatch({ type: ActionTypes.FOCUS_SEARCH });
    // update nodes cache to allow search across all topologies,
    // wait a second until animation is over
    setTimeout(() => {
      getAllNodes(getState, dispatch);
    }, 1200);

We discussed a possible improvement in our cloud-prod sync today. I documented it here: https://github.com/weaveworks/service-conf/issues/500

@jpellizzari
Copy link
Contributor Author

Closed by #2124

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Broken end user or developer functionality; not working as the developers intended it
Projects
None yet
Development

No branches or pull requests

2 participants