remove database backend #489#507
Open
joshdimanteto wants to merge 30 commits intoremove-older-python-versions-#517from
Open
remove database backend #489#507joshdimanteto wants to merge 30 commits intoremove-older-python-versions-#517from
joshdimanteto wants to merge 30 commits intoremove-older-python-versions-#517from
Conversation
5e5d6c4 to
743b34b
Compare
86a347f to
c3a28c4
Compare
c3a28c4 to
2939010
Compare
e1afd0a to
34d2603
Compare
- remove downgrade of setuptools
Added `# noqa: B907` in several places where manual quoting is required for valid SQL query syntax. Using `!r` would change the format and break query parsing, so explicit quotes are necessary. This ensures tests and API calls remain correct while satisfying linting requirements.
- In the test_query_filter_factory the test don't work on the CI as it is not setting up the db backend.
04a2567 to
8673a50
Compare
94aad25 to
e280471
Compare
joshdimanteto
commented
Nov 17, 2025
Comment on lines
362
to
414
| - name: Setup Java | ||
| uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: 8 | ||
|
|
||
| # ICAT Ansible clone and install dependencies | ||
| - name: Checkout icat-ansible | ||
| if: success() | ||
| uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | ||
| with: | ||
| repository: icatproject-contrib/icat-ansible | ||
| ref: master | ||
| path: icat-ansible | ||
| - name: Install Ansible | ||
| run: pip install -r icat-ansible/requirements.txt | ||
| # Prep for running the playbook | ||
| - name: Create hosts file | ||
| run: echo -e "[icatdb_minimal_hosts]\nlocalhost ansible_connection=local" > icat-ansible/hosts | ||
| - name: Prepare vault pass | ||
| run: echo -e "icattravispw" > icat-ansible/vault_pass.txt | ||
| - name: Move vault to directory it'll get detected by Ansible | ||
| run: mv icat-ansible/vault.yml icat-ansible/group_vars/all | ||
| - name: Replace default payara user with Actions user | ||
| run: | | ||
| sed -i -e "s/^payara_user: \"glassfish\"/payara_user: \"runner\"/" icat-ansible/group_vars/all/vars.yml | ||
|
|
||
| # Force hostname to localhost - bug fix for previous ICAT Ansible issues on Actions | ||
| - name: Change hostname to localhost | ||
| run: sudo hostname -b localhost | ||
|
|
||
| # Remove existing MySQL installation so it doesn't interfere with GitHub Actions | ||
| - name: Remove existing mysql | ||
| run: | | ||
| sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld | ||
| sudo apt-get remove --purge "mysql*" | ||
| sudo rm -rf /var/lib/mysql* /etc/mysql | ||
|
|
||
| # Create local instance of ICAT | ||
| - name: Run ICAT Ansible Playbook | ||
| run: | | ||
| ansible-playbook icat-ansible/icatdb_minimal_hosts.yml -i icat-ansible/hosts --vault-password-file icat-ansible/vault_pass.txt -vv | ||
|
|
||
| # rootUserNames needs editing as anon/anon is used in search API and required to pass endpoint tests | ||
| - name: Add anon user to rootUserNames | ||
| run: | | ||
| awk -F" =" '/rootUserNames/{$2="= simple/root anon/anon";print;next}1' /home/runner/install/icat.server/run.properties > /home/runner/install/icat.server/run.properties.tmp | ||
| - name: Apply rootUserNames change | ||
| run: | | ||
| mv -f /home/runner/install/icat.server/run.properties.tmp /home/runner/install/icat.server/run.properties | ||
| - name: Reinstall ICAT Server | ||
| run: | | ||
| cd /home/runner/install/icat.server/ && ./setup -vv install |
Author
There was a problem hiding this comment.
check if this is still needed
Author
There was a problem hiding this comment.
it is, as it needs an ICAT server
Contributor
There was a problem hiding this comment.
Just wondering why it was working before without any of this but now it needs all the ICAT stuff?
Author
There was a problem hiding this comment.
This work before as it was using the db backend instead of the python icat backend so it didn't need the extra setup
9ac04a6 to
84b9f59
Compare
joshdimanteto
commented
Feb 9, 2026
joshdimanteto
commented
Feb 9, 2026
| @@ -45,11 +42,10 @@ def flask_test_app(): | |||
| def flask_test_app_db(): | |||
Author
There was a problem hiding this comment.
This name should change. I have changed in #524 where i had to refactored the tests
VKTB
reviewed
Feb 10, 2026
Comment on lines
362
to
414
| - name: Setup Java | ||
| uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: 8 | ||
|
|
||
| # ICAT Ansible clone and install dependencies | ||
| - name: Checkout icat-ansible | ||
| if: success() | ||
| uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | ||
| with: | ||
| repository: icatproject-contrib/icat-ansible | ||
| ref: master | ||
| path: icat-ansible | ||
| - name: Install Ansible | ||
| run: pip install -r icat-ansible/requirements.txt | ||
| # Prep for running the playbook | ||
| - name: Create hosts file | ||
| run: echo -e "[icatdb_minimal_hosts]\nlocalhost ansible_connection=local" > icat-ansible/hosts | ||
| - name: Prepare vault pass | ||
| run: echo -e "icattravispw" > icat-ansible/vault_pass.txt | ||
| - name: Move vault to directory it'll get detected by Ansible | ||
| run: mv icat-ansible/vault.yml icat-ansible/group_vars/all | ||
| - name: Replace default payara user with Actions user | ||
| run: | | ||
| sed -i -e "s/^payara_user: \"glassfish\"/payara_user: \"runner\"/" icat-ansible/group_vars/all/vars.yml | ||
|
|
||
| # Force hostname to localhost - bug fix for previous ICAT Ansible issues on Actions | ||
| - name: Change hostname to localhost | ||
| run: sudo hostname -b localhost | ||
|
|
||
| # Remove existing MySQL installation so it doesn't interfere with GitHub Actions | ||
| - name: Remove existing mysql | ||
| run: | | ||
| sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld | ||
| sudo apt-get remove --purge "mysql*" | ||
| sudo rm -rf /var/lib/mysql* /etc/mysql | ||
|
|
||
| # Create local instance of ICAT | ||
| - name: Run ICAT Ansible Playbook | ||
| run: | | ||
| ansible-playbook icat-ansible/icatdb_minimal_hosts.yml -i icat-ansible/hosts --vault-password-file icat-ansible/vault_pass.txt -vv | ||
|
|
||
| # rootUserNames needs editing as anon/anon is used in search API and required to pass endpoint tests | ||
| - name: Add anon user to rootUserNames | ||
| run: | | ||
| awk -F" =" '/rootUserNames/{$2="= simple/root anon/anon";print;next}1' /home/runner/install/icat.server/run.properties > /home/runner/install/icat.server/run.properties.tmp | ||
| - name: Apply rootUserNames change | ||
| run: | | ||
| mv -f /home/runner/install/icat.server/run.properties.tmp /home/runner/install/icat.server/run.properties | ||
| - name: Reinstall ICAT Server | ||
| run: | | ||
| cd /home/runner/install/icat.server/ && ./setup -vv install |
Contributor
There was a problem hiding this comment.
Just wondering why it was working before without any of this but now it needs all the ICAT stuff?
a68b552 to
9fae76f
Compare
This file contains hidden or 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
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 PR will close #489
Description
Remove the database backend functionality from the DataGateway API. It includes significant changes such as deleting database-related files and functionality, updating tests to remove database dependencies, and modifying the configuration to align with the changes.
Testing Instructions
Add a set up instructions describing how the reviewer should test the code
icatdb Generator Script Consistency TestCI job fails, is this because of a deliberate change made to the script to change generated data (which isn't actually a problem) or is here an underlying issue with the changes made?fix:,feat:orBREAKING CHANGE:so a release is automatically made via GitHub Actions upon merge?Agile Board Tracking
Connect to #489
notes
The icat models still use SQLAlchemy, this is going to be update in the pydantic V2 upgrade to use pydantic