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

Add tilt button to run pytest, fix local dev config for pytest, minor improvements to til #3927

Draft
wants to merge 9 commits into
base: dev
Choose a base branch
from

Conversation

iskhakov
Copy link
Contributor

@iskhakov iskhakov commented Feb 20, 2024

What this PR does

Fixes for https://github.com/grafana/oncall-private/issues/2423

Which issue(s) this PR fixes

Checklist

  • Unit, integration, and e2e (if applicable) tests updated
  • Documentation added (or pr:no public docs PR label added if not required)

@@ -47,6 +45,8 @@ def on_uwsgi_worker_exit():

CELERY_TASK_ROUTES = celery_task_routes.CELERY_TASK_ROUTES

CELERY_TASK_ROUTES = celery_task_routes.CELERY_TASK_ROUTES
Copy link
Contributor

Choose a reason for hiding this comment

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

was this intended? (CELERY_TASK_ROUTES is defined two lines above)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for checking, I've messed my previous PR #3926, and this typo happened during conflict resolution

Copy link
Contributor

Choose a reason for hiding this comment

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

why these changes here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for checking, I've messed my previous PR #3926, and this typo happened during conflict resolution

@joeyorlando joeyorlando added the release:ignore PR will not be added to release notes label Mar 6, 2024
@iskhakov iskhakov changed the title Fixes for pytest on tilt local dev env Add tilt button to run pytest, fix local dev config for pytest, minor improvements to til Mar 22, 2024
@@ -61,7 +61,7 @@ local_resource(

local_resource(
"e2e-tests",
labels=["E2eTests"],
labels=["Tests"],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Need to check how to pin this section on the top

set -eu
# get engine k8s pod name from tilt resource name
POD_NAME="$(tilt get kubernetesdiscovery "engine" -ojsonpath='{.status.pods[0].name}')"
kubectl exec "$POD_NAME" -- pytest .
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
kubectl exec "$POD_NAME" -- pytest .
kubectl exec "$POD_NAME" -- pytest . --ds=settings.ci-test

I'm wondering if there's a way we could also provide optional arguments to pytest? Similar to how we currently have make test-dev and you can run something like this:

$ make test-dev ARGS="apps/api/tests/test_auth.py"

Copy link
Contributor

Choose a reason for hiding this comment

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

why a separate settings file for tilt?

Copy link
Contributor

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions bot added the pr:stale Added to a PR that has been deemed "stale". Managed by the actions/stale GitHub Action label Apr 27, 2024
@github-actions github-actions bot removed the pr:stale Added to a PR that has been deemed "stale". Managed by the actions/stale GitHub Action label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:ignore PR will not be added to release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants