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

Startup wizard #2815

Merged
merged 18 commits into from
Jun 10, 2024
Merged

Startup wizard #2815

merged 18 commits into from
Jun 10, 2024

Conversation

Ulincsys
Copy link
Contributor

Requires extra attention before merge

Please carefully review changes in the following files, as I'm not sure they're correct:

  • .github/workflows/build_docker.yml
  • .github/workflows/docker-image.yml

It looks like this was merged previously, but is no longer in the dev branch. I'm re-opening the merge here to bring these changes to dev again.

Signed commits

  • Yes, I signed my commits.

Ulincsys and others added 18 commits August 12, 2023 17:24
Signed-off-by: Ulincsys <[email protected]>
Signed-off-by: Ulincsys <[email protected]>
… others that self resolve based on an end users version of Python3 now.

Signed-off-by: sgoggins <[email protected]>
- Add ability to pass flags to `augur backend start` in compose
- Add entrypoint for `AUGUR_TARGET=graphical`
- Fix metadata import in compose environment
- Improve Docker compatibility with startup wizard

Signed-off-by: Ulincsys <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
@@ -1,3 +1 @@
from .Environment import Environment
from .ServerThread import ServerThread
from .LoginException import LoginException

Choose a reason for hiding this comment

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

[pylint] reported by reviewdog 🐶
C0114: Missing module docstring (missing-module-docstring)


for row in session.query(Config).all():
data[row.section_name][row.setting_name] = row.value
except:

Choose a reason for hiding this comment

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

[pylint] reported by reviewdog 🐶
W0702: No exception type(s) specified (bare-except)

@@ -0,0 +1,2 @@
from .Environment import Environment

Choose a reason for hiding this comment

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

[pylint] reported by reviewdog 🐶
C0114: Missing module docstring (missing-module-docstring)

@@ -0,0 +1,297 @@
from flask import Flask, request, session, render_template, url_for, redirect, send_file, Response

Choose a reason for hiding this comment

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

[pylint] reported by reviewdog 🐶
C0114: Missing module docstring (missing-module-docstring)

from functools import wraps
from pathlib import Path

import threading, json, subprocess, re, importlib.util, sys

Choose a reason for hiding this comment

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

[pylint] reported by reviewdog 🐶
C0410: Multiple imports on one line (threading, json, subprocess, re, importlib.util, sys) (multiple-imports)

update_complete.acquire()
try:
update_complete.wait()
except KeyboardInterrupt as e:

Choose a reason for hiding this comment

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

[pylint] reported by reviewdog 🐶
W0612: Unused variable 'e' (unused-variable)


print("First time setup exiting")

global do_continue

Choose a reason for hiding this comment

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

[pylint] reported by reviewdog 🐶
W0604: Using the global statement at the module level (global-at-module-level)

augur = subprocess.Popen(f"augur backend start {env['AUGUR_FLAGS'] or ''}".split())
augur.wait()
else:
subprocess.Popen(f"nohup augur backend start {env['AUGUR_FLAGS'] or ''}".split())

Choose a reason for hiding this comment

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

[pylint] reported by reviewdog 🐶
R1732: Consider using 'with' for resource-allocating operations (consider-using-with)

from flask import Flask, request, session, render_template, url_for, redirect, send_file, Response
from sqlalchemy import MetaData, Table, create_engine
from bootstrap import ServerThread, Environment
from sqlalchemy.orm import Session

Choose a reason for hiding this comment

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

[pylint] reported by reviewdog 🐶
C0412: Imports from package sqlalchemy are not grouped (ungrouped-imports)

global do_continue
if do_continue:
if env["AUGUR_DOCKER_DEPLOY"]:
augur = subprocess.Popen(f"augur backend start {env['AUGUR_FLAGS'] or ''}".split())

Choose a reason for hiding this comment

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

[pylint] reported by reviewdog 🐶
R1732: Consider using 'with' for resource-allocating operations (consider-using-with)

@sgoggins sgoggins marked this pull request as draft June 10, 2024 21:12
@sgoggins
Copy link
Member

I made this a draft so we do not add it to the debugging stack on dev, which is pretty close to release.

@sgoggins sgoggins marked this pull request as ready for review June 10, 2024 23:46
Copy link
Member

@sgoggins sgoggins left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -23,7 +23,7 @@ jobs:
name: Build image
runs-on: ubuntu-latest
steps:
- name: Checkout main
- name: Checkout startup-wizard
Copy link
Member

Choose a reason for hiding this comment

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

IS this the branch we want people checking out forever on Docker?

@@ -0,0 +1,18 @@
name: Docker Image CI
Copy link
Member

Choose a reason for hiding this comment

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

@@ -160,7 +161,7 @@ def add_section(ctx, section_name, file):
@click.option('--section', required=True)
@click.option('--setting', required=True)
@click.option('--value', required=True)
@click.option('--data-type', required=True)
@click.option('--data-type')
Copy link
Member

Choose a reason for hiding this comment

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

Why would this not be required?

@sgoggins sgoggins merged commit af14944 into dev Jun 10, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants