astro-sdk icon indicating copy to clipboard operation
astro-sdk copied to clipboard

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

Open tatiana opened this issue 2 years ago • 1 comments

Dependencies

  • Depends on: #432
  • Depends on: #434
  • Depends on: #442
  • Depends on one of:
    • #438
    • #431
    • #437

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

tatiana avatar Jun 08 '22 13:06 tatiana

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.

tatiana avatar Jul 28 '22 09:07 tatiana

I have started working on this

pankajastro avatar Sep 14 '22 06:09 pankajastro

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

pankajkoti avatar Sep 14 '22 06:09 pankajkoti

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 avatar Sep 16 '22 11:09 pankajastro

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 avatar Sep 16 '22 11:09 pankajastro

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 avatar Sep 19 '22 05:09 pankajastro

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 avatar Sep 19 '22 05:09 pankajastro

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 avatar Sep 20 '22 18:09 pankajastro

Benchmark script succeeded in CI https://github.com/astronomer/astro-sdk/actions/runs/3092321371/jobs/5003571780 commit: f3d0a7c672d8eac990fa8f1d00b136ad0f9b5663

pankajastro avatar Sep 20 '22 18:09 pankajastro

I will help @pankajastro with this task

sunank200 avatar Sep 23 '22 06:09 sunank200