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

[BUG]: ComputeChangedFiles and ComputeAffectedTests reflect non-PR changes from merged base branch #5570

Open
Rd4dev opened this issue Nov 6, 2024 · 0 comments
Labels
bug End user-perceivable behaviors which are not desirable. Impact: Medium Moderate perceived user impact (non-blocking bugs and general improvements). Work: High It's not clear what the solution is.

Comments

@Rd4dev
Copy link
Collaborator

Rd4dev commented Nov 6, 2024

Describe the bug

In the current workflow, ComputeChangedFiles and ComputeAffectedTests functions may inaccurately include changes from the base branch when a merge is performed before the latest commit. This behavior results in additional files being referenced as "changed," even though they are not directly modified in the current PR.

However, once a subsequent commit is pushed to the PR, this issue typically resolves, and only the actual changes in the PR are reflected.

This issue affects the code coverage report by unnecessarily including non-PR changes in the list of changed files and reporting them in the coverage results after a merge with the base branch. As shown in this coverage report, even files unrelated to the PR (such as a wiki page with no Kotlin file changes) can appear with coverage data simply due to changes from the base branch merge.

Steps To Reproduce

  1. Create a feature branch from the main branch.
  2. Make a few commits with changes specific to this feature branch.
  3. Merge the latest changes from the main branch into the feature branch.
  4. View the Unit Test's Compute affected tests - Compute test matrix or Code Coverage's Compute changed files - Compute file matrix to find non-PR changes included from the merge.

Expected Behavior

The ComputeChangedFiles and ComputeAffectedTests retrievals should list only the files that have been changed or affected by the PR commits and exclude any unrelated changes from the merge with the base branch.

Screenshots/Videos

No response

What device/emulator are you using?

No response

Which Android version is your device/emulator running?

No response

Which version of the Oppia Android app are you using?

No response

Additional Context

No response

@Rd4dev Rd4dev added bug End user-perceivable behaviors which are not desirable. triage needed labels Nov 6, 2024
@adhiamboperes adhiamboperes added Impact: Medium Moderate perceived user impact (non-blocking bugs and general improvements). Work: High It's not clear what the solution is. and removed triage needed labels Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug End user-perceivable behaviors which are not desirable. Impact: Medium Moderate perceived user impact (non-blocking bugs and general improvements). Work: High It's not clear what the solution is.
Development

No branches or pull requests

2 participants