-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Improve 500 Error Page (close #272) #1890
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
Conversation
This commit displays all currently available info re why error occured provides a link to home, and uses the general layout of the 404 page. We still need to improve what info is provided
|
Deploy preview for hasura-docs ready! Built with commit 71b0fc7 |
|
Review app for commit c06f522 deployed to Heroku: https://hge-ci-pull-1890.herokuapp.com |
|
Review app https://hge-ci-pull-1890.herokuapp.com is deleted |
|
Review app for commit 71b0fc7 deployed to Heroku: https://hge-ci-pull-1890.herokuapp.com |
* added feedback on migration commands (close hasura#1410) (hasura#1931) * firebase2graphql (v0.0.2): support array types in firebase json (close hasura#1829) (hasura#1900) * improve console error page (close hasura#272) (hasura#1890) * add nextjs 8 jwt sample app (hasura#1943) * persist queries in GraphiQL (closes hasura#1894) (hasura#1903) * add realtime chat sample app with vue (hasura#1885) * fix update_event_trigger query not persisting the changes (hasura#1950) fix hasura#1949 * mention required key length for HMAC encryption to user (hasura#1956) Following on from a discussion in discord, a small tweak to make the required key length for a HMAC key more obvious * fix input argument types for custom SQL functions (close hasura#1952) (hasura#1953) * run graphql tests on both http and websocket; add parallelism (close hasura#1868) (hasura#1921) Examples 1) ` pytest --hge-urls "http://127.0.0.1:8080" --pg-urls "postgresql://admin@127.0.0.1:5432/hge_tests" -vv ` 2) `pytest --hge-urls "http://127.0.0.1:8080" "http://127.0.0.1:8081" --pg-urls "postgresql://admin@127.0.0.1:5432/hge_tests" "postgresql://admin@127.0.0.1:5432/hge_tests2" -vv ` ### Solution and Design <!-- How is this issue solved/fixed? What is the design? --> <!-- It's better if we elaborate --> #### Reducing execution time of tests - The Schema setup and teardown, which were earlier done per test method, usually takes around 1 sec. - For mutations, the model has now been changed to only do schema setup and teardown once per test class. - A data setup and teardown will be done once per test instead (usually takes ~10ms). - For the test class to get this behaviour, one can can extend the class `DefaultTestMutations`. - The function `dir()` should be define which returns the location of the configuration folder. - Inside the configuration folder, there should be - Files `<conf_dir>/schema_setup.yaml` and `<conf_dir>/schema_teardown.yaml`, which has the metadata query executed during schema setup and teardown respectively - Files named `<conf_dir>/values_setup.yaml` and `<conf_dir>/values_teardown.yaml`. These files are executed to setup and remove data from the tables respectively. #### Running Graphql queries on both http and websockets - Each GraphQL query/mutation is run on the both HTTP and websocket protocols - Pytests test parameterisation is used to achieve this - The errors over websockets are slightly different from that on HTTP - The code takes care of converting the errors in HTTP to errors in websockets #### Parallel executation of tests. - The plugin pytest-xdist helps in running tests on parallel workers. - We are using this plugin to group tests by file and run on different workers. - Parallel test worker processes operate on separate postgres databases(and separate graphql-engines connected to these databases). Thus tests on one worker will not affect the tests on the other worker. - With two workers, this decreases execution times by half, as the tests on event triggers usually takes a long time, but does not consume much CPU. * update manifests to v1.0.0-alpha42 * update regex to delete event triggers in edit-pg-dump (close hasura#1959) (hasura#1960) * support composite foreign keys and primary keys through console (close hasura#1707) (hasura#1854) * edit-pg-dump: fix a missing semi-colon * fix styles in browse rows, relationship and permission tables (hasura#1969) * update console permissions ui (hasura#1924) * Make permissions sections as collapsibles with tooltips * Remove 'use same permission as select' type options from row permissions section * Added clone section to apply same permission to any table-role-action * Disable other subsections till row permissions are set * re-add same as other action options in permissions (hasura#1970) * fix excessive memory consumption with bulk queries (hasura#1972) Use 'Strict' State monad instead of 'Lazy' to avoid unevaluated memory thunks * add placeholder for bool type fields while inserting rows (hasura#1962) * Use UTF-8 encoding for stack hpc report generation (hasura#1974) * fix save function in console's retry config editor (fix hasura#1975) (hasura#1976) * Wip * add scroll to literal blocks in docs (close hasura#1954) (hasura#1978) * remote relationship ui v1 * wip * ui for creating remote relationships * wip * ui fixes * ui fixes * functional ui * namespace ui wip * add functionality for dropping relationship * show exact error in notification * fix state inconsistencies * update reldef for namespaced fields * lint
### Description Make the unique parameters to be an optional field in the form. ### Changelog - [x] `CHANGELOG.md` is updated with user-facing content relevant to this PR. If no changelog is required, then add the `no-changelog-required` label. ### Affected components - [x] Console ### Related Issues Based on internal discussion: https://hasurahq.slack.com/archives/C01SQFJ7SHX/p1626948719012400 Closes #1890 ### Solution and Design This is more of adhoc solution for the unique parameters not being a required field: Using a checkbox to enable the additional unique params - if the user has not checked it, then the payload is sent without the unique params attribute. When the additional unique parameters are not selected -  When the additional unique parameters are picked -  hasura/graphql-engine-mono#1885 GitOrigin-RevId: dd16812
<!-- The PR description should answer 2 important questions: --> ### What Fixes a bug where scalar type lookup would use the values from the wrong data connector when resolving metadata. Many of our remote predicates tests use two copies of the same connector, which is why I imagine this was not discovered previously. V3_GIT_ORIGIN_REV_ID: d57b1985d53e9232f3909e7607f25ed8f16dd6c1
<!-- The PR description should answer 2 important questions: --> ### What Previously the SQL was silently dropping remote predicates, meaning a select permission that uses them would not work. We did not advertise this feature, as such, but there was nothing stopping a user from setting one up. Stacked on #1890 because the tests here rely on a `metadata-resolve` fix. This PR: - Makes the SQL layer execute any remote predicates that are found. This functionality is already used and tested extensively in the GraphQL layer, so it feels safe to do so. - Makes sure that relational query pushdown fails when a permission using a remote relationship is found A note on remote joins in SQL: - Actual remote joins are not used in SQL (we never construct `open_dds::query::RelationshipSelection` or `open_dds::query::RelationshipAggregateSelection` IR), but if they existed we would execute them now. V3_GIT_ORIGIN_REV_ID: 9d76586a91be28807e733a734b8123ed0be65dda
Description
This is a partial fix for the issues raised in #272. It improves the appearance of the page.
It makes the 500 page conform to the same structure as the 404 page.
The 500 page now displays all information currently delivered.
It does not address two closely related issues. I will file sepate issues for these:
Affected components
Related Issues
#272
#1340
#1886
#1887
#1888
Solution and Design
This is a first step towards a more comprehensive overhaul of this area of the codebase.
This is a simple cosmetic cleanup. Code generally follows the 404/PageNotFound.js structure.
Steps to test and verify
Observe that the resulting page is now at least somewhat informative and looks better
Limitations, known bugs & workarounds
Because the underlying error is a 404, if you reload the page, you get the actual 404 page.