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

Debug page should not show commits that are part of the git tree from a merge #26058

Closed
warrensplayer opened this issue Mar 8, 2023 · 2 comments · Fixed by #26135
Closed
Assignees

Comments

@warrensplayer
Copy link
Contributor

Description

The Debug page shows runs from Cypress Cloud that match the commit shas from the user's current working environment by performing a git log to find the latest 100 commit shas. If code is merged in from another branch, then both the merge commit that is created as well as other commits from the merged in branch will show in the commit log. This could cause the Debug page to show a run that does not relate to the user's current code that is checked out.

Example:

user has branched from develop with one commit

A -- B   <-develop
       \
        C   <-*feature

If the user is on feature branch and does a git log, then the out put would be: C,B,A

another commit on develop is merged to feature

A -- B ---- D ---  <-develop
       \          \ 
        C -------- E    <-*feature

After merging in develop and creating the merge commit of E, a git log would output: E, D, C, B, A

For the purpose of the Debug page, the user would not want to see any runs associated with the D commit since it did not occur on the feature branch.

Expected behavior

In GitDataSource, the --first-parent option should be added to the git log command to make sure that only commits from the first parent in the git history will be returned in the log command. For the above scenario, that should return: E, C, B, A

Also, make sure to add a test case to to the unit tests to check for this situation.

@warrensplayer
Copy link
Contributor Author

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 28, 2023

Released in 12.9.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v12.9.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Mar 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants