Skip to content

Making the design fully append only#252

Merged
SKS94 merged 17 commits intodevelopmentfrom
append_only_database_scheme
Jun 18, 2025
Merged

Making the design fully append only#252
SKS94 merged 17 commits intodevelopmentfrom
append_only_database_scheme

Conversation

@SKS94
Copy link
Copy Markdown
Collaborator

@SKS94 SKS94 commented Mar 28, 2025

To make the entire database design fully Append only, two tables tracking the is_active states of quantities and tenants are needed. This has been added to the database, and all the necessary changes to the internal sqlalchemy queries have been changed.

I have tested registration of tenants and capabilities, along with the de-registration cli. The endpoints for capabilities and tenants are also functioning as far as I can see.

The status field for requests and results were tracked indivually in tracking tables, but were still present in the main tables. This has been removed, and all necessary queries dealing with this has been updated

@SKS94 SKS94 marked this pull request as ready for review March 31, 2025 21:30
@SKS94 SKS94 requested a review from MonikaVo March 31, 2025 21:30
Copy link
Copy Markdown
Collaborator

@MonikaVo MonikaVo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I run the code, it gives me some errors. I mentioned them in the comments and tried to describe my findings.

Comment thread src/FINALES2/db/tables/is_active_log_tenants.py
Comment thread src/FINALES2/engine/main.py Outdated
Comment thread src/FINALES2/engine/main.py
Comment thread src/FINALES2/engine/main.py
Comment thread src/FINALES2/engine/server_manager.py Outdated
Comment thread src/FINALES2/engine/server_manager.py Outdated
Comment thread src/FINALES2/server/schemas.py
Comment thread src/FINALES2/engine/server_manager.py
Comment thread src/FINALES2/engine/server_manager.py Outdated
Comment thread src/FINALES2/engine/server_manager.py
@SKS94
Copy link
Copy Markdown
Collaborator Author

SKS94 commented May 27, 2025

@MonikaVo I did the inital response to all your comments, and fixed the problematic errors.

Copy link
Copy Markdown
Collaborator

@MonikaVo MonikaVo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it again and had again some new issues. I added comments for these. Please let me know if you have a different point of view on these issues.

Comment thread src/FINALES2/engine/server_manager.py Outdated
Comment thread src/FINALES2/engine/server_manager.py Outdated
@SKS94
Copy link
Copy Markdown
Collaborator Author

SKS94 commented Jun 6, 2025

@MonikaVo Hi Monika, back to you :)

SKS94 and others added 5 commits June 18, 2025 08:26
only one logger and makes all the services use this
logger. This avoids logging the same messages three
times.

The change in gitignore excludes the config file
from git commits to avoid the accidential commit of
the config file, which shall remain local.
Copy link
Copy Markdown
Collaborator

@MonikaVo MonikaVo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that this works now. :)

@SKS94 SKS94 merged commit 313381e into development Jun 18, 2025
2 checks passed
@edan-bainglass
Copy link
Copy Markdown

@MonikaVo @SKS94 hi 👋 I'm working on a PREMISE deliverable involving FINALES (@MonikaVo is aware) and am running into a minor issue - the README instructions are broken? Specifically, finales devtest populate-db seems to be referencing an old Quantity schema (model) that had is_active, which this PR removed. Can you please advise? 🙏

@MonikaVo
Copy link
Copy Markdown
Collaborator

MonikaVo commented Mar 3, 2026

Hi @edan-bainglass,

I cannot test it at the moment, but could you please try to delete line 62 in https://github.com/BIG-MAP/FINALES2/blob/main/src/FINALES2/cli/devtest.py and check if it works then? Since this contains the is_active key in the structure used in devtest, I would assume that this could fix the issue.

@edan-bainglass
Copy link
Copy Markdown

Hi @edan-bainglass,

I cannot test it at the moment, but could you please try to delete line 62 in https://github.com/BIG-MAP/FINALES2/blob/main/src/FINALES2/cli/devtest.py and check if it works then? Since this contains the is_active key in the structure used in devtest, I would assume that this could fix the issue.

Thanks @MonikaVo. That works 🙂

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.

3 participants