can't add 1 to None this aint php/js
Details
not sure how to produce a repro of this - open to ideas
Diff Detail
- Repository
- R1 dagster
- Branch
- master
- Lint
Lint OK - Unit
No Unit Test Coverage
Event Timeline
python_modules/dagster/dagster/core/storage/event_log/sql_event_log.py | ||
---|---|---|
302 | should we assume 1 instead of 0 here ? Im still not sure how we got a restart without a start event |
python_modules/dagster/dagster/core/storage/event_log/sql_event_log.py | ||
---|---|---|
215–327 | hmm |
python_modules/dagster/dagster/core/storage/event_log/sql_event_log.py | ||
---|---|---|
224 | Don't need this here since we don't use it | |
283 | unfortunately that query does a group by event type, so all the restart events get grouped. we need to be able to count each restart event | |
283 | which is why it's down here with materializations and step expectation results, where you can also have > 1 of the event type per step key |
python_modules/dagster/dagster/core/storage/event_log/sql_event_log.py | ||
---|---|---|
302 | maybe do 1, maybe leave a comment? | |
python_modules/dagster/dagster_tests/core_tests/storage_tests/test_local_instance.py | ||
207–212 ↗ | (On Diff #26001) | _count should get bumped, no? Did you make sure this test failed without the fix? |
python_modules/dagster/dagster/core/storage/event_log/sql_event_log.py | ||
---|---|---|
283 | But couldn't you add a count to the selection and just use that? e.g. by_step_query = ( db.select( [ SqlEventLogStorageTable.c.step_key, SqlEventLogStorageTable.c.dagster_event_type, db.func.max(SqlEventLogStorageTable.c.timestamp).label("timestamp"), db.func.count(SqlEventLogStorageTable.c.id).label("count"), ] ) .where(SqlEventLogStorageTable.c.run_id == run_id) .where(SqlEventLogStorageTable.c.step_key != None) .where(SqlEventLogStorageTable.c.dagster_event_type.in_(STEP_STATS_EVENT_TYPES)) ) |
python_modules/dagster/dagster/core/storage/event_log/sql_event_log.py | ||
---|---|---|
283 | good call |
Should note that there is a logical difference here in the attempts count, depending on what the right behavior is when there is no start event