← Back to Pull requests

Refactor CI workflows, including splitting acceptance/e2e/lighthouse tests into their own workflows. #21363

Closed
unknown closed this pull request without merging on Dec 12, 2024 08:26 UTC
View on GitHub
unknown unknown commented on Dec 02, 2024 12:17 UTC
Author

Overview

1. This PR fixes or fixes part of #N/A.
2. This PR does the following: Makes several improvements to the GitHub Actions workflows, namely:
- Drops the choice of OS (ubuntu-22.04) from the test matrix, since we only ever use one OS and are unlikely to do tests on multiple OS's in the foreseeable future.
- Combines all the lint checks into a single workflow.
- Combines all the type checks into a single workflow.
- Combines the backend_tests and backend_files_associated_type_checks workflows.
- Groups full-stack tests into full_stack_tests.yml.
- Renames "notification" workflows to start with "notify".
- Removes scripts/install_chrome_for_ci and replaces it with the install-chrome action, since both were doing the same thing.
- Updates the developer welcome message to match Android's.
- Updates job/step names to improve clarity.
- Updates review notification workflow to include changes in https://github.com/oppia/stale-review-request-notifier/pull/5.

Notes:

1. Originally, I attempted to also separate out the e2e, acceptance and lighthouse CI workflows so they're more identifiable in Actions. (Currently, it's hard to see the history of failures for a particular type of test, because they're all bundled together.) However, I couldn't make this work, because GitHub's workflow_run only runs for workflow files that are already on the develop branch, and this limitation makes it hard to test new workflows, so I decided against introducing it.
2. I also tried to update the Chrome version but that introduced some instability in the lighthouse tests, so I kept the old version for now.

Essential Checklist

Please follow the instructions for making a code change.

  • I have linked the issue that this PR fixes in the "Development" section of the sidebar. (N/A)

  • I have checked the "Files Changed" tab and confirmed that the changes are what I want to make.

  • I have written tests for my code.

  • The PR title starts with "Fix #bugnum: " or "Fix part of #bugnum: ...", followed by a short, clear summary of the changes. (N/A)

  • I have assigned the correct reviewers to this PR (or will leave a comment with the phrase "@{{reviewer_username}} PTAL" if I can't assign them directly).
  • Proof that changes are correct

    Here are links to the results a fully-successful run for commit 7349d7d (one of the last in the list). In this commit, we add an env variable to run all tests, because our CI is now set up to run only tests corresponding to only the changed files on the PR run (since we run all files in the merge queue) and this PR mostly only changes the workflow.yml files.

  • Backend tests: https://github.com/oppia/oppia/actions/runs/12177064556?pr=21363

  • Frontend tests: https://github.com/oppia/oppia/actions/runs/12177064543?pr=21363

  • Full-stack tests: https://github.com/oppia/oppia/actions/runs/12177064546?pr=21363

  • Lint checks: https://github.com/oppia/oppia/actions/runs/12177064547?pr=21363

  • Type checks: https://github.com/oppia/oppia/actions/runs/12177064551?pr=21363

  • Oppiabot: https://github.com/oppia/oppia/actions/runs/12177064051?pr=21363
  • All tests are passing and you can see how they look like in the left sidebar. Screenshots of the summary box at the bottom of the PR are also included in the collapsible section below:

    <details>
    <summary>Screenshots</summary>

    !Screenshot from 2024-12-06 00-25-14

    !Screenshot from 2024-12-06 00-25-31

    !Screenshot from 2024-12-06 00-25-38

    !Screenshot from 2024-12-06 00-25-48

    !Screenshot from 2024-12-06 00-25-59

    !Screenshot from 2024-12-06 00-26-10

    !Screenshot from 2024-12-06 00-26-23
    </details>

    Diff: 563 lines (+422 / -141) across 7 files Reviewer: SD-13 Review duration: 14169m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 563 lines diff across 7 files
    0.50
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.379
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #21363"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 49.7% (MEDIUM) · Higher = larger blast radius
    49.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 19.6% · Safe to merge
    19.6%
    Repository