Skip to content

Commit

Permalink
Merge branch 'master' into cdToGit
Browse files Browse the repository at this point in the history
  • Loading branch information
minwoox committed Oct 19, 2022
2 parents 72a29e0 + 0cf990c commit 2bab7bf
Show file tree
Hide file tree
Showing 17 changed files with 110 additions and 56 deletions.
50 changes: 38 additions & 12 deletions .github/workflows/ci.yml → .github/workflows/actions_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
push:
branches:
- master
tags-ignore:
# The release versions will be verified by 'publish-release.yml'
- centraldogma-*
pull_request:

concurrency:
Expand All @@ -23,7 +26,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-12, windows-latest]
java: [11]
include:
- java: 11
Expand All @@ -47,7 +50,9 @@ jobs:

- name: Build with Gradle
run: |
./gradlew --no-daemon --stacktrace -Pcoverage -PnoLint build \
./gradlew --no-daemon --stacktrace -Pleak -PnoLint build \
${{ matrix.coverage && '-Pcoverage' || '' }} \
-PflakyTests=false \
-PbuildJdkVersion=${{ matrix.java }} \
-PtestJavaVersion=${{ matrix.java }} \
shell: bash
Expand Down Expand Up @@ -75,30 +80,51 @@ jobs:
shell: bash

lint:
runs-on: ${{ matrix.os }}
if: github.repository == 'line/centraldogma'
runs-on: ubuntu-latest
timeout-minutes: 60
env:
GRADLE_OPTS: -Xmx1280m
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
java: [17]
steps:
- uses: actions/checkout@v2

- name: Set up JDK ${{ matrix.java }}
- id: setup-jdk-17
name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
java-version: '17'

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Build with Gradle
run: |
./gradlew --no-daemon --stacktrace lint \
-PbuildJdkVersion=${{ matrix.java }} \
-PtestJavaVersion=${{ matrix.java }}
-PbuildJdkVersion=17 \
-PtestJavaVersion=17
shell: bash

flaky-tests:
if: github.repository == 'line/centraldogma'
runs-on: ubuntu-latest
timeout-minutes: 60
env:
GRADLE_OPTS: -Xmx1280m
steps:
- uses: actions/checkout@v2

- id: setup-jdk-17
name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Run flaky tests
run: |
./gradlew --no-daemon --stacktrace -PnoLint -PflakyTests=true
shell: bash
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
plugins {
alias libs.plugins.nexus.publish
alias libs.plugins.osdetector apply false
alias libs.plugins.jmh apply false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
import com.linecorp.armeria.client.endpoint.EndpointGroup;
import com.linecorp.armeria.client.endpoint.dns.DnsAddressEndpointGroup;
import com.linecorp.armeria.client.endpoint.healthcheck.HealthCheckedEndpointGroup;
import com.linecorp.centraldogma.testing.internal.FlakyTest;

@FlakyTest
class ArmeriaCentralDogmaBuilderTest {

// Note: This test case relies on https://sslip.io/
Expand Down
19 changes: 10 additions & 9 deletions dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ guava = "31.1-jre"
jgit = "5.13.0.202109080827-r"
json-unit = "2.35.0"
jmh = "1.35"
micrometer = "1.9.3"
micrometer = "1.9.4"
mockito = "4.8.0"
slf4j = "1.7.36"
spring-boot1 = "1.5.22.RELEASE"
spring-boot2 = "2.7.3"
spring-boot2 = "2.7.4"

[boms]
armeria = { module = "com.linecorp.armeria:armeria-bom", version = "1.19.0" }
armeria = { module = "com.linecorp.armeria:armeria-bom", version = "1.20.1" }
jackson = { module = "com.fasterxml.jackson:jackson-bom", version = "2.13.4" }
junit5 = { module = "org.junit:junit-bom", version = "5.9.0" }
junit5 = { module = "org.junit:junit-bom", version = "5.9.1" }

[libraries.armeria]
module = "com.linecorp.armeria:armeria"
Expand Down Expand Up @@ -129,7 +129,7 @@ module = "com.fasterxml.jackson.datatype:jackson-datatype-jsr310"

[libraries.javassist]
module = "org.javassist:javassist"
version = "3.29.1-GA"
version = "3.29.2-GA"

[libraries.javax-annotation]
module = "javax.annotation:javax.annotation-api"
Expand Down Expand Up @@ -306,10 +306,11 @@ exclusions = [

[plugins]
docker = { id = "com.bmuschko.docker-remote-api", version = "6.7.0" }
download = { id = "de.undercouch.download", version = "5.1.0" }
jmh = { id = "me.champeau.jmh", version = "0.6.7" }
download = { id = "de.undercouch.download", version = "5.2.1" }
jmh = { id = "me.champeau.jmh", version = "0.6.8" }
jxr = { id = "net.davidecavestro.gradle.jxr", version = "0.2.1" }
log = { id = "com.boazj.log", version = "0.1.0" }
nexus-publish = { id = "io.github.gradle-nexus.publish-plugin", version = "1.1.0" }
node-gradle = { id = "com.github.node-gradle.node", version = "3.4.0" }
osdetector = { id = "com.google.osdetector", version = "1.6.2" }
sphinx = { id = "kr.motd.sphinx", version = "2.10.0" }
osdetector = { id = "com.google.osdetector", version = "1.7.1" }
sphinx = { id = "kr.motd.sphinx", version = "2.10.1" }
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group=com.linecorp.centraldogma
version=0.58.0-SNAPSHOT
version=0.57.4-SNAPSHOT
projectName=Central Dogma
projectUrl=https://line.github.io/centraldogma/
projectDescription=Highly-available version-controlled service configuration repository based on Git, ZooKeeper and HTTP/2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@
import com.linecorp.centraldogma.client.armeria.EndpointListDecoder;
import com.linecorp.centraldogma.common.Change;
import com.linecorp.centraldogma.common.Query;
import com.linecorp.centraldogma.testing.internal.FlakyTest;
import com.linecorp.centraldogma.testing.junit.CentralDogmaExtension;

@FlakyTest
class CentralDogmaEndpointGroupTest {

private static final List<String> HOST_AND_PORT_LIST = ImmutableList.of(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@
import com.linecorp.centraldogma.server.ZooKeeperReplicationConfig;
import com.linecorp.centraldogma.server.ZooKeeperServerConfig;
import com.linecorp.centraldogma.server.auth.AuthProviderFactory;
import com.linecorp.centraldogma.testing.internal.FlakyTest;
import com.linecorp.centraldogma.testing.internal.TemporaryFolderExtension;
import com.linecorp.centraldogma.testing.internal.auth.TestAuthMessageUtil;
import com.linecorp.centraldogma.testing.internal.auth.TestAuthProviderFactory;

@FlakyTest
class ReplicationWriteQuotaTest extends WriteQuotaTestBase {

private static final AuthProviderFactory factory = new TestAuthProviderFactory();
Expand Down
38 changes: 8 additions & 30 deletions server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"angular-ui-bootstrap": "2.2.0",
"angular-ui-notification": "0.2.0",
"angular-ui-router": "0.3.2",
"bootstrap": "4.3.1",
"bootstrap": "3.3.7",
"bootswatch": "3.3.7",
"diff": "3.0.1",
"fast-json-patch": "1.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public final class GitMirror extends AbstractMirror {
private static final Pattern DISALLOWED_CHARS = Pattern.compile("[^-_a-zA-Z]");
private static final Pattern CONSECUTIVE_UNDERSCORES = Pattern.compile("_+");

private static final int GIT_TIMEOUT_SECS = 10;
private static final int GIT_TIMEOUT_SECS = 60;

@Nullable
private IgnoreNode ignoreNode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@
import com.linecorp.centraldogma.server.GracefulShutdownTimeout;
import com.linecorp.centraldogma.server.ZooKeeperReplicationConfig;
import com.linecorp.centraldogma.server.ZooKeeperServerConfig;
import com.linecorp.centraldogma.testing.internal.FlakyTest;
import com.linecorp.centraldogma.testing.internal.TemporaryFolderExtension;
import com.linecorp.centraldogma.testing.internal.auth.TestAuthProviderFactory;

@FlakyTest
class ReplicatedLoginAndLogoutTest {

@RegisterExtension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
import com.linecorp.centraldogma.server.command.CommitResult;
import com.linecorp.centraldogma.server.command.NormalizingPushCommand;
import com.linecorp.centraldogma.server.command.PushAsIsCommand;
import com.linecorp.centraldogma.testing.internal.FlakyTest;

@FlakyTest
class ReplicationLogTest {

private static final Author AUTHOR = new Author("foo", "[email protected]");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@
import com.linecorp.centraldogma.server.CentralDogmaBuilder;
import com.linecorp.centraldogma.server.ZooKeeperReplicationConfig;
import com.linecorp.centraldogma.server.ZooKeeperServerConfig;
import com.linecorp.centraldogma.testing.internal.FlakyTest;
import com.linecorp.centraldogma.testing.junit.CentralDogmaExtension;

/**
* Makes sure that we can stop a replica that's waiting for the initial quorum.
*/
@FlakyTest
class StartStopWithoutInitialQuorumTest {

@RegisterExtension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@
import com.linecorp.centraldogma.server.command.CommitResult;
import com.linecorp.centraldogma.server.command.NormalizingPushCommand;
import com.linecorp.centraldogma.server.command.PushAsIsCommand;
import com.linecorp.centraldogma.testing.internal.FlakyTest;

@FlakyTest
class ZooKeeperCommandExecutorTest {

private static final Logger logger = LoggerFactory.getLogger(ZooKeeperCommandExecutorTest.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@
import com.linecorp.centraldogma.server.QuotaConfig;
import com.linecorp.centraldogma.server.command.Command;
import com.linecorp.centraldogma.server.command.CommitResult;
import com.linecorp.centraldogma.testing.internal.FlakyTest;

@FlakyTest
class ZooKeeperQuotaTest {

private static final int MAX_QUOTA = 3;
Expand Down
4 changes: 2 additions & 2 deletions site/src/sphinx/_static/add_badges.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ function addBadges(parent) {
'https://codecov.io/gh/line/centraldogma');

var ciImg = new Image();
ciImg.src = 'https://github.com/line/centraldogma/actions/workflows/gradle.yml/badge.svg';
ciImg.src = 'https://github.com/line/centraldogma/actions/workflows/actions_build.yml/badge.svg';
addBadge(div, ciImg,
'https://github.com/line/centraldogma/actions/workflows/gradle.yml');
'https://github.com/line/centraldogma/actions/workflows/actions_build.yml');

li.appendChild(div);
parent.appendChild(li);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright 2022 LINE Corporation
*
* LINE Corporation licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

package com.linecorp.centraldogma.testing.internal;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.junit.jupiter.api.Tag;

@Inherited
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Tag("FLAKY_TESTS")
public @interface FlakyTest {
}

0 comments on commit 2bab7bf

Please sign in to comment.