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

feat: add a cron job to test OSV API on test instance #2540

Merged
merged 10 commits into from
Sep 9, 2024

Conversation

hogo6002
Copy link
Contributor

Our test instance lacks real-life traffic, making it difficult to catch API query errors.
Converting tools/api-performance-test into a cron job that runs for one hour daily. This job will send traffic to the test instance's API, helping us identify errors before deploying changes to production.

The tools/api-performance-test script will be deleted once the cron job is running stably.

Copy link
Contributor

@another-rex another-rex left a comment

Choose a reason for hiding this comment

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

Nice, added some comments.

docker/staging_test/run.sh Outdated Show resolved Hide resolved
docker/staging_test/retrieve_bugs_from_db.py Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we can use the script directly to avoid duplicating it, but maybe copying is just simpler and if we make changes to the script we don't need to worry about breaking staging_test.

Copy link
Member

Choose a reason for hiding this comment

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

It's probably possible, you'd just have to build the Docker image from the root of the repo to be able to copy the files over.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My idea is to remove the script from tools/, if we want to test this locally we can just use the docker/staging_api_test/run.sh.

deployment/build-and-stage.yaml Outdated Show resolved Hide resolved
docker/staging_test/Dockerfile Outdated Show resolved Hide resolved
docker/staging_test/Dockerfile Outdated Show resolved Hide resolved
docker/staging_test/retrieve_bugs_from_db.py Outdated Show resolved Hide resolved
docker/staging_test/run.sh Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

It's probably possible, you'd just have to build the Docker image from the root of the repo to be able to copy the files over.

@hogo6002 hogo6002 merged commit 9ed04e9 into google:master Sep 9, 2024
11 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.

4 participants