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

Add Unix Stream codec, Split flow from FDK, update integration tests #150

Merged
merged 49 commits into from
Sep 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
dd87c35
http input codec
zootalures Aug 29, 2018
8ab3af4
add jetty-core and UDS deps
zootalures Aug 30, 2018
348792e
PoC jetty core UDS event codec
Sep 3, 2018
d722ebb
revise FDK contract for initial relase, split flow from fn, support n…
zootalures Sep 7, 2018
08d2a4c
First pass of refactor
zootalures Sep 9, 2018
f483f85
added annotations for for features to support flow
zootalures Sep 10, 2018
e1ab94d
moving flow feature to runtime package
zootalures Sep 10, 2018
fc707dd
rename flow testing and add docs, fix race in Stream testing
zootalures Sep 10, 2018
fc9886d
fixing failing tests
zootalures Sep 10, 2018
666cb3f
Update to reflect FN_ID
zootalures Sep 11, 2018
146e83c
more integration test fixing
zootalures Sep 11, 2018
9089035
fix up format name
zootalures Sep 11, 2018
e2a3b90
first stab at home-grown UDS implementation
zootalures Sep 12, 2018
0942c6a
docker build fix
zootalures Sep 13, 2018
f478257
UDS rework, remove old UDS dep and test new one
zootalures Sep 13, 2018
f4abf59
adjust permissions on file on start
zootalures Sep 13, 2018
029f400
new integration tests
zootalures Sep 14, 2018
e5242d7
simlify build and integration tests, add tests for http-stream
zootalures Sep 14, 2018
552d5f2
fix ci
zootalures Sep 15, 2018
c941cdf
typo
zootalures Sep 15, 2018
311d58d
make igntests standalone
zootalures Sep 15, 2018
5b40435
itests run 1.8
zootalures Sep 15, 2018
0fd287d
fix itest result
zootalures Sep 15, 2018
3dbc3ee
env for itests
zootalures Sep 15, 2018
846eeb6
add createDir
zootalures Sep 15, 2018
7ddd360
test failures in circle
zootalures Sep 15, 2018
b3fa77a
fix test interference
zootalures Sep 15, 2018
64f0cbd
Use standard properties in fdk tests, fix versions in itests
zootalures Sep 15, 2018
d878986
hmm no entropy on circle boxes :)
zootalures Sep 15, 2018
561a51a
use consistent properties for versions everywhere
zootalures Sep 15, 2018
de7e460
add waits for start
zootalures Sep 15, 2018
8e2096b
this time with feeling
zootalures Sep 15, 2018
bf7248d
diagnosing timeout
zootalures Sep 16, 2018
16f6802
close input, try more aggressive testing
zootalures Sep 16, 2018
97ffadb
C errors
zootalures Sep 16, 2018
42ea541
fixing up accept and twiddling with integration test start
zootalures Sep 17, 2018
b8abc5c
set DOCKER_LOCALHOST
zootalures Sep 17, 2018
ce96bea
integration test fixing/finessing
zootalures Sep 18, 2018
ff729f2
cludge docker localhost
zootalures Sep 18, 2018
e463adb
no_proxy messing
zootalures Sep 18, 2018
e3f8d1d
set fnserver IP correctly
zootalures Sep 18, 2018
43cf9b5
typo
zootalures Sep 18, 2018
755c69d
nits in C code
zootalures Sep 18, 2018
a4bf3df
review nits
zootalures Sep 18, 2018
78d745a
more C fix nits
zootalures Sep 18, 2018
14d1b46
Make mandatory headers mandatory again
zootalures Sep 18, 2018
e2209d7
minus comment
zootalures Sep 18, 2018
fef06de
remove Content-Length from stripped input
zootalures Sep 18, 2018
df25e51
fix call test
zootalures Sep 18, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 26 additions & 72 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,24 @@ version: 2
jobs:
build:
working_directory: ~/fn-java-fdk
machine:
java:
version: oraclejdk8
machine: true
environment:
# store_artifacts doesn't shell substitute so the variable
# definitions are duplicated in those steps too.
FDK_ARTIFACT_DIR: /tmp/artifacts/fdk
TEST_ARTIFACT_DIR: /tmp/artifacts/tests
STAGING_DIR: /tmp/staging-repository
REPOSITORY_LOCATION: /tmp/staging_repo
steps:
- checkout
- run:
name: Update Docker to latest
command: ./.circleci/install-docker.sh
- run:
name: Install fn binary (as it is needed for the integration tests)
command: ./.circleci/install-fn.sh
- run:
name: Install junit-merge
command: npm install -g junit-merge
- run:
name: Set release to latest branch version
command: |
Expand All @@ -22,83 +29,22 @@ jobs:
name: Determine the release version
command: ./.circleci/update-versions.sh
- run:
name: Build and deploy locally
name: Build and Test FDK
command: |
rm -rf $STAGING_DIR
mkdir -p $STAGING_DIR
mvn deploy -DaltDeploymentRepository=localStagingDir::default::file://"$STAGING_DIR"
- store_test_results:
path: runtime/target/surefire-reports
- store_test_results:
path: testing/target/surefire-reports

export FN_FDK_VERSION=$(cat ./release.version)
./build.sh
- run:
name: Copy FDK artifacts to upload folder
name: Run integration tests
command: |
mkdir -p "$FDK_ARTIFACT_DIR"
cp -a api/target/*.jar "$FDK_ARTIFACT_DIR"
cp -a runtime/target/*.jar "$FDK_ARTIFACT_DIR"
- store_artifacts:
name: Upload FDK artifacts
path: /tmp/artifacts/fdk

- run:
name: Update Docker to latest
command: ./.circleci/install-docker.sh

export FN_JAVA_FDK_VERSION=$(cat release.version)
./integration-tests/run_tests_ci.sh
timeout: 1200
- run:
name: Login to Docker
command: |
if [[ "${CIRCLE_BRANCH}" == "master" && -z "${CIRCLE_PR_REPONAME}" ]]; then
docker login -u $DOCKER_USER -p $DOCKER_PASS
fi

- run:
name: Build fn-java-fdk Docker build image
command: |
cd build-image
./docker-build.sh -t fnproject/fn-java-fdk-build:$(cat ../release.version) .

- run:
name: Build fn-java-fdk-jdk9 Docker build image
command: |
cd build-image
./docker-build.sh -f Dockerfile-jdk9 -t fnproject/fn-java-fdk-build:jdk9-$(cat ../release.version) .
- run:
name: Build fn-java-fdk Docker runtime image
command: |
cd runtime
docker build -t fnproject/fn-java-fdk:$(cat ../release.version) .

- run:
name: Build fn-java-fdk-jdk9 Docker runtime image
command: |
cd runtime
docker build -f Dockerfile-jdk9 -t fnproject/fn-java-fdk:jdk9-$(cat ../release.version) .

- run:
name: Install fn binary (as it is needed for the integration tests)
command: ./.circleci/install-fn.sh

- run:
name: Run integration tests
command: REPOSITORY_LOCATION="$STAGING_DIR" FN_JAVA_FDK_VERSION=$(cat release.version) ./integration-tests/run-local.sh
timeout: 1200

- run:
name: Copy integration test results to test artifact dir
command: |
mkdir -p "$TEST_ARTIFACT_DIR"
for test_dir in ./integration-tests/main/test-*; do
test_name="$(basename "$test_dir")"
mkdir "${TEST_ARTIFACT_DIR}/${test_name}"
cp -a $(find "$test_dir" -maxdepth 1 -type f) "${TEST_ARTIFACT_DIR}/${test_name}"
done
find "${TEST_ARTIFACT_DIR}"
when: always
- store_artifacts:
name: Upload integration test results to artifacts
path: /tmp/artifacts/tests
- deploy:
name: Release new version
command: |
Expand All @@ -108,4 +54,12 @@ jobs:
git branch --set-upstream-to=origin/${CIRCLE_BRANCH} ${CIRCLE_BRANCH}
./.circleci/release.sh
fi
- run:
name: Gather test results
when: always
command: |
junit-merge $(find . -wholename "*/target/surefire-reports/*.xml") --createDir -o test_results/merged_results.xml
- store_test_results:
when: always
path: test_results

32 changes: 0 additions & 32 deletions .circleci/install-go.sh

This file was deleted.

7 changes: 6 additions & 1 deletion .circleci/update-versions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/bin/bash
#
# this is instead for the maven release plugin (which sucks) - this sets the versions across the project before a build
# for branch builds these are ignored (nothing is deployed)
# For master releases this sets the latest version that this branch would be released as
#

release_version=$(cat release.version)
if [[ $release_version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] ; then
Expand All @@ -14,6 +19,6 @@ mvn versions:set -D newVersion=${release_version} versions:update-child-modules
# We need to replace the example dependency versions also
# (sed syntax for portability between MacOS and gnu)
find . -name pom.xml |
xargs -n 1 sed -i.bak -e "s|<fnproject\\.version>.*</fnproject\\.version>|<fnproject.version>${release_version}</fnproject.version>|"
xargs -n 1 sed -i.bak -e "s|<fdk\\.version>.*</fdk\\.version>|<fdk.version>${release_version}</fdk.version>|"
find . -name pom.xml.bak -delete

12 changes: 12 additions & 0 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@

<artifactId>api</artifactId>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
Expand Down
Loading