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

fix weird flake in integration tests with sqlite #17036

Open
zzstoatzz opened this issue Feb 7, 2025 · 3 comments · Fixed by #17044
Open

fix weird flake in integration tests with sqlite #17036

zzstoatzz opened this issue Feb 7, 2025 · 3 comments · Fixed by #17044
Labels
development Tech debt, refactors, CI, tests, and other related work.

Comments

@zzstoatzz
Copy link
Collaborator

zzstoatzz commented Feb 7, 2025

Bug summary

see https://github.com/PrefectHQ/prefect/actions/runs/13191059627/job/36823978425#step:3:2242

  File "/usr/local/lib/python3.9/site-packages/prefect/server/database/_migrations/env.py", line 159, in do_run_migrations
    context.run_migrations()
  File "<string>", line 8, in run_migrations
  File "/usr/local/lib/python3.9/site-packages/alembic/runtime/environment.py", line 946, in run_migrations
    self.get_context().run_migrations(**kw)
  File "/usr/local/lib/python3.9/site-packages/alembic/runtime/migration.py", line 611, in run_migrations
    for step in self._migrations_fn(heads, self):
  File "/usr/local/lib/python3.9/site-packages/alembic/command.py", line 442, in downgrade
    return script._downgrade_revs(revision, rev)
  File "/usr/local/lib/python3.9/site-packages/alembic/script/base.py", line 476, in _downgrade_revs
    return [
  File "/usr/local/lib/python3.9/site-packages/alembic/script/base.py", line 476, in <listcomp>
    return [
  File "/usr/local/lib/python3.9/site-packages/alembic/script/revision.py", line 814, in iterate_revisions
    revisions, heads = fn(
  File "/usr/local/lib/python3.9/site-packages/alembic/script/revision.py", line 1339, in _collect_downgrade_revisions
    branch_label, target_revision = self._parse_downgrade_target(
  File "/usr/local/lib/python3.9/site-packages/alembic/script/revision.py", line 1211, in _parse_downgrade_target
    return branch_label, self.get_revision(symbol)
  File "/usr/local/lib/python3.9/site-packages/alembic/script/revision.py", line 584, in get_revision
    resolved_id, branch_label = self._resolve_revision_number(id_)
  File "/usr/local/lib/python3.9/site-packages/alembic/script/revision.py", line 768, in _resolve_revision_number
    self._revision_map
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py", line 1145, in __get__
    obj.__dict__[self.__name__] = result = self.fget(obj)
  File "/usr/local/lib/python3.9/site-packages/alembic/script/revision.py", line 245, in _revision_map
    down_revision = map_[downrev]
KeyError: '354f1ede7e9f'

Version info

main

Additional context

No response

@zzstoatzz zzstoatzz added the development Tech debt, refactors, CI, tests, and other related work. label Feb 7, 2025
@cicdw
Copy link
Member

cicdw commented Feb 7, 2025

I was just looking at this!! Yea it seems to have cropped up consistently.

@aaazzam aaazzam mentioned this issue Feb 7, 2025
@cicdw
Copy link
Member

cicdw commented Feb 7, 2025

Doesn't always happen on older versions of sqlite: https://github.com/PrefectHQ/prefect/actions/runs/13203592361/job/36861326261?pr=17033

@cicdw
Copy link
Member

cicdw commented Feb 8, 2025

This is still very much alive, my proposed fix didn't change anything

@cicdw cicdw reopened this Feb 8, 2025
@zzstoatzz zzstoatzz changed the title fix weird flake in integration tests with old sqlite fix weird flake in integration tests with sqlite Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Tech debt, refactors, CI, tests, and other related work.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants