Uploaded image for project: 'Slider'
  1. Slider
  2. SLIDER-1041

Discrepancy between /ws/v1/slider/publisher/exports and /ws/v1/slider/publisher/exports/{export_name}

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Slider 0.90.2
    • Fix Version/s: Slider 0.91
    • Component/s: Web & REST
    • Labels:
      None

      Description

      In working on SLIDER-809, I noticed that I could see the map of all exports listed in /ws/v1/slider/publisher/exports, but this endpoint did not actually contain the value from the ExportEntry. If I request some /ws/v1/slider/publisher/exports/<export_name>, then I can see the value:

      For example:

      {"exports":{"servers":{"description":"Servers","updated":1451440844425,"updatedTime":"Tue Dec 29 21:00:44 EST 2015","entries":{},"empty":true},"quicklinks":{"description":"QuickLinks","updated":1451440844425,"updatedTime":"Tue Dec 29 21:00:44 EST 2015","entries":{},"empty":true},"container_log_dirs":{"description":"container_log_dirs","updated":1451440840223,"updatedTime":"Tue Dec 29 21:00:40 EST 2015","entries":{},"empty":true},"container_work_dirs":{"description":"container_work_dirs","updated":1451440840223,"updatedTime":"Tue Dec 29 21:00:40 EST 2015","entries":{},"empty":true}}}
      

      And if I fetch the quicklinks:

      {"description":"QuickLinks","updated":1451440844425,"updatedTime":"Tue Dec 29 21:00:44 EST 2015","entries":{"HTTP":[{"value":"http://hw10447.local:60283","level":"application","updatedTime":"Tue Dec 29 21:00:44 EST 2015"}]},"empty":false}
      

      Suddenly, entries is not empty. These seems to be inconsistent since both REST endpoints are backed by the same data structure.

        Activity

        Hide
        elserj Josh Elser added a comment -

        Oh, this is because PublishedExports.shallowCopy() doesn't copy the nested entries. Still need to figure out if this is intentional for the webui (my hunch is not, but I need to confirm).

        Show
        elserj Josh Elser added a comment - Oh, this is because PublishedExports.shallowCopy() doesn't copy the nested entries. Still need to figure out if this is intentional for the webui (my hunch is not, but I need to confirm).
        Hide
        elserj Josh Elser added a comment -

        Looks like this was something Sumit Mohanty did over in SLIDER-481. Do you happen to remember why you didn't include the entries in the ...publisher/exports endpoint, Sumit?

        I don't see a reason why we need to strip out the entries. Maybe I missed something?

        Show
        elserj Josh Elser added a comment - Looks like this was something Sumit Mohanty did over in SLIDER-481 . Do you happen to remember why you didn't include the entries in the ...publisher/exports endpoint, Sumit? I don't see a reason why we need to strip out the entries. Maybe I missed something?
        Hide
        sumitmohanty Sumit Mohanty added a comment -

        Josh Elser I do not remember specifics but it could be to get a summary and then details if you go one level deeper. Also, I remember trying to get to a more formatted export and possibly creating an alternate endpoint for those exports. Its been a while

        Show
        sumitmohanty Sumit Mohanty added a comment - Josh Elser I do not remember specifics but it could be to get a summary and then details if you go one level deeper. Also, I remember trying to get to a more formatted export and possibly creating an alternate endpoint for those exports. Its been a while
        Hide
        elserj Josh Elser added a comment -

        Ok! Thanks for the quick response, Sumit.

        It was very strange to me looking at it when none of the details for the export were present. I think I'm going to go ahead and all of the details when we list them since there isn't a strong opinion to not do so

        Show
        elserj Josh Elser added a comment - Ok! Thanks for the quick response, Sumit. It was very strange to me looking at it when none of the details for the export were present. I think I'm going to go ahead and all of the details when we list them since there isn't a strong opinion to not do so
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit d5b3669b6e36c7bc02a1045133310bc5ffb0c0ea in incubator-slider's branch refs/heads/develop from Josh Elser
        [ https://git-wip-us.apache.org/repos/asf?p=incubator-slider.git;h=d5b3669 ]

        SLIDER-1041 Fix consistency for exports, enumerate all exports on HTML index.

        Show
        jira-bot ASF subversion and git services added a comment - Commit d5b3669b6e36c7bc02a1045133310bc5ffb0c0ea in incubator-slider's branch refs/heads/develop from Josh Elser [ https://git-wip-us.apache.org/repos/asf?p=incubator-slider.git;h=d5b3669 ] SLIDER-1041 Fix consistency for exports, enumerate all exports on HTML index.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 0992e85500239d88f77cbd76f142b1daf02d5219 in incubator-slider's branch refs/heads/develop from Steve Loughran
        [ https://git-wip-us.apache.org/repos/asf?p=incubator-slider.git;h=0992e85 ]

        Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-slider into develop

        Show
        jira-bot ASF subversion and git services added a comment - Commit 0992e85500239d88f77cbd76f142b1daf02d5219 in incubator-slider's branch refs/heads/develop from Steve Loughran [ https://git-wip-us.apache.org/repos/asf?p=incubator-slider.git;h=0992e85 ] Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-slider into develop 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-slider: SLIDER-1042 Use the correct cluster name when fetching the description SLIDER-1041 Fix consistency for exports, enumerate all exports on HTML index. SLIDER-1040 Better formatting on the AM's web ui. SLIDER-1012 Modify server and quicklinks for Tomcat (fengyongshe) SLIDER-809 First implementation of an Apache Tomcat app-package SLIDER-1039 Run python tests from target directory

          People

          • Assignee:
            elserj Josh Elser
            Reporter:
            elserj Josh Elser
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development