-
Notifications
You must be signed in to change notification settings - Fork 208
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
Add development service convenience runner "openqa-run" #5796
base: master
Are you sure you want to change the base?
Conversation
Great PR! Please pay attention to the following items before merging: Files matching
This is an automatically generated QA checklist based on modified files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks first of all, but just no. IMO this is incomplete and make it even more confusing. Sorry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All in all I'd say: no
This is causing more confusion than it is helping.
tools/openqa-run
Outdated
done | ||
|
||
main() { | ||
sudo -u geekotest OPENQA_BASEDIR="${OPENQA_BASEDIR}" "$@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't like the idea of calling the Mojo app as geekotest
.
This script intends to use a sub directory of the Git checkout as OPENQA_BASEDIR
to it should invoke everything as the user this checkout was made by. That's probably just the current user and not geekotest
:
sudo -u geekotest OPENQA_BASEDIR="${OPENQA_BASEDIR}" "$@" | |
"$@" |
Note that if one just checks out the Git repo (for development, without having any packages installed) the user geekotest
might not even exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is geekotest
even used here? I always considered that a detail of the production setup on e.g. o3 and not something I generally have for development
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't like the idea of calling the Mojo app as
geekotest
.This script intends to use a sub directory of the Git checkout as
OPENQA_BASEDIR
to it should invoke everything as the user this checkout was made by. That's probably just the current user and notgeekotest
:Note that if one just checks out the Git repo (for development, without having any packages installed) the user
geekotest
might not even exist.
Yes, correct. But we need to provide a database with the according role. So should we also set the database connection to use an automatically started test database from t/test_postgresql?
Why is
geekotest
even used here? I always considered that a detail of the production setup on e.g. o3 and not something I generally have for development
no, geekotest is also the user used within the packaged version and hence also the user that would be used in the initial database setup which one might want to reuse when running from the development directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not recommend to reuse the same database.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So do you recommend to use an automatically started test database from t/test_postgresql?
exit "$1" | ||
} | ||
|
||
OPENQA_BASEDIR="${OPENQA_BASEDIR:-"$(dirname "$0")/../t/data"}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure whether that's the best idea. I get the idea of reusing test fixtures. However, it is also a bit problematic as this might lead to accidental cluttering and changes in that directory. This might be annoying because those changes might show up in Git (and we cannot just ignore them because files in that directory are supposed to be under version control) and might also lead to failures when running unit tests (which might not be obvious to debug).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could create a temporary directory and use that.
base-dir set to the local working copy. | ||
|
||
Example: | ||
openqa-run openqa-webui-daemon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This kind of usage is very annoying without auto completion. In my helper is worked around this via shortcuts.
The script doesn't seem to ensure that e.g. openqa-webui-daemon
is actually in the PATH
so I guess this example also won't lead to a great out-of-the-box experience even if copied verbatimly. (The example you added to the docs does make sense, though.)
services with `OPENQA_BASEDIR` set to your local development environment with | ||
the appropriate service account. For example to start the openQA GRU service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree. The service account this script chooses is not appropriate for local development. I recommend not to mix the production/packaged setup with the development environment.
This description also makes it not clear at all to what OPENQA_BASEDIR
is actually set (because "your local development environment" is not clear in this context, apparently it means test files from the current working dir but also only if OPENQA_BASEDIR
is not set anyway).
a59d7a1
to
aa7729f
Compare
No description provided.