-
Notifications
You must be signed in to change notification settings - Fork 20
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
Cache charmcraft pack container, skip unstable tests except on schedule #95
Conversation
This reverts commit ae78917.
on: | ||
pull_request: | ||
paths-ignore: | ||
- '.gitignore' | ||
- '.jujuignore' | ||
- 'LICENSE' | ||
- '**.md' | ||
schedule: | ||
- cron: '53 0 * * *' # Daily at 00:53 UTC |
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 an issue with the PR itself, but we may consider running the scheduled tests during slightly different times to not stampede on the runners.
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.
For now, I think it's okay to stampede the runners overnight—the runners will just queue up & run as soon as runners are available
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.
Starting all MySQL and PostgreSQL repos simultaneously at 00:53 might be noticeable in Los Angeles (16:53 local time).
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.
Starting them later might be noticeable in India, and I figured it'd be better to have a queue at the end of the day instead of the beginning of the day
from pytest_operator.plugin import OpsTest | ||
|
||
|
||
@pytest.fixture(scope="module") |
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 think we can even go with session here, it should never change during execution.
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.
Technically I think that's correct.
However, it multiple modules are run in a test, I think different instances of ops_test
should be created since ops_test
has attributes for the test model. (Different modules create different models)
In the mysql charms, I left the scope to the default of function
to avoid changing the behavior of pytest-operator
. The only reason to use scope="module"
is to be compatible with other fixtures in the postgres charms. I'm not sure if this is a solid approach, but it seems like it's okay. It does feel a bit hacky already though
Ported from canonical/mysql-k8s-operator#146