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

243: Merge bot should support merging with certain frequency #381

Closed
wants to merge 1 commit into from

Conversation

edvbld
Copy link
Member

@edvbld edvbld commented Jan 24, 2020

Hi all,

please review this patch that enables the merge bot to periodically sync
branches with a certain frequency. This is implemented by extending the
configuration for a merge specification:

"merge": {
    "target": "github:openjdk/panama",
    "specs": [
        {
	    "from": "github:openjdk/jdk:master",
	    "to": "master",
	    "frequency": {
	        "interval": "weekly",
		"weekday": "Friday",
		"hour": "11"
	    }
	}
    ]
}

The above configuration would merge the master branch from the
jdk repository to the master branch in the
panama repository every Friday at 11:00.
The merge will only be done once, i.e. it won't be retried until the next Friday
if the merge fails (and result in a merge conflict PR).

There is one limitation with the patch and that is that the merge bot only
"remember" previous merges in memory. This is problematic if we redeploy the
merge bot during 11:00 - 11:59 on a Friday and the merge already has occurred,
the merge bot will then do a second merge. This is known limitation and one I
think we can live with, I don't foresee it to become a problem in practice.

Thanks,
Erik

Testing

  • Added a bunch of new unit tests

Progress

  • Change must not contain extraneous whitespace
  • Change must be properly reviewed

Issue

SKARA-243: Merge bot should support merging with certain frequency

Approvers

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 24, 2020

👋 Welcome back ehelin! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request (refresh this page to view it).

@mlbridge
Copy link

mlbridge bot commented Jan 24, 2020

Webrevs

Copy link
Member

@rwestberg rwestberg left a comment

Looks good! I think it could have been possible to use a bit more existing java.time functionality, but I also don't think it's worth the effort to rewrite this working code. :)

}

private static Month toMonth(String s) {
switch (s.toLowerCase()) {
Copy link
Member

@rwestberg rwestberg Jan 27, 2020

Choose a reason for hiding this comment

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

Would perhaps be a little less verbose to use Month.from with an appropriate formatter, but can keep it as-is if you prefer. :)

Copy link
Member Author

@edvbld edvbld Jan 27, 2020

Choose a reason for hiding this comment

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

Yeah, I agree, but since I've already written the verbose version, lets just keep it for now 😃

@openjdk
Copy link

openjdk bot commented Jan 27, 2020

@edvbld This change now passes all automated pre-integration checks. When the change also fulfills all project specific requirements, type /integrate in a new comment to proceed. After integration, the commit message will be:

243: Merge bot should support merging with certain frequency

Reviewed-by: rwestberg
  • If you would like to add a summary, use the /summary command.
  • To credit additional contributors, use the /contributor command.
  • To add additional solved issues, use the /solves command.

Since the source branch of this PR was last updated there have been 3 commits pushed to the master branch. Since there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to do this manually, please merge master into your branch first.

➡️ To integrate this PR with the above commit message, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Jan 27, 2020
@edvbld
Copy link
Member Author

edvbld commented Jan 27, 2020

/integrate

@openjdk openjdk bot closed this Jan 27, 2020
@openjdk openjdk bot added integrated and removed ready labels Jan 27, 2020
@openjdk
Copy link

openjdk bot commented Jan 27, 2020

@edvbld The following commits have been pushed to master since your change was applied:

  • e59a67f: 245: Fix proxy protocol setting, add logging
  • 10552fd: Make it possible to only allow PRs against a select set of target branches
  • d62e49e: 246: Avoid bridging too large emails

Your commit was automatically rebased without conflicts.

Pushed as commit 570d6a6.

@mlbridge
Copy link

mlbridge bot commented Jan 27, 2020

Mailing list message from Erik Helin on skara-dev:

Changeset: 570d6a6
Author: Erik Helin <ehelin at openjdk.org>
Date: 2020-01-27 09:14:54 +0000
URL: https://git.openjdk.java.net/skara/commit/570d6a65

243: Merge bot should support merging with certain frequency

Reviewed-by: rwestberg

! Makefile
+ bots/merge/src/main/java/org/openjdk/skara/bots/merge/Clock.java
! bots/merge/src/main/java/org/openjdk/skara/bots/merge/MergeBot.java
! bots/merge/src/main/java/org/openjdk/skara/bots/merge/MergeBotFactory.java
! bots/merge/src/test/java/org/openjdk/skara/bots/merge/MergeBotTests.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants