Skip to content

Fix SQLAlchemy warning during fitID synchronization - #2811

Open
deximple wants to merge 2 commits into
pyfa-org:masterfrom
deximple:fix-2057
Open

deximple wants to merge 2 commits into
pyfa-org:masterfrom
deximple:fix-2057

Conversation

@deximple

@deximple deximple commented Oct 8, 2026

Copy link
Copy Markdown

Fixes #2057.

I reproduced the warning in #2057 by changing a loaded cargo row's owner. SQLAlchemy synchronizes its fitID during flush, which invokes the column listener and changes a previously clean fit's modification time too late to persist it.

I exclude fitID from the column listeners. Fit collection listeners still track additions and removals, and ordinary cargo edits still update the fit's timestamp.

The regression test fails with the reported warning before the fix and passes afterward.

Regression test: tests/test_modules/test_eos/test_saveddata/test_events.py (fails before the fix, passes after).


This pull request was prepared with an AI coding assistant (OpenAI Codex driven by a verification harness) and reviewed by a person before it was opened. The regression test was checked to fail on the current code by an assertion and to pass with the fix 5/5 times in a row.

This branch has not been deployed

No deployments
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.

SQLAlchemy warning

1 participant