Skip to content
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

db: add flow nums to task jobs table #5259

Conversation

wxtim
Copy link
Member

@wxtim wxtim commented Dec 5, 2022

Closes #5252

Check List

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Applied any dependency changes to both setup.cfg and conda-environment.yml.
  • Tests are included (or explain why tests are not needed).
  • CHANGES.md entry included if this is a change that can affect users
  • Cylc-Doc pull request opened if required at cylc/cylc-doc/pull/XXXX.
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

@wxtim wxtim self-assigned this Dec 5, 2022
@wxtim wxtim added the small label Dec 5, 2022
@wxtim wxtim force-pushed the 20221201T1534--8.0.x--add_flow_nums_to_task_jobs_table branch from 840d70a to eb2c876 Compare December 5, 2022 15:40
@wxtim wxtim changed the title 20221201 t1534 8.0.x add flow nums to task jobs table 8.0.x: add flow nums to task jobs table Dec 5, 2022
@datamel
Copy link
Contributor

datamel commented Dec 6, 2022

Has something weird happened to the rebase? I'm seeing another pr's changes in here.

@wxtim wxtim changed the base branch from master to 8.0.x December 6, 2022 10:58
@wxtim
Copy link
Member Author

wxtim commented Dec 6, 2022

Has something weird happened to the rebase? I'm seeing another pr's changes in here.

Yes - I forgot to change this to being a PR against 8.0.x rather than master.

@wxtim wxtim force-pushed the 20221201T1534--8.0.x--add_flow_nums_to_task_jobs_table branch from 25cbccd to fe62abb Compare December 6, 2022 11:42
@wxtim wxtim changed the base branch from 8.0.x to master December 6, 2022 11:42
@wxtim wxtim force-pushed the 20221201T1534--8.0.x--add_flow_nums_to_task_jobs_table branch 3 times, most recently from 7657cc3 to 22ba527 Compare December 6, 2022 11:54
Copy link
Member

@oliver-sanders oliver-sanders left a comment

Choose a reason for hiding this comment

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

LGTM

CHANGES.md Outdated Show resolved Hide resolved
tests/unit/test_workflow_db_mgr.py Outdated Show resolved Hide resolved
@wxtim wxtim changed the title 8.0.x: add flow nums to task jobs table master: add flow nums to task jobs table Dec 6, 2022
@wxtim wxtim force-pushed the 20221201T1534--8.0.x--add_flow_nums_to_task_jobs_table branch from 64150dd to 0cd811b Compare December 6, 2022 13:13
@wxtim wxtim force-pushed the 20221201T1534--8.0.x--add_flow_nums_to_task_jobs_table branch from 0cd811b to 4694fb0 Compare December 6, 2022 13:31
@oliver-sanders
Copy link
Member

FAILED tests/integration/test_workflow_db_mgr.py::test_db_upgrade_pre_803 - sqlite3.OperationalError: duplicate column name: flow_nums

@wxtim wxtim marked this pull request as draft December 8, 2022 10:42
@wxtim wxtim force-pushed the 20221201T1534--8.0.x--add_flow_nums_to_task_jobs_table branch from fa5cc8f to 07de574 Compare December 8, 2022 16:16
@oliver-sanders oliver-sanders added this to the cylc-8.1.0 milestone Dec 9, 2022
@wxtim wxtim marked this pull request as ready for review December 9, 2022 10:43
@oliver-sanders oliver-sanders changed the title master: add flow nums to task jobs table db: add flow nums to task jobs table Dec 12, 2022
Copy link
Member

@oliver-sanders oliver-sanders left a comment

Choose a reason for hiding this comment

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

This fails when trying to upgrade a real workflow:

$ git checkout upstream/master
$ cylc play foo
$ cylc stop foo
$ git checkout tim/.....
$ cylc play -n foo
...
ERROR - An error occurred when writing to the database,
...
sqlite3.OperationalError: table task_jobs has 16 columns but 15 values were supplied

… of github.com:wxtim/cylc into 20221201T1534--8.0.x--add_flow_nums_to_task_jobs_table

* '20221201T1534--8.0.x--add_flow_nums_to_task_jobs_table' of github.com:wxtim/cylc:
  fixup
  fixed tests
Copy link
Member

@oliver-sanders oliver-sanders left a comment

Choose a reason for hiding this comment

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

Ignore me, being daft.

The upgrader logic currently cannot handle upgrades from earlier in the same dev version. So long as it works correctly with official releases all good.

Copy link
Contributor

@datamel datamel left a comment

Choose a reason for hiding this comment

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

Checked out and tested. Code also read. No problems found from me. Thanks @wxtim.

@datamel datamel merged commit 57833b4 into cylc:master Dec 15, 2022
@MetRonnie MetRonnie added the db change Change to the workflow database structure label Dec 19, 2022
@wxtim wxtim deleted the 20221201T1534--8.0.x--add_flow_nums_to_task_jobs_table branch January 12, 2023 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
db change Change to the workflow database structure small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update task_jobs table in database
4 participants