project-chip / certification-tool

A test harness and tooling designed to simplify development, testing, and certification for devices, guided by the Connectivity Standards Alliance.
https://csa-iot.org/
Apache License 2.0
36 stars 22 forks source link

[Bug] Unable to start certification-tool-backend-1 properly #322

Open yf-fan-org opened 1 month ago

yf-fan-org commented 1 month ago

Describe the bug

Unable to start certification-tool-backend-1 properly,log is: INFO | 2024-07-30 08:16:09.797 | app.log:configure_notifier_handler:111 | Exception notifier not enabled INFO | 2024-07-30 08:16:11.116 | main__:main:50 | Initializing service INFO | 2024-07-30 08:16:11.118 | tenacity.before:log_it:27 | Starting call to 'main.init', this is the 1st time calling it. INFO | 2024-07-30 08:16:11.236 | main:main:52 | Service finished initializing INFO | 2024-07-30 08:16:17.761 | app.log:__configure_notifier_handler:111 | Exception notifier not enabled INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL. ERROR [alembic.util.messaging] Can't locate revision identified by '9df8004ad9bb' FAILED: Can't locate revision identified by '9df8004ad9bb'

Steps to reproduce the behavior

No response

Expected behavior

No response

Log files

INFO | 2024-07-30 08:16:09.797 | app.log:configure_notifier_handler:111 | Exception notifier not enabled INFO | 2024-07-30 08:16:11.116 | main__:main:50 | Initializing service INFO | 2024-07-30 08:16:11.118 | tenacity.before:log_it:27 | Starting call to 'main.init', this is the 1st time calling it. INFO | 2024-07-30 08:16:11.236 | main:main:52 | Service finished initializing INFO | 2024-07-30 08:16:17.761 | app.log:__configure_notifier_handler:111 | Exception notifier not enabled INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL. ERROR [alembic.util.messaging] Can't locate revision identified by '9df8004ad9bb' FAILED: Can't locate revision identified by '9df8004ad9bb'

PICS file

No response

Screenshots

No response

Environment

v2.10.1+spring2024

Additional Information

No response

yf-fan-org commented 1 month ago

@ccruzagralopes pls help

yf-fan-org commented 1 month ago

I think it's a bug, I ended up fixing it by switching to commit cafa417fcfd47f859faa976e9193607aed0bfc2d and then building a new docker!

ccruzagralopes commented 1 month ago

This happened because you were running on a branch that had a database migration applied and when going back to an earlier commit, that database migration was not found (because it didn't exist yet in that commit).

To be able to run on the v2.10.1+spring2024 branch, you'd have to first downgrade the database on the latest commit. To do that, please try running: docker exec -it certification-tool-backend-1 alembic downgrade 96ee37627a48 Then go back to the v2.10.1+spring2024 branch and try to start TH again.