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

Initialize schema on PdoRepository creation #355

Merged
merged 1 commit into from
Oct 22, 2020
Merged

Conversation

glensc
Copy link
Contributor

@glensc glensc commented Oct 22, 2020

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:

This fixes problem that if no saves have been recorded the listing throws
fatal error with PDO storage.
@glensc glensc self-assigned this Oct 22, 2020
@glensc glensc merged commit 36d4cd4 into master Oct 22, 2020
@glensc glensc deleted the pdo-init-schema branch October 22, 2020 09:51
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant