https://prefect.io logo
Title
c

Charles Leung

04/11/2023, 7:27 PM
Hi everyone, Im using the Prefect UI and I recently updated it using pip install -U prefect. However, when running prefect server start, i noticed that the PREFECT_API_URL isnt changing to the one I set in profiles.toml. This is causing my dashboard to not load 😞 any suggestions? I ran prefect config view and it spat out the right value for PREFECT_API_URL as well.
n

Nate

04/11/2023, 11:43 PM
hi @Charles Leung - is the profile you edited in your
profiles.toml
the active profile when you run
prefect server start
?
# set a profile
prefect profile use my-profile
c

Charles Leung

04/11/2023, 11:50 PM
Ya it was, I was upgrading to the newest prefect version and it didnt work. So I downgraded back to the old version (2.8.6), but now im facing another issue:
I know removing the prefect.db file will be a solution (on .prefect/prefect.db), but I have deployment flows and blocks saved there that I want to retain
r

Ryan Peden

04/12/2023, 11:59 PM
It looks like
cf1159bd0d3c
was the latest SQLite migration in 2.8.6: • Migration list • Revision ID You can downgrade the database to that revision. Make a backup copy first of the database first; then, this command should make the database compatible with 2.8.6 again:
prefect server database downgrade -r cf1159bd0d3c
m

Marius Vollmer

04/19/2023, 9:43 AM
Hello all, as I am having the same problem, I wonder if you have already been able to solve it, @Charles Leung? I get these errors:
alembic.util.exc.CommandError: The revision '15f5083c16bd' cannot be found.
Traceback (last call):
  File "/usr/local/lib/python3.10/site-packages/alembic/script/base.py", line 240, in _catch_revision_errors
    yield
  file "/usr/local/lib/python3.10/site-packages/alembic/script/base.py", line 450, in _upgrade_revs
    for script in reversed(list(revs))
  file "/usr/local/lib/python3.10/site-packages/alembic/script/revision.py", line 797, in iterate_revisions
    revisions, heads = fn(
  file "/usr/local/lib/python3.10/site-packages/alembic/script/revision.py", line 1452, in _collect_upgrade_revisions
    current_revisions = self.get_revisions(lower)
  File "/usr/local/lib/python3.10/site-packages/alembic/script/revision.py", line 525, in get_revisions
    return sum([self.get_revisions(id_elem) for id_elem in id_], ())
  File "/usr/local/lib/python3.10/site-packages/alembic/script/revision.py", line 525, in <listcomp>.
    return sum([self.get_revisions(id_elem) for id_elem in id_], ())
  File "/usr/local/lib/python3.10/site-packages/alembic/script/revision.py", line 550, in get_revisions
    return tuple(
  File "/usr/local/lib/python3.10/site-packages/alembic/script/revision.py", line 551, in <genexpr>.
    self._revision_for_ident(rev_id, branch_label)
  File "/usr/local/lib/python3.10/site-packages/alembic/script/revision.py", line 622, in _revision_for_ident
    raise ResolutionError(
alembic.script.revision.ResolutionError: No such revision or branch '15f5083c16bd'.

The above exception was the direct cause of the following exception:
.....
So in this case Postgre instead of SQLite. Do I have to downgrade the database first and then deploy the "old" version? Would I need to downgrade accordingly as follows?
Prefect Server Database Downgrade -r 4a1a0e4f89de