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

QA-Engine: Persist daily reports to GCS #22662

Merged
merged 7 commits into from
Feb 9, 2023

Conversation

alafanechere
Copy link
Contributor

@alafanechere alafanechere commented Feb 9, 2023

What

@airbytehq/airbyte-analytics created a dedicated private bucket to store QA reports.
I want to make the QA engine write these reports to GCS in JSONL with generation in the file names.
It will be available on metabase here

How

  • Tweak persist_qa_report function
  • Fix some tests
  • Add a CLI flag to optionally create PRs: so that we can run the daily report generation without creating PRs.

@alafanechere alafanechere marked this pull request as ready for review February 9, 2023 17:39
@alafanechere alafanechere requested a review from zzztimbo February 9, 2023 17:39
@alafanechere alafanechere temporarily deployed to more-secrets February 9, 2023 17:40 — with GitHub Actions Inactive
@alafanechere alafanechere temporarily deployed to more-secrets February 9, 2023 17:40 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2023

Airbyte Code Coverage

There is no coverage information present for the Files changed

Total Project Coverage 24.66%

def persist_qa_report(qa_report: pd.DataFrame, path: str, public_fields_only: bool =True):

def persist_qa_report(qa_report: pd.DataFrame, path: str, public_fields_only: bool = True) -> str:
report_generation_date = datetime.strftime(qa_report["report_generation_datetime"].max(), "%Y%m%d")
Copy link
Contributor

Choose a reason for hiding this comment

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

Is report_generation_datetime different for each row in the qa_report?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No its the same value on each row for a report.

Copy link
Contributor

@zzztimbo zzztimbo left a comment

Choose a reason for hiding this comment

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

💯

@alafanechere alafanechere requested a review from a team February 9, 2023 18:02
Comment on lines +5 to +8
schedule:
# 1pm UTC is 6am PDT.
# same time as Generate Build Report
- cron: "0 13 * * *"
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 turn it on!

Copy link
Contributor

@bnchrch bnchrch left a comment

Choose a reason for hiding this comment

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

Not comments from me, looks good!

@@ -32,3 +32,4 @@ jobs:
QA_ENGINE_AIRBYTE_DATA_PROD_SA: "${{ secrets.QA_ENGINE_AIRBYTE_DATA_PROD_SA }}"
GITHUB_API_TOKEN: ${{ secrets.GH_PAT_MAINTENANCE_OCTAVIA }}
run: run-qa-engine
# run: run-qa-engine --create-prs
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: could use a TODO or a NOTE on when to uncomment and who owns it


logging.basicConfig(level=logging.INFO)

logger = logging.getLogger(__name__)


def main():
@click.command()
@click.option("--create-prs", is_flag=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

Very nice

@alafanechere alafanechere temporarily deployed to more-secrets February 9, 2023 18:21 — with GitHub Actions Inactive
@alafanechere alafanechere temporarily deployed to more-secrets February 9, 2023 18:22 — with GitHub Actions Inactive
@alafanechere alafanechere temporarily deployed to more-secrets February 9, 2023 18:33 — with GitHub Actions Inactive
@alafanechere alafanechere temporarily deployed to more-secrets February 9, 2023 18:33 — with GitHub Actions Inactive
@alafanechere alafanechere enabled auto-merge (squash) February 9, 2023 18:44
@alafanechere alafanechere temporarily deployed to more-secrets February 9, 2023 18:45 — with GitHub Actions Inactive
@alafanechere alafanechere temporarily deployed to more-secrets February 9, 2023 18:45 — with GitHub Actions Inactive
@alafanechere alafanechere merged commit 9e8035c into master Feb 9, 2023
@alafanechere alafanechere deleted the augustin/qa-engine/qa-report-to-bucket branch February 9, 2023 19:21
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