-
Notifications
You must be signed in to change notification settings - Fork 342
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
Initialize schema on PdoRepository creation #355
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This fixes problem that if no saves have been recorded the listing throws fatal error with PDO storage.
wmfgerrit
pushed a commit
to wikimedia/operations-software-xhgui
that referenced
this pull request
Jul 6, 2023
The XHGui install at Wikimedia Foundation is deployed with database credentials that permit read-write operations (SELECT, INSERT) but as safety precaution do not permit admin actions like CREATE from individual web requests. In addition to not allowing admin actions, our install also disallows DELETE queries, given that the install is exposed to the public Internet (ref perftools#248) and further disables POST requests (so that those features serve HTTP 40x instead of a db query error with HTTP 50x). Since XHGui version 0.16.0, with perftools#355, the lazy-creation for tables was moved from the Saver code (which is not used when browsing XHGui) to to Repo code, and thus resulted in the application serving HTTP 500 on all requests, unless the `CREATE TABLE` query is permitted on all web requests. Fix this by making this method call feature flagged in a way that can be disabled. Change-Id: I681d500fd393a47471a475b705c67280b39ab7ce
wmfgerrit
pushed a commit
to wikimedia/operations-software-xhgui
that referenced
this pull request
Jul 10, 2023
The XHGui install at Wikimedia Foundation is deployed with database credentials that permit read-write operations (SELECT, INSERT) but as safety precaution do not permit admin actions like CREATE from individual web requests. In addition to not allowing admin actions, our install also disallows DELETE queries, given that the install is exposed to the public Internet (ref perftools#248) and further disables POST requests (so that those features serve HTTP 40x instead of a db query error with HTTP 50x). Since XHGui version 0.16.0, with perftools#355, the lazy-creation for tables was moved from the Saver code (which is not used when browsing XHGui) to to Repo code, and thus resulted in the application serving HTTP 500 on all requests, unless the `CREATE TABLE` query is permitted on all web requests. Fix this by making this method call feature flagged in a way that can be disabled. Change-Id: I681d500fd393a47471a475b705c67280b39ab7ce
wmfgerrit
pushed a commit
to wikimedia/operations-software-xhgui
that referenced
this pull request
Jul 10, 2023
The XHGui install at Wikimedia Foundation is deployed with database credentials that permit read-write operations (SELECT, INSERT) but as safety precaution do not permit admin actions like CREATE from individual web requests. In addition to not allowing admin actions, our install also disallows DELETE queries, given that the install is exposed to the public Internet (ref perftools#248) and further disables POST requests (so that those features serve HTTP 40x instead of a db query error with HTTP 50x). Since XHGui version 0.16.0, with perftools#355, the lazy-creation for tables was moved from the Saver code (which is not used when browsing XHGui) to to Repo code, and thus resulted in the application serving HTTP 500 on all requests, unless the `CREATE TABLE` query is permitted on all web requests. Fix this by making this method call feature flagged in a way that can be disabled. Bug: T341499 Change-Id: I681d500fd393a47471a475b705c67280b39ab7ce
wmfgerrit
pushed a commit
to wikimedia/operations-software-xhgui
that referenced
this pull request
Jul 10, 2023
The XHGui install at Wikimedia Foundation is deployed with database credentials that permit read-write operations (SELECT, INSERT) but as safety precaution do not permit admin actions like CREATE from individual web requests. In addition to not allowing admin actions, our install also disallows DELETE queries, given that the install is exposed to the public Internet (ref perftools#248) and further disables POST requests (so that those features serve HTTP 40x instead of a db query error with HTTP 50x). Since XHGui version 0.16.0, with perftools#355, the lazy-creation for tables was moved from the Saver code (which is not used when browsing XHGui) to to Repo code, and thus resulted in the application serving HTTP 500 on all requests, unless the `CREATE TABLE` query is permitted on all web requests. Fix this by making this method call feature flagged in a way that can be disabled using XHGUI_PDO_INITSCHEMA=false. Change-Id: I681d500fd393a47471a475b705c67280b39ab7ce
wmfgerrit
pushed a commit
to wikimedia/operations-software-xhgui
that referenced
this pull request
Jul 10, 2023
The XHGui install at Wikimedia Foundation is deployed with database credentials that permit read-write operations (SELECT, INSERT) but as safety precaution do not permit admin actions like CREATE from individual web requests. In addition to not allowing admin actions, our install also disallows DELETE queries, given that the install is exposed to the public Internet (ref perftools#248) and further disables POST requests (so that those features serve HTTP 40x instead of a db query error with HTTP 50x). Since XHGui version 0.16.0, with perftools#355, the lazy-creation for tables was moved from the Saver code (which is not used when browsing XHGui) to to Repo code, and thus resulted in the application serving HTTP 500 on all requests, unless the `CREATE TABLE` query is permitted on all web requests. Fix this by making this method call feature flagged in a way that can be disabled using XHGUI_PDO_INITSCHEMA=false. Change-Id: I681d500fd393a47471a475b705c67280b39ab7ce
wmfgerrit
pushed a commit
to wikimedia/operations-software-xhgui
that referenced
this pull request
Jul 10, 2023
The XHGui install at Wikimedia Foundation is deployed with database credentials that permit read-write operations (SELECT, INSERT) but as safety precaution do not permit admin actions like CREATE from individual web requests. In addition to not allowing admin actions, our install also disallows DELETE queries, given that the install is exposed to the public Internet (ref perftools#248) and further disables POST requests (so that those features serve HTTP 40x instead of a db query error with HTTP 50x). Since XHGui version 0.16.0, with perftools#355, the lazy-creation for tables was moved from the Saver code (which is not used when browsing XHGui) to to Repo code, and thus resulted in the application serving HTTP 500 on all requests, unless the `CREATE TABLE` query is permitted on all web requests. Fix this by making this method call feature flagged in a way that can be disabled using XHGUI_PDO_INITSCHEMA=false. Change-Id: I681d500fd393a47471a475b705c67280b39ab7ce
wmfgerrit
pushed a commit
to wikimedia/operations-software-xhgui
that referenced
this pull request
Jul 10, 2023
The XHGui install at Wikimedia Foundation is deployed with database credentials that permit read-write operations (SELECT, INSERT) but as safety precaution do not permit admin actions like CREATE from individual web requests. In addition to not allowing admin actions, our install also disallows DELETE queries, given that the install is exposed to the public Internet (ref perftools#248) and further disables POST requests (so that those features serve HTTP 40x instead of a db query error with HTTP 50x). Since XHGui version 0.16.0, with perftools#355, the lazy-creation for tables was moved from the Saver code (which is not used when browsing XHGui) to to Repo code, and thus resulted in the application serving HTTP 500 on all requests, unless the `CREATE TABLE` query is permitted on all web requests. Fix this by making this method call feature flagged in a way that can be disabled using XHGUI_PDO_INITSCHEMA=false. Change-Id: I681d500fd393a47471a475b705c67280b39ab7ce
wmfgerrit
pushed a commit
to wikimedia/operations-software-xhgui
that referenced
this pull request
Jul 11, 2023
The XHGui install at Wikimedia Foundation is deployed with database credentials that permit read-write operations (SELECT, INSERT) but as safety precaution do not permit admin actions like CREATE from individual web requests. In addition to not allowing admin actions, our install also disallows DELETE queries, given that the install is exposed to the public Internet (ref perftools#248) and further disables POST requests (so that those features serve HTTP 40x instead of a db query error with HTTP 50x). Since XHGui version 0.16.0, with perftools#355, the lazy-creation for tables was moved from the Saver code (which is not used when browsing XHGui) to to Repo code, and thus resulted in the application serving HTTP 500 on all requests, unless the `CREATE TABLE` query is permitted on all web requests. Fix this by making this method call feature flagged in a way that can be disabled using XHGUI_PDO_INITSCHEMA=false. Change-Id: I681d500fd393a47471a475b705c67280b39ab7ce
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes the problem that if no saves have been recorded the listing throws
fatal error with PDO storage.
In the future, the table init could be perhaps created lazily: