Skip to content

Add MySQLContainerCheckerMixin - #56

Merged
TomekFraczek merged 11 commits into
developmentfrom
catdi-config
Apr 8, 2026
Merged

Add MySQLContainerCheckerMixin#56
TomekFraczek merged 11 commits into
developmentfrom
catdi-config

Conversation

@tahaismail424

Copy link
Copy Markdown
Contributor

this PR aims to add a checker for dumping data from a mySQL server

new checker:
MySQLContainerCheckerMixin - identical to FileCheckerMixin, except it dumps to the source directory from the db first - it takes params db_url and dump_route to know how to route the request

@TomekFraczek TomekFraczek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks really good, two changes, that I think theoretically should be causing this to crash?

import pandas as pd
from source.checkers.local import FileCheckerMixin

class MySQLContainerCheckerMixin(FileCheckerMixin):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You're not using any of the functions in FileCheckerMixin right? May be easier to just use the BaseChecker

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

hmm i think im using the save function from FileChecker - i dont think BaseChecker has one :(

Comment thread source/checkers/local/db.py Outdated
elif not res.ok:
return {'to do': [], 'failure': [data]},
else:
return {'to do': [], 'failure': [{'detail': 'unknown error occured'}]} No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The save File Checker's save function requires two keys ('filename' and 'type') to be in all log entries.
'to do' are not log entries yet, since they need to be further processed, but the 'failures' are already considered log entries

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

addressed this!

@TomekFraczek
TomekFraczek changed the base branch from main to development March 9, 2026 16:49

@TomekFraczek TomekFraczek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM
Very nice work Taha

@TomekFraczek
TomekFraczek merged commit b8efbf0 into development Apr 8, 2026
1 check failed
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.

2 participants