-
-
Notifications
You must be signed in to change notification settings - Fork 4
Refactor job manager #126
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
Merged
Merged
Refactor job manager #126
Changes from 21 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
67df2ad
start
mlapaglia c6a5166
more
mlapaglia 4d671fe
more
mlapaglia 25f0e4b
Merge branch 'develop' into refactor-job-manager
mlapaglia 9837e4e
lint
mlapaglia 93688e6
test fixes
mlapaglia b27fbf7
moar enum
mlapaglia 08f9897
but wait, theres more!
mlapaglia db8e3aa
more fixes
mlapaglia 5dc0ccb
more tests
mlapaglia 3223236
UUID everywhere
mlapaglia 9ce965b
more
mlapaglia 5ec4d97
db migration
mlapaglia 80f80bb
lint
mlapaglia e5c843b
Merge branch 'develop' into refactor-job-manager
mlapaglia 077c550
test lint/fixes
mlapaglia a34da19
Merge branch 'refactor-job-manager' of https://github.com/mlapaglia/B…
mlapaglia 5eef7cb
more
mlapaglia fd16e2a
MERGE
mlapaglia c360aec
more
mlapaglia 5655a54
more
mlapaglia b788137
Potential fix for code scanning alert no. 212: Information exposure t…
mlapaglia a8ebbf4
more
mlapaglia e465f3f
more
mlapaglia baf0285
more
mlapaglia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
src/borgitory/alembic/versions/fdd026a5ad52_update_job_models_to_use_uuid_primary_.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| """Update job models to use UUID primary keys | ||
|
|
||
| Revision ID: fdd026a5ad52 | ||
| Revises: 18b9095bc772 | ||
| Create Date: 2025-10-05 10:23:19.044630 | ||
|
|
||
| """ | ||
|
|
||
| from typing import Sequence, Union | ||
|
|
||
| from alembic import op | ||
| import sqlalchemy as sa | ||
|
|
||
|
|
||
| # revision identifiers, used by Alembic. | ||
| revision: str = "fdd026a5ad52" | ||
| down_revision: Union[str, Sequence[str], None] = "18b9095bc772" | ||
| branch_labels: Union[str, Sequence[str], None] = None | ||
| depends_on: Union[str, Sequence[str], None] = None | ||
|
|
||
|
|
||
| def upgrade() -> None: | ||
| """Upgrade schema.""" | ||
| # ### commands auto generated by Alembic - please adjust! ### | ||
| with op.batch_alter_table("job_tasks", schema=None) as batch_op: | ||
| batch_op.alter_column( | ||
| "job_id", | ||
| existing_type=sa.VARCHAR(), | ||
| type_=sa.Uuid(), | ||
| existing_nullable=False, | ||
| ) | ||
|
|
||
| with op.batch_alter_table("jobs", schema=None) as batch_op: | ||
| batch_op.alter_column( | ||
| "id", existing_type=sa.VARCHAR(), type_=sa.Uuid(), existing_nullable=False | ||
| ) | ||
|
|
||
| # ### end Alembic commands ### | ||
|
|
||
|
|
||
| def downgrade() -> None: | ||
| """Downgrade schema.""" | ||
| # ### commands auto generated by Alembic - please adjust! ### | ||
| with op.batch_alter_table("jobs", schema=None) as batch_op: | ||
| batch_op.alter_column( | ||
| "id", existing_type=sa.Uuid(), type_=sa.VARCHAR(), existing_nullable=False | ||
| ) | ||
|
|
||
| with op.batch_alter_table("job_tasks", schema=None) as batch_op: | ||
| batch_op.alter_column( | ||
| "job_id", | ||
| existing_type=sa.Uuid(), | ||
| type_=sa.VARCHAR(), | ||
| existing_nullable=False, | ||
| ) | ||
|
|
||
| # ### end Alembic commands ### |
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Check warning
Code scanning / CodeQL
Information exposure through an exception Medium
Copilot Autofix
AI 28 days ago
To fix this information exposure issue, we should avoid displaying the stringified exception message
str(e)to the external user. Instead, provide a generic error message whenever aValueErroroccurs. The actual exception details can be logged on the server for diagnostics.Specifically, edit lines 88–91 in
src/borgitory/api/repository_stats.pyso that:logging.warning) for developers’ reference.No additional imports are needed, as the
loggingmodule is already imported.