Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-2982

Create 'broken robot' webpage to handle errors

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Story Points:
      2
    • Sprint:
      Fall 5 2021 Oct 11 - Oct 22, Fall 6 2021 Oct 25 - Nov 5, Fall 7 2021 Nov 8 - Nov 24, Fall 8 2021 Nov 29 - Dec 10

      Description

      Create a page that users are redirected to if Terrain requests for root directory or file directory fails.

      For Webhooks, refer to
      https://cyverse-de.github.io/CHANGELOG.html
      https://status.cyverse.org/

        Attachments

        1. error.png
          error.png
          128 kB
        2. error - contd.png
          error - contd.png
          112 kB
        3. node, npm, yarn.png
          node, npm, yarn.png
          13 kB
        4. screenshot-1.png
          screenshot-1.png
          2 kB

          Issue Links

            Activity

            karthik Karthik Raveendran created issue -
            karthik Karthik Raveendran made changes -
            Field Original Value New Value
            Epic Link IGBF-2376 [ 18533 ]
            karthik Karthik Raveendran made changes -
            Link This issue blocks IGBF-2950 [ IGBF-2950 ]
            karthik Karthik Raveendran made changes -
            Description Create a page that redirects users if Terrain requests for root directory or file directory fails.

            For Webhooks, refer to
            https://cyverse-de.github.io/CHANGELOG.html
            https://status.cyverse.org/

            karthik Karthik Raveendran made changes -
            Status To-Do [ 10305 ] In Progress [ 3 ]
            karthik Karthik Raveendran made changes -
            Description Create a page that redirects users if Terrain requests for root directory or file directory fails.

            For Webhooks, refer to
            https://cyverse-de.github.io/CHANGELOG.html
            https://status.cyverse.org/

            Create a page that users are redirected to if Terrain requests for root directory or file directory fails.

            For Webhooks, refer to
            https://cyverse-de.github.io/CHANGELOG.html
            https://status.cyverse.org/

            Hide
            karthik Karthik Raveendran added a comment - - edited

            A basic "broken.html" page is added to the templates and a "broken" function is added to views where the error response json of every request call to Cyverse can be sent as a parameter and the "broken page" is rendered with the JSON as context. The design of the broken page is yet to be finalized. Webhooks need to be hooked up to the page as well for DE server status.

            Broken Page Design

            Show
            karthik Karthik Raveendran added a comment - - edited A basic "broken.html" page is added to the templates and a "broken" function is added to views where the error response json of every request call to Cyverse can be sent as a parameter and the "broken page" is rendered with the JSON as context. The design of the broken page is yet to be finalized. Webhooks need to be hooked up to the page as well for DE server status. Broken Page Design
            Hide
            ann.loraine Ann Loraine added a comment -

            [~aloraine] feedback during scrum: AL thinks it's too complicated. She says: Make it simpler. Fewer words.

            Show
            ann.loraine Ann Loraine added a comment - [~aloraine] feedback during scrum: AL thinks it's too complicated. She says: Make it simpler. Fewer words.
            karthik Karthik Raveendran made changes -
            Status In Progress [ 3 ] To-Do [ 10305 ]
            ann.loraine Ann Loraine made changes -
            Sprint Fall 5 2021 Oct 11 - Oct 22 [ 131 ] Fall 5 2021 Oct 11 - Oct 22, Fall 6 2021 Oct 25 - Nov 5 [ 131, 132 ]
            ann.loraine Ann Loraine made changes -
            Rank Ranked higher
            ann.loraine Ann Loraine made changes -
            Rank Ranked higher
            Hide
            karthik Karthik Raveendran added a comment - - edited

            Reading up on the Django Exceptions and verifying if any of them has not been handled in BVC and looking into the possibility of Django Error reporting

            Show
            karthik Karthik Raveendran added a comment - - edited Reading up on the Django Exceptions and verifying if any of them has not been handled in BVC and looking into the possibility of Django Error reporting
            karthik Karthik Raveendran made changes -
            Status To-Do [ 10305 ] In Progress [ 3 ]
            karthik Karthik Raveendran made changes -
            Status In Progress [ 3 ] To-Do [ 10305 ]
            Hide
            karthik Karthik Raveendran added a comment -

            Dr. Nowlan Freese and I discussed this issue yesterday and decided that on Tuesday, Nov 2, 2020 when Cyverse is down, we will test out the Terrain API collection on Postman and collect the correct error codes that comes through. We also have to test if the CAS login page and Discovery environment will be down at the same time or will they turn on the CAS and not the DE. If so, we could be more specific in the broken page. For now the broken page is designed and set up to be tested on Tuesday with the right error codes.

            Show
            karthik Karthik Raveendran added a comment - Dr. Nowlan Freese and I discussed this issue yesterday and decided that on Tuesday, Nov 2, 2020 when Cyverse is down, we will test out the Terrain API collection on Postman and collect the correct error codes that comes through. We also have to test if the CAS login page and Discovery environment will be down at the same time or will they turn on the CAS and not the DE. If so, we could be more specific in the broken page. For now the broken page is designed and set up to be tested on Tuesday with the right error codes.
            Hide
            ann.loraine Ann Loraine added a comment -

            Update and run bvctest hosts to investigate site behavior.
            [~aloraine] - needs to ensure that the hosts are running at that time.

            Show
            ann.loraine Ann Loraine added a comment - Update and run bvctest hosts to investigate site behavior. [~aloraine] - needs to ensure that the hosts are running at that time.
            nfreese Nowlan Freese made changes -
            Link This issue relates to IGBF-3002 [ IGBF-3002 ]
            karthik Karthik Raveendran made changes -
            Status To-Do [ 10305 ] In Progress [ 3 ]
            Hide
            karthik Karthik Raveendran added a comment - - edited

            Cyverse was down on Nov 2 and several Cyverse services were down at that period due to maintenance. This caused some errors in Bioviz Connect (list below).
            https://docs.google.com/document/d/10je1Q2Y6ubKRRwjyR20GOMnmn56CKII0E3V0Vz-or3s/edit

            Some of these issues could be separate Jira tickets.

            Show
            karthik Karthik Raveendran added a comment - - edited Cyverse was down on Nov 2 and several Cyverse services were down at that period due to maintenance. This caused some errors in Bioviz Connect (list below). https://docs.google.com/document/d/10je1Q2Y6ubKRRwjyR20GOMnmn56CKII0E3V0Vz-or3s/edit Some of these issues could be separate Jira tickets.
            Hide
            karthik Karthik Raveendran added a comment - - edited

            NF and KR discussed about handling 500 errors in Bioviz Connect. I completed functions that can handle 503 and lead the user to broken page but not all request calls need that, some of them could just be an alert. While implementing the error handling function, I found it difficult to test the errors so I looked into Django testing tutorials . Some other references:
            Fake REST API using json-server

            Show
            karthik Karthik Raveendran added a comment - - edited NF and KR discussed about handling 500 errors in Bioviz Connect. I completed functions that can handle 503 and lead the user to broken page but not all request calls need that, some of them could just be an alert. While implementing the error handling function, I found it difficult to test the errors so I looked into Django testing tutorials . Some other references: Fake REST API using json-server
            ann.loraine Ann Loraine made changes -
            Sprint Fall 5 2021 Oct 11 - Oct 22, Fall 6 2021 Oct 25 - Nov 5 [ 131, 132 ] Fall 5 2021 Oct 11 - Oct 22, Fall 6 2021 Oct 25 - Nov 5, Fall 7 2021 Nov 8 - Nov 19 [ 131, 132, 133 ]
            ann.loraine Ann Loraine made changes -
            Rank Ranked higher
            ann.loraine Ann Loraine made changes -
            Rank Ranked lower
            Hide
            karthik Karthik Raveendran added a comment - - edited

            Last week, in order to recreate REST API error scenarios (especially 503 errors), to test Bioviz Connect, KR used Simulating Different Scenarios Using Fake JSON Server API as a reference. After implementing the fake server using node.js, KR looked into creating a maintenance mode for BVC but decided to go for custom error handling exceptions instead. Please Custom_503_Exception_Handler.py in Commit
            Currently working on implementing the commit on in bvctest6 . Node,js in AWS

            Other References:
            www.django-rest-framework.org
            https://docs.djangoproject.com/
            Youtube - Create a Fake REST API with JSON-Server

            Show
            karthik Karthik Raveendran added a comment - - edited Last week, in order to recreate REST API error scenarios (especially 503 errors), to test Bioviz Connect, KR used Simulating Different Scenarios Using Fake JSON Server API as a reference. After implementing the fake server using node.js, KR looked into creating a maintenance mode for BVC but decided to go for custom error handling exceptions instead. Please Custom_503_Exception_Handler.py in Commit Currently working on implementing the commit on in bvctest6 . Node,js in AWS Other References: www.django-rest-framework.org https://docs.djangoproject.com/ Youtube - Create a Fake REST API with JSON-Server
            Hide
            karthik Karthik Raveendran added a comment -

            While trying to install node.js in bvctest6, using:

            curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
            sudo apt install nodejs

            came across an error:

            dpkg: error processing archive /var/cache/apt/archives/linux-aws-5.4-headers-5.4.0-1059_5.4.0-1059.62~18.04.1_all.deb (--unpack):
            error creating directory './usr/src/linux-aws-5.4-headers-5.4.0-1059/net/netlink': No space left on device

            On using the command:

            find . -xdev -type f | cut -d "/" -f 2 | sort | uniq -c | sort -nr

            the list of folders that are eating the inode limits are shown:

            7 .cache
            2 .ansible
            1 sync_app_data.sh
            1 .sudo_as_admin_successful
            1 .ssh
            1 .rediscli_history
            1 .profile
            1 .mysql_history
            1 .gitconfig
            1 .bashrc
            1 .bash_logout
            1 .bash_history
            1 .Xauthority

            Need more reading to understand this further

            Show
            karthik Karthik Raveendran added a comment - While trying to install node.js in bvctest6, using: curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - sudo apt install nodejs came across an error: dpkg: error processing archive /var/cache/apt/archives/linux-aws-5.4-headers-5.4.0-1059_5.4.0-1059.62~18.04.1_all.deb (--unpack): error creating directory './usr/src/linux-aws-5.4-headers-5.4.0-1059/net/netlink': No space left on device On using the command: find . -xdev -type f | cut -d "/" -f 2 | sort | uniq -c | sort -nr the list of folders that are eating the inode limits are shown: 7 .cache 2 .ansible 1 sync_app_data.sh 1 .sudo_as_admin_successful 1 .ssh 1 .rediscli_history 1 .profile 1 .mysql_history 1 .gitconfig 1 .bashrc 1 .bash_logout 1 .bash_history 1 .Xauthority Need more reading to understand this further
            Hide
            ann.loraine Ann Loraine added a comment -

            Reviewing the bioviz playbooks might be helpful as these playbooks deploy a node.js instance to serve the "IGB Genomes" page.

            Show
            ann.loraine Ann Loraine added a comment - Reviewing the bioviz playbooks might be helpful as these playbooks deploy a node.js instance to serve the "IGB Genomes" page.
            karthik Karthik Raveendran made changes -
            Link This issue is blocked by IGBF-3016 [ IGBF-3016 ]
            karthik Karthik Raveendran made changes -
            Status In Progress [ 3 ] To-Do [ 10305 ]
            karthik Karthik Raveendran made changes -
            Status To-Do [ 10305 ] In Progress [ 3 ]
            karthik Karthik Raveendran made changes -
            Status In Progress [ 3 ] To-Do [ 10305 ]
            karthik Karthik Raveendran made changes -
            Status To-Do [ 10305 ] In Progress [ 3 ]
            karthik Karthik Raveendran made changes -
            Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
            karthik Karthik Raveendran made changes -
            Assignee Karthik Raveendran [ karthik ]
            Hide
            karthik Karthik Raveendran added a comment -

            Implementing the error simulating server in EC2 would require a lot of effort with very little pay off. Therefore, the server code will be pushed to a repository for testers to clone and run.

            Show
            karthik Karthik Raveendran added a comment - Implementing the error simulating server in EC2 would require a lot of effort with very little pay off. Therefore, the server code will be pushed to a repository for testers to clone and run.
            Show
            nfreese Nowlan Freese added a comment - Merged https://bitbucket.org/nfreese/bioviz-connect/pull-requests/265/igbf-2982-create-broken-page-and-mock-api?link_source=email
            nfreese Nowlan Freese made changes -
            Status Needs 1st Level Review [ 10005 ] First Level Review in Progress [ 10301 ]
            nfreese Nowlan Freese made changes -
            Status First Level Review in Progress [ 10301 ] Ready for Pull Request [ 10304 ]
            nfreese Nowlan Freese made changes -
            Status Ready for Pull Request [ 10304 ] Pull Request Submitted [ 10101 ]
            nfreese Nowlan Freese made changes -
            Status Pull Request Submitted [ 10101 ] Reviewing Pull Request [ 10303 ]
            nfreese Nowlan Freese made changes -
            Status Reviewing Pull Request [ 10303 ] Merged Needs Testing [ 10002 ]
            Hide
            ann.loraine Ann Loraine added a comment -

            Karthik Raveendran creating testing documentation. Will add here. Not yet ready for testing.

            Show
            ann.loraine Ann Loraine added a comment - Karthik Raveendran creating testing documentation. Will add here. Not yet ready for testing.
            ann.loraine Ann Loraine made changes -
            Assignee Karthik Raveendran [ karthik ]
            Hide
            karthik Karthik Raveendran added a comment - - edited

            Nowlan Freese New changes has been posted in the commit for ease of testing.

            Show
            karthik Karthik Raveendran added a comment - - edited Nowlan Freese New changes has been posted in the commit for ease of testing.
            Hide
            karthik Karthik Raveendran added a comment -

            Testing Protocol:
            In order to test this issue, a local error simulator server needs to be created and a local BioViz Connect repo clone needs to be setup as well.

            a) To setup and run a local error simulator server please refer to IGBF-3016.
            1- to check if the server is running correctly, in a browser, go to http://localhost:3000/
            2- if a "Congrats!" page appears then its working correctly

            b) Once the server is running successfully, in the BVC codebase (assuming you have a working BVC local environment):
            1- Open cyverse.js from \static\bioviz_connect\js
            2- Go to the function getUserData()
            3- Change the value of url setting in the ajax call to http://localhost:3000/get503Error
            4- Run the local BVC environment server
            5- In a browser, go to http://localhost:8000/. This should first take you to BVC homepage and then redirect you to the broken page with Error Code 503
            6- In the url setting , change the value to http://localhost:3000/
            7- In a browser, go to http://localhost:8000/. This should first take you to BVC homepage and then redirect you to the broken page with Error Code 404

            The errors are managed by the handleError() function in the error setting of the ajax call in getUserData() function. For further thorough testing, this handleError() function call can be copied and pasted in initialiseUser() ajax error setting and repeat the process from step 3

            Show
            karthik Karthik Raveendran added a comment - Testing Protocol: In order to test this issue, a local error simulator server needs to be created and a local BioViz Connect repo clone needs to be setup as well. a) To setup and run a local error simulator server please refer to IGBF-3016 . 1- to check if the server is running correctly, in a browser, go to http://localhost:3000/ 2- if a "Congrats!" page appears then its working correctly b) Once the server is running successfully, in the BVC codebase (assuming you have a working BVC local environment): 1- Open cyverse.js from \static\bioviz_connect\js 2- Go to the function getUserData() 3- Change the value of url setting in the ajax call to http://localhost:3000/get503Error 4- Run the local BVC environment server 5- In a browser, go to http://localhost:8000/ . This should first take you to BVC homepage and then redirect you to the broken page with Error Code 503 6- In the url setting , change the value to http://localhost:3000/ 7- In a browser, go to http://localhost:8000/ . This should first take you to BVC homepage and then redirect you to the broken page with Error Code 404 The errors are managed by the handleError() function in the error setting of the ajax call in getUserData() function. For further thorough testing, this handleError() function call can be copied and pasted in initialiseUser() ajax error setting and repeat the process from step 3
            karthik Karthik Raveendran made changes -
            Status Merged Needs Testing [ 10002 ] Post-merge Testing In Progress [ 10003 ]
            karthik Karthik Raveendran made changes -
            Status Post-merge Testing In Progress [ 10003 ] To-Do [ 10305 ]
            karthik Karthik Raveendran made changes -
            Status To-Do [ 10305 ] In Progress [ 3 ]
            karthik Karthik Raveendran made changes -
            Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
            karthik Karthik Raveendran made changes -
            Assignee Karthik Raveendran [ karthik ]
            ann.loraine Ann Loraine made changes -
            Sprint Fall 5 2021 Oct 11 - Oct 22, Fall 6 2021 Oct 25 - Nov 5, Fall 7 2021 Nov 8 - Nov 24 [ 131, 132, 133 ] Fall 5 2021 Oct 11 - Oct 22, Fall 6 2021 Oct 25 - Nov 5, Fall 7 2021 Nov 8 - Nov 24, Fall 8 2021 Nov 29 - Dec 10 [ 131, 132, 133, 134 ]
            ann.loraine Ann Loraine made changes -
            Rank Ranked higher
            Show
            nfreese Nowlan Freese added a comment - Merged: https://bitbucket.org/nfreese/bioviz-connect/pull-requests/266/igbf-2982-fix-broken-page-code-structure?link_source=email
            nfreese Nowlan Freese made changes -
            Status Needs 1st Level Review [ 10005 ] First Level Review in Progress [ 10301 ]
            nfreese Nowlan Freese made changes -
            Status First Level Review in Progress [ 10301 ] Ready for Pull Request [ 10304 ]
            nfreese Nowlan Freese made changes -
            Status Ready for Pull Request [ 10304 ] Pull Request Submitted [ 10101 ]
            nfreese Nowlan Freese made changes -
            Status Pull Request Submitted [ 10101 ] Reviewing Pull Request [ 10303 ]
            nfreese Nowlan Freese made changes -
            Status Reviewing Pull Request [ 10303 ] Merged Needs Testing [ 10002 ]
            omarne Omkar Marne (Inactive) made changes -
            Assignee Omkar Marne [ omarne ]
            omarne Omkar Marne (Inactive) made changes -
            Status Merged Needs Testing [ 10002 ] Post-merge Testing In Progress [ 10003 ]
            omarne Omkar Marne (Inactive) made changes -
            Attachment node, npm, yarn.png [ 16988 ]
            omarne Omkar Marne (Inactive) made changes -
            Attachment error.png [ 16989 ]
            omarne Omkar Marne (Inactive) made changes -
            Attachment error - contd.png [ 16990 ]
            Hide
            omarne Omkar Marne (Inactive) added a comment - - edited

            I followed the steps from the Readme.md file from IGBF-3016. When I started the yarn server after installing node.js, npm and yarn, I got an error. Please see attached screenshot.

            Readme.md - https://bitbucket.org/KarthikRavee91/bvc_error_simulator_server/src/master/

            Karthik Raveendran Please check.

            Show
            omarne Omkar Marne (Inactive) added a comment - - edited I followed the steps from the Readme.md file from IGBF-3016 . When I started the yarn server after installing node.js, npm and yarn, I got an error. Please see attached screenshot. Readme.md - https://bitbucket.org/KarthikRavee91/bvc_error_simulator_server/src/master/ Karthik Raveendran Please check.
            omarne Omkar Marne (Inactive) made changes -
            Status Post-merge Testing In Progress [ 10003 ] To-Do [ 10305 ]
            omarne Omkar Marne (Inactive) made changes -
            Assignee Omkar Marne [ omarne ] Karthik Raveendran [ karthik ]
            Hide
            karthik Karthik Raveendran added a comment -

            Omkar Marne I have made a few changes in the repo. Please clone the repo again and follow the steps in README file.

            Show
            karthik Karthik Raveendran added a comment - Omkar Marne I have made a few changes in the repo. Please clone the repo again and follow the steps in README file.
            karthik Karthik Raveendran made changes -
            Status To-Do [ 10305 ] In Progress [ 3 ]
            karthik Karthik Raveendran made changes -
            Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
            karthik Karthik Raveendran made changes -
            Assignee Karthik Raveendran [ karthik ] Omkar Marne [ omarne ]
            omarne Omkar Marne (Inactive) made changes -
            Status Needs 1st Level Review [ 10005 ] First Level Review in Progress [ 10301 ]
            omarne Omkar Marne (Inactive) made changes -
            Status First Level Review in Progress [ 10301 ] Ready for Pull Request [ 10304 ]
            omarne Omkar Marne (Inactive) made changes -
            Status Ready for Pull Request [ 10304 ] Pull Request Submitted [ 10101 ]
            omarne Omkar Marne (Inactive) made changes -
            Status Pull Request Submitted [ 10101 ] Reviewing Pull Request [ 10303 ]
            omarne Omkar Marne (Inactive) made changes -
            Status Reviewing Pull Request [ 10303 ] Merged Needs Testing [ 10002 ]
            omarne Omkar Marne (Inactive) made changes -
            Status Merged Needs Testing [ 10002 ] Post-merge Testing In Progress [ 10003 ]
            Hide
            omarne Omkar Marne (Inactive) added a comment - - edited

            I had to setup the BVC local environment before testing part b. I followed https://docs.google.com/document/d/1_-TZr2UJBs9vbqR2wfRifCkjgp-wi6KSXtSX5ozaiYE/edit from the shared drive. The document was for Ubuntu Linux. I followed the instructions for Windows by changing the commands.

            Testing results:

            Performed all the steps mentioned above. After changing the url setting in the ajax call to http://localhost:3000/get503Error and running the BVC server, the localhost:8000 took to the BVC homepage and redirected to broken robot page with error code 503.
            After changing the localhost value to localhost:3000, locahost:8000 took to the BVC homepage and redirected to error code 504.

            Closing the ticket.

            Show
            omarne Omkar Marne (Inactive) added a comment - - edited I had to setup the BVC local environment before testing part b. I followed https://docs.google.com/document/d/1_-TZr2UJBs9vbqR2wfRifCkjgp-wi6KSXtSX5ozaiYE/edit from the shared drive. The document was for Ubuntu Linux. I followed the instructions for Windows by changing the commands. Testing results: Performed all the steps mentioned above. After changing the url setting in the ajax call to http://localhost:3000/get503Error and running the BVC server, the localhost:8000 took to the BVC homepage and redirected to broken robot page with error code 503. After changing the localhost value to localhost:3000, locahost:8000 took to the BVC homepage and redirected to error code 504. Closing the ticket.
            omarne Omkar Marne (Inactive) made changes -
            Attachment screenshot-1.png [ 17004 ]
            omarne Omkar Marne (Inactive) made changes -
            Status Post-merge Testing In Progress [ 10003 ] Merged Needs Testing [ 10002 ]
            omarne Omkar Marne (Inactive) made changes -
            Status Merged Needs Testing [ 10002 ] Post-merge Testing In Progress [ 10003 ]
            omarne Omkar Marne (Inactive) made changes -
            Resolution Done [ 10000 ]
            Status Post-merge Testing In Progress [ 10003 ] Closed [ 6 ]

              People

              • Assignee:
                omarne Omkar Marne (Inactive)
                Reporter:
                karthik Karthik Raveendran
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: