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

[JENKINS-46028] Look up test result from target branch if building a pull request #226

Merged
merged 7 commits into from
Jan 17, 2023

Conversation

Vlatombe
Copy link
Member

@Vlatombe Vlatombe commented Jan 13, 2023

When building a pull request for the first time, we don't have any test results. However we can look up the target branch and use its test results as reference.

Updated the demo in #227 to include a gitea server for multibranch support. It can be used to verify the changes by initializing it, waiting for the first build on the main branch to complete, then create a pull request using create-pr.sh.

Relates to #26, #26 (review) probably still stands but feel way more complicated than it needs to be to fulfill the requirement in the context of this plugin.

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

When building a pull request for the first time, we don't have any test
results. However we can look up the target branch and use its test
results as reference.
@Vlatombe Vlatombe requested a review from jglick January 13, 2023 17:02
@Vlatombe Vlatombe requested a review from jglick January 13, 2023 19:42
Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

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

Looks about right. Tested interactively I guess? The former PR had some test coverage but I do not remember much.

(There is a demo/ with a multibranch project, but not set up for GitHub or anything else with a “change target head” ~ base branch.)

…e previous one

* Build hyperlink formatting
* Adjust unit test accordingly
@Vlatombe Vlatombe requested a review from jglick January 16, 2023 16:34
@Vlatombe Vlatombe changed the title Look up test result from target branch if building a multibranch project Look up test result from target branch if building a pull request Jan 16, 2023
@Vlatombe Vlatombe force-pushed the target-branch-finder branch from 12b97db to 6451c6d Compare January 17, 2023 08:49
@jglick jglick changed the title Look up test result from target branch if building a pull request [JENKINS-46028] Look up test result from target branch if building a pull request Jan 17, 2023
@jglick jglick enabled auto-merge January 17, 2023 22:11
@jglick jglick merged commit c9145a5 into jenkinsci:master Jan 17, 2023
@Vlatombe Vlatombe deleted the target-branch-finder branch January 19, 2023 08:25
Vlatombe added a commit to Vlatombe/parallel-test-executor-plugin that referenced this pull request Jan 19, 2023
If one of the previous build is failed or still ongoing, then the loop
would iterate always on the same build until it reaches
NUMBER_OF_BUILDS_TO_SEARCH, skipping any further builds.
jglick added a commit that referenced this pull request Jan 19, 2023
[JENKINS-46028] Fix previous build resolution broken in #226
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants