Skip to content

[SERVER-7194] Official hyxtrix merge #2

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

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from
45 changes: 45 additions & 0 deletions .github/workflows/nebula-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "CI"
on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# test against JDK 8
java: [ 8 ]
name: CI with Java ${{ matrix.java }}
steps:
- uses: actions/checkout@v1
- name: Setup jdk
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- uses: actions/cache@v1
id: gradle-cache
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle/dependency-locks/*.lockfile') }}
restore-keys: |
- ${{ runner.os }}-gradle-
- uses: actions/cache@v1
id: gradle-wrapper-cache
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradlewrapper-${{ hashFiles('gradle/wrapper/*') }}
restore-keys: |
- ${{ runner.os }}-gradlewrapper-
- name: Build with Gradle
run: ./gradlew --info --stacktrace build
env:
CI_NAME: github_actions
CI_BUILD_NUMBER: ${{ github.sha }}
CI_BUILD_URL: 'https://github.com/${{ github.repository }}'
CI_BRANCH: ${{ github.ref }}
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51 changes: 51 additions & 0 deletions .github/workflows/nebula-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: "Publish candidate/release to NetflixOSS and Maven Central"
on:
push:
tags:
- v*.*.*
- v*.*.*-rc.*
release:
types:
- published

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup jdk 8
uses: actions/setup-java@v1
with:
java-version: 1.8
- uses: actions/cache@v1
id: gradle-cache
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle/dependency-locks/*.lockfile') }}
restore-keys: |
- ${{ runner.os }}-gradle-
- uses: actions/cache@v1
id: gradle-wrapper-cache
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradlewrapper-${{ hashFiles('gradle/wrapper/*') }}
restore-keys: |
- ${{ runner.os }}-gradlewrapper-
- name: Publish candidate
if: contains(github.ref, '-rc.')
run: ./gradlew --info --stacktrace -Prelease.useLastTag=true candidate
env:
NETFLIX_OSS_SIGNING_KEY: ${{ secrets.ORG_SIGNING_KEY }}
NETFLIX_OSS_SIGNING_PASSWORD: ${{ secrets.ORG_SIGNING_PASSWORD }}
NETFLIX_OSS_REPO_USERNAME: ${{ secrets.ORG_NETFLIXOSS_USERNAME }}
NETFLIX_OSS_REPO_PASSWORD: ${{ secrets.ORG_NETFLIXOSS_PASSWORD }}
- name: Publish release
if: (!contains(github.ref, '-rc.'))
run: ./gradlew --info -Prelease.useLastTag=true final
env:
NETFLIX_OSS_SONATYPE_USERNAME: ${{ secrets.ORG_SONATYPE_USERNAME }}
NETFLIX_OSS_SONATYPE_PASSWORD: ${{ secrets.ORG_SONATYPE_PASSWORD }}
NETFLIX_OSS_SIGNING_KEY: ${{ secrets.ORG_SIGNING_KEY }}
NETFLIX_OSS_SIGNING_PASSWORD: ${{ secrets.ORG_SIGNING_PASSWORD }}
NETFLIX_OSS_REPO_USERNAME: ${{ secrets.ORG_NETFLIXOSS_USERNAME }}
NETFLIX_OSS_REPO_PASSWORD: ${{ secrets.ORG_NETFLIXOSS_PASSWORD }}
37 changes: 37 additions & 0 deletions .github/workflows/nebula-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "Publish snapshot to NetflixOSS and Maven Central"

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 8
- uses: actions/cache@v2
id: gradle-cache
with:
path: |
~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
- uses: actions/cache@v2
id: gradle-wrapper-cache
with:
path: |
~/.gradle/wrapper
key: ${{ runner.os }}-gradlewrapper-${{ hashFiles('gradle/wrapper/*') }}
- name: Build
run: ./gradlew build snapshot
env:
NETFLIX_OSS_SIGNING_KEY: ${{ secrets.ORG_SIGNING_KEY }}
NETFLIX_OSS_SIGNING_PASSWORD: ${{ secrets.ORG_SIGNING_PASSWORD }}
NETFLIX_OSS_REPO_USERNAME: ${{ secrets.ORG_NETFLIXOSS_USERNAME }}
NETFLIX_OSS_REPO_PASSWORD: ${{ secrets.ORG_NETFLIXOSS_PASSWORD }}
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<img src="https://netflix.github.com/Hystrix/images/hystrix-logo-tagline-850.png">
<img src="https://netflix.github.io/Hystrix/images/hystrix-logo-tagline-850.png">

# Hystrix: Latency and Fault Tolerance for Distributed Systems

Expand Down Expand Up @@ -149,7 +149,7 @@ $ cd Hystrix/
$ ./gradlew build
```

Futher details on building can be found on the [Getting Started](https://github.com/Netflix/Hystrix/wiki/Getting-Started) page of the wiki.
Further details on building can be found on the [Getting Started](https://github.com/Netflix/Hystrix/wiki/Getting-Started) page of the wiki.

## Run Demo

Expand Down
62 changes: 8 additions & 54 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,71 +1,25 @@
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:3.0.3'
}
}

plugins {
// id 'nebula.netflixoss' version '3.4.0'
id 'nebula.maven-publish' version '4.9.1'
id 'nebula.release' version '4.1.0'
id 'nebula.dependency-lock' version '4.3.0'
id 'nebula.info' version '3.2.1'
id 'idea'
id 'eclipse'
id 'me.champeau.gradle.jmh' version '0.3.1'
id 'net.saliman.cobertura' version '2.2.8'
}

ext {
githubProjectName = rootProject.name
id "com.netflix.nebula.netflixoss" version "11.3.1"
id "me.champeau.jmh" version "0.7.1"
}

group = "com.netflix"

allprojects {
repositories {
jcenter()
mavenCentral()
}

apply plugin: 'net.saliman.cobertura'
}

subprojects {
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'nebula.maven-publish'
apply plugin: 'nebula.release'
apply plugin: 'nebula.source-jar'
apply plugin: 'nebula.dependency-lock'
apply plugin: 'nebula.info'
apply plugin: 'nebula.provided-base'
apply plugin: 'nebula.compile-api'

sourceCompatibility = 1.6
targetCompatibility = 1.6
apply plugin: 'nebula.netflixoss'
apply plugin: 'java-library'

group = "com.netflix.hystrix"


group = "com.netflix.${githubProjectName}"

eclipse {
classpath {
// include 'provided' dependencies on the classpath
plusConfigurations += [configurations.provided]
downloadSources = true
downloadJavadoc = true
}
}

idea {
module {
// include 'provided' dependencies on the classpath
scopes.COMPILE.plus += [configurations.provided]
}
tasks.withType(Javadoc).configureEach {
failOnError = false
}

publishing {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-all.zip
10 changes: 5 additions & 5 deletions hystrix-contrib/hystrix-clj/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ buildscript {
jcenter()
maven{
name 'clojars'
url 'http://clojars.org/repo'
url 'https://clojars.org/repo'
}
}
dependencies {
classpath 'com.netflix.nebula:nebula-clojure-plugin:4.0.1'
classpath 'com.netflix.nebula:nebula-clojure-plugin:13.0.1'
}
}
apply plugin: 'nebula.clojure' // this is a wrapper around clojuresque to make it behave well with other plugins
apply plugin: 'com.netflix.nebula.clojure' // this is a wrapper around clojuresque to make it behave well with other plugins

repositories {
mavenCentral()
clojarsRepo()
}

dependencies {
compileApi project(':hystrix-core')
compile 'org.clojure:clojure:1.7.0'
api project(':hystrix-core')
implementation 'org.clojure:clojure:1.7.0'
}

/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies {
compileApi project(':hystrix-core')
compileApi 'io.dropwizard.metrics:metrics-core:3.2.2'
testCompile 'junit:junit-dep:4.10'
testCompile 'org.mockito:mockito-all:1.9.5'
api project(':hystrix-core')
api 'io.dropwizard.metrics:metrics-core:3.2.2'
testImplementation 'junit:junit-dep:4.10'
testImplementation 'org.mockito:mockito-all:1.9.5'
}
2 changes: 1 addition & 1 deletion hystrix-contrib/hystrix-javanica/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ It doesn't matter which approach you use to create proxies in Spring, javanica w
More about Spring AOP + AspectJ read [here] (http://docs.spring.io/spring/docs/current/spring-framework-reference/html/aop.html)

## Aspect weaving
Javanica supports two weaving modes: compile and runtime. Load time weaving hasn't been tested but it should work. If you tried LTW mode and got any problems then raise javanica issue or create pull request with fix.
Javanica supports two weaving modes: implementation and runtime. Load time weaving hasn't been tested but it should work. If you tried LTW mode and got any problems then raise javanica issue or create pull request with fix.
- CTW. To use CTW mode you need to use specific jar version: **hystrix-javanica-ctw-X.Y.Z** . This jar is assembled with aspects compiled with using [AJC](https://eclipse.org/aspectj/doc/next/devguide/ajc-ref.html) compiler. If you will try to use regular hystrix-javanica-X.Y.Z with CTW then you get ``` NoSuchMethodError aspectOf() ``` at runtime from building with iajc. Also, you need to start your app with using java property: ```-DWeavingMode=compile```.
**NOTE**: Javanica depends on aspectj library and uses internal features of aspectj and these features aren't provided as a part of open API thus it can change from version to version. Javanica tested with latest aspectj version 1.8.7. If you updated aspectj version and noticed any issues then please don't hestitate to create new issue or contribute.
- RTW works, you can use regular hystrix-javanica-X.Y.Z
Expand Down
Loading
Loading