Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
Merge branch 'METRON-1572' into METRON-1533-NEW
Browse files Browse the repository at this point in the history
  • Loading branch information
nickwallen committed Jun 5, 2018
2 parents e60c3fc + 571e85d commit 957a942
Show file tree
Hide file tree
Showing 114 changed files with 1,494 additions and 580 deletions.
59 changes: 59 additions & 0 deletions KEYS
Expand Up @@ -984,3 +984,62 @@ vkd/cbkuZuCthrOJq3gOfaRXS46EZ4rLAvoQKUiw1ZznjjYzI6ErJc1iD10B4/CD
7wQCgib6Orvh57hVFTFWa116lpkU+rV3RUFC8RI=
=MZyO
-----END PGP PUBLIC KEY BLOCK-----
pub rsa4096 2018-05-15 [SC]
CEB9FD4AF1ABCFBF860538813CA8AFC41CEEA43A
uid [ultimate] Justin Leet (CODE SIGNING KEY) <leet@apache.org>
sig 3 3CA8AFC41CEEA43A 2018-05-15 Justin Leet (CODE SIGNING KEY) <leet@apache.org>
sub rsa4096 2018-05-15 [E]
sig 3CA8AFC41CEEA43A 2018-05-15 Justin Leet (CODE SIGNING KEY) <leet@apache.org>

-----BEGIN PGP PUBLIC KEY BLOCK-----

mQINBFr7NJQBEADEvgaMw/ftxVxkymNyykvt3RRYitlyigOudIddBHMp6BCTCyol
9sYQ3PfyeXQs85E4pEyIvJy2svRQZ18vvN/pVP2UKRjlbIgbDTSRwtt2DlUA31re
DqLHm8JAACEe7KTDO4Nck3ALlrRerSjA5cOpa5fKQ7dgbaJQLl7sUxYaKekjIhFy
sD4jv51C2ofVGPBjoMfWzOm9Ogmo1GyLRL3WlN/Tmzm3QJSKbCUay4hbu2X9KLCG
oUwAj/imZbKIM6MNyi0DTG7nj+utnEieiYHrtx24jEC1nMzjbyb3niQpxRDhR7lf
Kl/70fcOtBSooVRK0trntxIIoLyvmJ++Rm9riPzycvISnjuv2lH62/knErnL/Vkp
SS/FpiHjwFTqoUIEH8AE5iYQAzGskpVlyZCAlrLKq+YzApVxVnJpiHHAnGxutdr9
wcep3iu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sX7Pdov+AbFCqNtQCtfa
wLok3qMOOaY4SKjmrqo+RkuxssWnnu9rfx44WnNe+0/+p2JXmFsWxoUE0NhVgBsR
S9ngFZCUtNrbYoOzIQCrW5PP40dVQ8O6Z0ogBTxpHhYhhJxppMD+D0Z2SmUywX6S
C8YQC1J5a7fy95kCZUJtqN2E8cfs5Fe8APV8od7g6pCBkl4W5U6FDmxzeMc4/fnL
2tJZlf6/F2sFp8NpZy5xFFhfYQTx29aotqI8ZYL+Ap/NrcxgJHVlzhhPWaDQPNvG
voLQ+ML+V7mIoQHdopQFxByUhTncvkf/GKH/g19jaPOkZrDpWK4NtpUHKy+liZ1V
YAiuKTxjtA+/Yp60CluyauFX2SFFQJmxlyArbAuUXT59QVKvZvsXJc4PLXwTlBj+
GOiGOVqmwEZRnk5qI4WO51lM2MJ0VfNBpZGPAI+KNUTYdBQhVBnWy1tf8bS6W5NY
hjlTBT6jB6Df3Vma
=FS7f
-----END PGP PUBLIC KEY BLOCK-----
2 changes: 1 addition & 1 deletion Upgrading.md
Expand Up @@ -19,7 +19,7 @@ limitations under the License.
This document constitutes a per-version listing of changes of
configuration which are non-backwards compatible.

## 0.4.2 to 0.4.3
## 0.4.2 to 0.5.0

### [METRON-941: native PaloAlto parser corrupts message when having a comma in the payload](https://issues.apache.org/jira/browse/METRON-941)
While modifying the PaloAlto log parser to support logs from newer
Expand Down
77 changes: 45 additions & 32 deletions dev-utilities/release-utils/metron-rc-check
Expand Up @@ -22,7 +22,7 @@ function help {
echo "usage: ${0}"
echo " -v/--version=<version> The version of the metron release. [Required]"
echo " -c/--candidate=<RC#> Defines the Release Candidate. [Required]"
echo " -b/--bro=<bro version> The version of the bro kafka plugin. [Required]"
echo " -b/--bro=<bro version> The version of the bro kafka plugin. [Optional]"
echo " -h/--help Usage information."
echo " "
echo "example: "
Expand Down Expand Up @@ -119,21 +119,22 @@ else
exit 1
fi

if [ -z "$BRO" ]; then
echo "Missing -b/--bro which is required"
exit 1
fi

if [[ "$BRO" =~ ^[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2} ]]; then
BRO_VERSION="$BRO"
else
echo "[ERROR] $BRO may not be a valid version number"
exit 1
# validating the bro plugin is not required
if [ -n "$BRO" ]; then
if [[ "$BRO" =~ ^[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2} ]]; then
BRO_VERSION="$BRO"
else
echo "[ERROR] $BRO may not be a valid version number"
exit 1
fi
fi

echo "Metron Version $METRON_VERSION"
echo "Release Candidate $RC"
echo "Bro Plugin Version $BRO_VERSION"

if [ -n "$BRO" ]; then
echo "Bro Plugin Version $BRO_VERSION"
fi

METRON_RC_DIST="$METRON_DIST$METRON_VERSION-$UPPER_RC"
echo "Metron RC Distribution Root is $METRON_RC_DIST"
Expand All @@ -158,8 +159,7 @@ echo "Working directory $WORK"
KEYS="$METRON_RC_DIST/KEYS"
METRON_ASSEMBLY="$METRON_RC_DIST/apache-metron-$METRON_VERSION-$RC.tar.gz"
METRON_ASSEMBLY_SIG="$METRON_ASSEMBLY.asc"
METRON_KAFKA_BRO_ASSEMBLY="$METRON_RC_DIST/apache-metron-bro-plugin-kafka_$BRO_VERSION.tar.gz"
METRON_KAFKA_BRO_ASSEMBLY_ASC="$METRON_KAFKA_BRO_ASSEMBLY.asc"


echo "Downloading $KEYS"
if ! wget -P "$WORK" "$KEYS" ; then
Expand All @@ -172,20 +172,29 @@ if ! wget -P "$WORK" "$METRON_ASSEMBLY" ; then
echo "[ERROR] Failed to download $METRON_ASSEMBLY"
exit 1
fi

echo "Downloading $METRON_ASSEMBLY_SIG"
if ! wget -P "$WORK" "$METRON_ASSEMBLY_SIG" ; then
echo "[ERROR] Failed to download $METRON_ASSEMBLY_SIG"
exit 1
fi
echo "Downloading $METRON_KAFKA_BRO_ASSEMBLY"
if ! wget -P "$WORK" "$METRON_KAFKA_BRO_ASSEMBLY" ; then
echo "[ERROR] Failed to download $METRON_KAFKA_BRO_ASSEMBLY"
exit 1
fi
echo "Downloading $METRON_KAFKA_BRO_ASSEMBLY_ASC"
if ! wget -P "$WORK" "$METRON_KAFKA_BRO_ASSEMBLY_ASC" ; then
echo "[ERROR] Failed to download $METRON_KAFKA_BRO_ASSEMBLY_ASC"
exit 1

if [ -n "$BRO" ]; then

METRON_KAFKA_BRO_ASSEMBLY="$METRON_RC_DIST/apache-metron-bro-plugin-kafka_$BRO_VERSION.tar.gz"
METRON_KAFKA_BRO_ASSEMBLY_ASC="$METRON_KAFKA_BRO_ASSEMBLY.asc"

echo "Downloading $METRON_KAFKA_BRO_ASSEMBLY"
if ! wget -P "$WORK" "$METRON_KAFKA_BRO_ASSEMBLY" ; then
echo "[ERROR] Failed to download $METRON_KAFKA_BRO_ASSEMBLY"
exit 1
fi

echo "Downloading $METRON_KAFKA_BRO_ASSEMBLY_ASC"
if ! wget -P "$WORK" "$METRON_KAFKA_BRO_ASSEMBLY_ASC" ; then
echo "[ERROR] Failed to download $METRON_KAFKA_BRO_ASSEMBLY_ASC"
exit 1
fi
fi

cd "$WORK" || exit 1
Expand All @@ -202,10 +211,19 @@ if ! gpg --verify ./"apache-metron-$METRON_VERSION-$RC.tar.gz.asc" "apache-metro
exit 1
fi

echo "Verifying Bro Kafka Plugin Assembly"
if ! gpg --verify ./"apache-metron-bro-plugin-kafka_$BRO_VERSION.tar.gz.asc" "apache-metron-bro-plugin-kafka_$BRO_VERSION.tar.gz" ; then
echo "[ERROR] failed to verify Bro Kafka Plugin Assembly"
exit 1
if [ -n "$BRO" ]; then

echo "Verifying Bro Kafka Plugin Assembly"
if ! gpg --verify ./"apache-metron-bro-plugin-kafka_$BRO_VERSION.tar.gz.asc" "apache-metron-bro-plugin-kafka_$BRO_VERSION.tar.gz" ; then
echo "[ERROR] failed to verify Bro Kafka Plugin Assembly"
exit 1
fi

if ! tar -xzf "apache-metron-bro-plugin-kafka_$BRO_VERSION.tar.gz" ; then
echo "[ERROR] failed to unpack Bro Kafka Plugin Assembly"
exit 1
fi

fi

echo "Unpacking Assemblies"
Expand All @@ -214,11 +232,6 @@ if ! tar -xzf "apache-metron-$METRON_VERSION-$RC.tar.gz" ; then
exit 1
fi

if ! tar -xzf "apache-metron-bro-plugin-kafka_$BRO_VERSION.tar.gz" ; then
echo "[ERROR] failed to unpack Bro Kafka Plugin Assembly"
exit 1
fi

echo ""
echo ""
read -p " run test suite [install, unit tests, integration tests, ui tests, licenses, rpm build]? [yN] " -n 1 -r
Expand Down
75 changes: 46 additions & 29 deletions dev-utilities/release-utils/validate-jira-for-release
Expand Up @@ -137,35 +137,52 @@ for i in "$@"; do
esac
done

WORKDIR="~/tmp"

# ensure all required values are set
if [ -z "$VERSION" ]; then
echo "Missing -v/--version is is required"
exit 1
help
echo "Missing -v/--version is is required"
exit 1
fi
if [ -z "$START" ]; then
echo "Missing -s/--start which is required"
exit 1
help
echo "Missing -s/--start which is required"
exit 1
fi
if [ -z "$END" ]; then
echo "Missing -e/--end which is required"
exit 1
help
echo "Missing -e/--end which is required"
exit 1
fi
if [ -z "$REPO" ]; then
echo "Missing -r/--repo which is required"
exit 1
help
echo "Missing -r/--repo which is required"
exit 1
fi
if [ -z "$BRANCH" ]; then
echo "Missing -b/--branch which is required"
exit 1
help
echo "Missing -b/--branch which is required"
exit 1
fi

# clone the metron repo and fetch all tags
git clone $REPO "metron-$VERSION"
TMPDIR="$HOME/tmp"
WORKDIR="$TMPDIR/metron-$VERSION"

# warn the user if the working directory exists
if [ -d "$WORKDIR" ]; then
read -p " directory exists [$WORKDIR]. overwrite existing repo? [yN] " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 1
fi
fi

# fetch the repo and all tags
rm -rf "$WORKDIR"
git clone $REPO "$WORKDIR"
cd "$WORKDIR"
git checkout $BRANCH
cd "$WORKDIR/metron-$VERSION"
git fetch --all --tags
git fetch --tags

# find all JIRAs that have been committed since the last release
GET_JIRAS="git log $START..$END --oneline | grep -E -o 'METRON[- ]*[0-9]+'"
Expand All @@ -177,21 +194,21 @@ printf "$FORMAT_STR" "JIRA" "STATUS" "FIX VERSION" "ASSIGNEE" "FIX"
# for each JIRA since the last release tag...
eval $GET_JIRAS | while read JIRA ; do

# fetch the JIRA content
URL="https://issues.apache.org/jira/si/jira.issueviews:issue-xml/$JIRA/$JIRA.xml"
CONTENT=`curl -s $URL`
# fetch the JIRA content
URL="https://issues.apache.org/jira/si/jira.issueviews:issue-xml/$JIRA/$JIRA.xml"
CONTENT=`curl -s $URL`

# painfully extract some fields
STATUS=`echo "$CONTENT" | grep "<status[^>]*>" | sed 's/^.*<status[^>]*>//' | sed 's/<.status>.*$//'`
ASSIGNEE=`echo "$CONTENT" | grep "<assignee[^>]*>" | sed 's/^.*<assignee[^>]*>//' | sed 's/<.assignee>.*$//'`
FIXV=`echo "$CONTENT" | grep "<fixVersion[^>]*>" | sed 's/^.*<fixVersion[^>]*>//' | sed 's/<.fixVersion>.*$//'`
# painfully extract some fields
STATUS=`echo "$CONTENT" | grep "<status[^>]*>" | sed 's/^.*<status[^>]*>//' | sed 's/<.status>.*$//'`
ASSIGNEE=`echo "$CONTENT" | grep "<assignee[^>]*>" | sed 's/^.*<assignee[^>]*>//' | sed 's/<.assignee>.*$//'`
FIXV=`echo "$CONTENT" | grep "<fixVersion[^>]*>" | sed 's/^.*<fixVersion[^>]*>//' | sed 's/<.fixVersion>.*$//'`

# the link is only populated, if there is something to fix
LINK=""
if [ "$FIXV" != "$VERSION" ] || [ "$STATUS" != "Done" ]; then
LINK="https://issues.apache.org/jira/browse/$JIRA"
fi
# the link is only populated, if there is something to fix
LINK=""
if [ "$FIXV" != "$VERSION" ] || [ "$STATUS" != "Done" ]; then
LINK="https://issues.apache.org/jira/browse/$JIRA"
fi

# show the JIRA
printf "$FORMAT_STR" "$JIRA" "$STATUS" "$FIXV" "$ASSIGNEE" "$LINK"
# show the JIRA
printf "$FORMAT_STR" "$JIRA" "$STATUS" "$FIXV" "$ASSIGNEE" "$LINK"
done
2 changes: 1 addition & 1 deletion metron-analytics/metron-maas-common/pom.xml
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.apache.metron</groupId>
<artifactId>metron-analytics</artifactId>
<version>0.4.3</version>
<version>0.5.0</version>
</parent>
<artifactId>metron-maas-common</artifactId>
<url>https://metron.apache.org/</url>
Expand Down
2 changes: 1 addition & 1 deletion metron-analytics/metron-maas-service/pom.xml
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.apache.metron</groupId>
<artifactId>metron-analytics</artifactId>
<version>0.4.3</version>
<version>0.5.0</version>
</parent>
<artifactId>metron-maas-service</artifactId>
<url>https://metron.apache.org/</url>
Expand Down
2 changes: 1 addition & 1 deletion metron-analytics/metron-profiler-client/pom.xml
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.apache.metron</groupId>
<artifactId>metron-analytics</artifactId>
<version>0.4.3</version>
<version>0.5.0</version>
</parent>
<artifactId>metron-profiler-client</artifactId>
<url>https://metron.apache.org/</url>
Expand Down
Expand Up @@ -24,6 +24,7 @@
import org.apache.metron.hbase.mock.MockHBaseTableProvider;
import org.apache.metron.profiler.client.ProfileWriter;
import org.apache.metron.stellar.dsl.Context;
import org.apache.metron.stellar.dsl.ParseException;
import org.apache.metron.stellar.dsl.functions.resolver.SimpleFunctionResolver;
import org.apache.metron.stellar.dsl.functions.resolver.SingletonFunctionResolver;
import org.apache.metron.profiler.ProfileMeasurement;
Expand Down Expand Up @@ -266,7 +267,7 @@ public void testWithTwoGroups() {
/**
* Initialization should fail if the required context values are missing.
*/
@Test(expected = IllegalStateException.class)
@Test(expected = ParseException.class)
public void testMissingContext() {
Context empty = Context.EMPTY_CONTEXT();

Expand Down

0 comments on commit 957a942

Please sign in to comment.