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

Set the CI to run and publish benchmark reports once a week #443

Closed
4 tasks
tatiana opened this issue Jun 8, 2022 · 10 comments · Fixed by #844
Closed
4 tasks

Set the CI to run and publish benchmark reports once a week #443

tatiana opened this issue Jun 8, 2022 · 10 comments · Fixed by #844
Assignees
Labels
ci Continuous integration or test automation improvements priority/high High priority product/python-sdk Label describing products
Milestone

Comments

@tatiana
Copy link
Collaborator

tatiana commented Jun 8, 2022

Dependencies

Acceptance criteria

  • The CI should run the benchmark & analysis scripts on a weekly basis for all scenarios defined
  • If any of the benchmark scenarios had a performance degradation of 10% (took 10% of the time more than the previous execution of that same scenario) - we should notify in slack
  • The markdown created by the analysis script should be committed to the repo
  • Script to compare benchmarking results with previous run
@tatiana tatiana added the priority/high High priority label Jun 16, 2022
@tatiana tatiana added this to the 1.1.0 milestone Jul 27, 2022
@tatiana tatiana added the ci Continuous integration or test automation improvements label Jul 28, 2022
@tatiana
Copy link
Collaborator Author

tatiana commented Jul 28, 2022

Just giving additional information, this feature was requested by @vikramkoka during a meeting with him - and the goal is to make sure our benchmark results are always up-to-date with the current performance of the Astro Python SDK.

@utkarsharma2 utkarsharma2 removed this from the 1.1.0 milestone Sep 2, 2022
@phanikumv phanikumv added this to the 1.2.0 milestone Sep 8, 2022
@pankajastro
Copy link
Contributor

I have started working on this

@pankajkoti
Copy link
Contributor

@pankajastro explored Github Actions and will try out Github action along the lines of this ticket today.

@pankajastro
Copy link
Contributor

There is a scheduled event in GitHub workflow but looks like it runs on the default branch only i.e main our case so we might have to merge PR in order to full end-to-end test. I have tested the scheduling part on my private repo it seems to be working. Currently, trying to test the benchmark make command in separate job once this succeeds then we should be able to combine both together

@pankajastro
Copy link
Contributor

trying to run below job

Run-Benchmark:
    runs-on: ubuntu-18.04
    env:
      GOOGLE_APPLICATION_CREDENTIALS: /tmp/google_credentials.json
      GOOGLE_APPLICATION_CREDENTIALS_JSON: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_JSON }}
    steps:
      - uses: actions/checkout@v2
      - run: python -c 'import os; print(os.getenv("GOOGLE_APPLICATION_CREDENTIALS_JSON", "").strip())' > ${{ env.GOOGLE_APPLICATION_CREDENTIALS }}
      - run: cd tests/benchmark && make

Error: Error when reading or editing Project Service --****/container.googleapis.com: Failed to list enabled services for project astronomer-dag-authoring: googleapi: Error 403: Permission denied to list services for consumer container

@pankajastro
Copy link
Contributor

trying to run below job

Run-Benchmark:
    runs-on: ubuntu-18.04
    env:
      GOOGLE_APPLICATION_CREDENTIALS: /tmp/google_credentials.json
      GOOGLE_APPLICATION_CREDENTIALS_JSON: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_JSON }}
    steps:
      - uses: actions/checkout@v2
      - run: python -c 'import os; print(os.getenv("GOOGLE_APPLICATION_CREDENTIALS_JSON", "").strip())' > ${{ env.GOOGLE_APPLICATION_CREDENTIALS }}
      - run: cd tests/benchmark && make

Error: Error when reading or editing Project Service --****/container.googleapis.com: Failed to list enabled services for project astronomer-dag-authoring: googleapi: Error 403: Permission denied to list services for consumer container

this permission has been resolved

@pankajastro
Copy link
Contributor

pankajastro commented Sep 19, 2022

Script failing while pushing image into registry

unauthorized: You don't have the needed permissions to perform this operation, and you may have invalid credentials. To authenticate your request, follow the steps in: https://cloud.google.com/container-registry/docs/advanced-authentication
Makefile:37: recipe for target 'container' failed
make: *** [container] Error 1
Error: Process completed with exit code 2.

https://github.com/astronomer/astro-sdk/actions/runs/3067653209/jobs/4954955710

@pankajastro
Copy link
Contributor

Script failing while pushing image into registry

unauthorized: You don't have the needed permissions to perform this operation, and you may have invalid credentials. To authenticate your request, follow the steps in: https://cloud.google.com/container-registry/docs/advanced-authentication
Makefile:37: recipe for target 'container' failed
make: *** [container] Error 1
Error: Process completed with exit code 2.

https://github.com/astronomer/astro-sdk/actions/runs/3067653209/jobs/4954955710

This got fixed after adding below step

gcloud auth activate-service-account --key-file $(GOOGLE_APPLICATION_CREDENTIALS)

@pankajastro
Copy link
Contributor

pankajastro commented Sep 20, 2022

@sunank200
Copy link
Contributor

I will help @pankajastro with this task

@kaxil kaxil added the product/python-sdk Label describing products label Sep 23, 2022
pankajastro added a commit that referenced this issue Sep 27, 2022
closes: #443 

- Add a scheduled workflow to run the benchmark script at 6hrs intervals
for initial observation later will change it to run on a weekly basis
- Removed teardown for now
utkarsharma2 pushed a commit that referenced this issue Oct 4, 2022
closes: #443 

- Add a scheduled workflow to run the benchmark script at 6hrs intervals
for initial observation later will change it to run on a weekly basis
- Removed teardown for now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continuous integration or test automation improvements priority/high High priority product/python-sdk Label describing products
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants