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

Traces #1539

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Traces #1539

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,10 @@ $ npm run dev
Now restart temBoard UI configured with ViteJS dev server base URL from
environment variable `VITEJS`:

!!! warning

You must execute temBoard at top level directory, not in `ui/` directory.

``` console
$ VITEJS=http://localhost:5173 temboard --debug
...
Expand Down
13 changes: 7 additions & 6 deletions ui/temboardui/model/migrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,18 @@ def check(self):
raise Exception("Unknown revision.")

if self.missing_versions:
logger.info("Database version is %s.", self.current_version)
logger.info("Target version is %s.", self.target_version)
logger.debug(
"Database is %s version(s) behind.", len(self.missing_versions)
logger.info(
"Database is %s version(s) behind. current=%s wanted=%s",
len(self.missing_versions),
current,
self.target_version,
)

raise UserError(
"Database is not up to date." " Please upgrade with temboard migratedb."
)
else:
logger.info("temBoard database is up-to-date.")
logger.info("temBoard database is up-to-date. revision=%s", current)

def inspect_current_version(self, conn):
with conn.cursor() as cur:
Expand Down Expand Up @@ -98,7 +100,6 @@ def inspect_current_version(self, conn):
""")
)
(self.current_version,) = cur.fetchone()
logger.debug("temBoard database revision is %s.", self.current_version)
conn.commit()
return self.current_version

Expand Down
8 changes: 2 additions & 6 deletions ui/temboardui/toolkit/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def bootstrap(self, args, environ, service=False):
parser = configparser.RawConfigParser()
configfile = self.find_config_file()
if configfile is None:
logger.info("No config file found.")
logger.warning("No config file found.")
else:
logger.info("Using config file %s.", configfile)
self.config.temboard["configfile"] = configfile
Expand Down Expand Up @@ -206,7 +206,6 @@ def apply_config(self):

plugins = self.create_plugins()
if plugins:
logger.debug("Reading plugins configuration.")
self.config.load(**self.config_sources)
self.load_plugins(plugins)

Expand Down Expand Up @@ -237,9 +236,7 @@ def read_dir(self, parser, dirname):
self.read_file(parser, filename)

def fetch_plugin(self, name):
logger.debug("Looking for plugin %s.", name)
for ep in pkg_resources.iter_entry_points(self.with_plugins, name):
logger.debug("Found plugin %s.", ep)
try:
return ep.load()
except Exception:
Expand Down Expand Up @@ -268,7 +265,6 @@ def create_plugins(self):

def load_plugins(self, plugins):
for name in plugins:
logger.debug("Loading plugin %s.", name)
self.plugins[name].load()

def reload(self):
Expand Down Expand Up @@ -308,7 +304,7 @@ def entrypoint(self, argv, environ):
retcode = 1
try:
setup_logging(debug=self.debug)
logger.info("Starting %s %s.", self.PROGRAM, self.VERSION)
logger.info("Starting %s. version=%s", self.PROGRAM, self.VERSION)
retcode = self.main(argv, environ)
except KeyboardInterrupt:
logger.info("Interrupted.")
Expand Down
2 changes: 0 additions & 2 deletions ui/temboardui/toolkit/taskmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,6 @@ def add(self, workerset):
task.status = task_from_db.status

self.scheduler.task_list.rm(task.id)
logger.debug("Overwriting task %s.", task.id)

self.scheduler.task_list.push(task)
except StorageEngineError as e:
Expand Down Expand Up @@ -834,7 +833,6 @@ def add(self, workerset):
conf["function"] = wrapper_name

# Add to current workers
logger.debug("Register worker %s", conf["name"])
self.worker_pool.add(conf)


Expand Down