This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 721ae58a09 HDDS-11057. Enable reproducible builds (#6856)
721ae58a09 is described below
commit 721ae58a090ddad28947053c108561271a3fe976
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Fri Oct 18 21:09:01 2024 +0200
HDDS-11057. Enable reproducible builds (#6856)
---
.github/workflows/ci.yml | 61 ++++++++++++++++++++++
.../hadoop/hdds/protocol/DatanodeDetails.java | 41 ---------------
.../apache/hadoop/hdds/utils/HddsVersionInfo.java | 2 -
.../org/apache/hadoop/hdds/utils/VersionInfo.java | 13 -----
.../main/resources/hdds-version-info.properties | 3 --
.../apache/hadoop/ozone/HddsDatanodeService.java | 1 -
.../hadoop/hdds/server/ServiceRuntimeInfo.java | 7 ---
.../hadoop/hdds/server/ServiceRuntimeInfoImpl.java | 6 ---
.../apache/hadoop/hdds/utils/HddsServerUtil.java | 4 +-
.../interface-client/src/main/proto/hdds.proto | 2 +-
.../apache/hadoop/ozone/util/OzoneVersionInfo.java | 2 -
.../main/resources/ozone-version-info.properties | 3 --
.../dev-support/checks/{build.sh => _build.sh} | 5 +-
.../checks/{build.sh => _diffoscope.sh} | 35 +++++++++----
hadoop-ozone/dev-support/checks/build.sh | 18 +------
.../dev-support/checks/{build.sh => repro.sh} | 28 ++++++----
.../src/main/resources/httpfs.properties | 3 --
.../hadoop/ozone/recon/api/NodeEndpoint.java | 1 -
.../ozone/recon/api/types/DatanodeMetadata.java | 15 ------
.../hadoop/ozone/recon/scm/ReconNodeManager.java | 11 ----
.../src/views/datanodes/datanodes.tsx | 12 -----
.../hadoop/ozone/recon/api/TestEndpoints.java | 3 --
.../ozone/recon/api/TestOpenContainerCount.java | 1 -
.../hadoop/ozone/freon/DatanodeSimulator.java | 1 -
pom.xml | 4 ++
25 files changed, 113 insertions(+), 169 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 4285bac399..ace3a7e15b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -153,6 +153,7 @@ jobs:
retention-days: 1
- name: Store source tarball for compilation
uses: actions/upload-artifact@v4
+ if: needs.build-info.outputs.needs-compile == 'true'
with:
name: ozone-src
path: hadoop-ozone/dist/target/ozone-*-src.tar.gz
@@ -407,6 +408,66 @@ jobs:
name: ${{ github.job }}
path: target/${{ github.job }}
continue-on-error: true
+ repro:
+ needs:
+ - build-info
+ - build
+ runs-on: ubuntu-20.04
+ timeout-minutes: 30
+ steps:
+ - name: Checkout project
+ uses: actions/checkout@v4
+ - name: Cache for maven dependencies
+ uses: actions/cache/restore@v4
+ with:
+ path: |
+ ~/.m2/repository/*/*/*
+ !~/.m2/repository/org/apache/ozone
+ key: maven-repo-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ maven-repo-
+ - name: Download Ozone repo
+ id: download-ozone-repo
+ uses: actions/download-artifact@v4
+ with:
+ name: ozone-repo
+ path: |
+ ~/.m2/repository/org/apache/ozone
+ - name: Download Ratis repo
+ if: ${{ inputs.ratis_args != '' }}
+ uses: actions/download-artifact@v4
+ with:
+ name: ratis-jars
+ path: |
+ ~/.m2/repository/org/apache/ratis
+ - name: Setup java ${{ env.TEST_JAVA_VERSION }}
+ uses: actions/setup-java@v4
+ with:
+ distribution: 'temurin'
+ java-version: ${{ env.TEST_JAVA_VERSION }}
+ - name: Execute tests
+ run: |
+ hadoop-ozone/dev-support/checks/${{ github.job }}.sh -Pdist -Psrc
-Dmaven.javadoc.skip=true ${{ inputs.ratis_args }}
+ continue-on-error: true
+ - name: Summary of failures
+ run: hadoop-ozone/dev-support/checks/_summary.sh target/${{ github.job
}}/summary.txt
+ if: ${{ !cancelled() }}
+ - name: Install diffoscope
+ run: |
+ sudo apt update -q
+ sudo apt install -y diffoscope
+ if: ${{ failure() }}
+ - name: Check artifact differences
+ run: |
+ hadoop-ozone/dev-support/checks/_diffoscope.sh
+ if: ${{ failure() }}
+ - name: Archive build results
+ uses: actions/upload-artifact@v4
+ if: always()
+ with:
+ name: ${{ github.job }}
+ path: target/${{ github.job }}
+ continue-on-error: true
acceptance:
needs:
- build-info
diff --git
a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/protocol/DatanodeDetails.java
b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/protocol/DatanodeDetails.java
index 602bc0d263..12efcc9aa2 100644
---
a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/protocol/DatanodeDetails.java
+++
b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/protocol/DatanodeDetails.java
@@ -94,7 +94,6 @@ public class DatanodeDetails extends NodeImpl implements
private String version;
private long setupTime;
private String revision;
- private String buildDate;
private volatile HddsProtos.NodeOperationalState persistedOpState;
private volatile long persistedOpStateExpiryEpochSec;
private int initialVersion;
@@ -112,7 +111,6 @@ public class DatanodeDetails extends NodeImpl implements
version = b.version;
setupTime = b.setupTime;
revision = b.revision;
- buildDate = b.buildDate;
persistedOpState = b.persistedOpState;
persistedOpStateExpiryEpochSec = b.persistedOpStateExpiryEpochSec;
initialVersion = b.initialVersion;
@@ -141,7 +139,6 @@ public class DatanodeDetails extends NodeImpl implements
this.version = datanodeDetails.version;
this.setupTime = datanodeDetails.setupTime;
this.revision = datanodeDetails.revision;
- this.buildDate = datanodeDetails.buildDate;
this.persistedOpState = datanodeDetails.getPersistedOpState();
this.persistedOpStateExpiryEpochSec =
datanodeDetails.getPersistedOpStateExpiryEpochSec();
@@ -433,9 +430,6 @@ public class DatanodeDetails extends NodeImpl implements
if (extendedDetailsProto.hasRevision()) {
builder.setRevision(extendedDetailsProto.getRevision());
}
- if (extendedDetailsProto.hasBuildDate()) {
- builder.setBuildDate(extendedDetailsProto.getBuildDate());
- }
return builder.build();
}
@@ -527,9 +521,6 @@ public class DatanodeDetails extends NodeImpl implements
if (!Strings.isNullOrEmpty(getRevision())) {
extendedBuilder.setRevision(getRevision());
}
- if (!Strings.isNullOrEmpty(getBuildDate())) {
- extendedBuilder.setBuildDate(getBuildDate());
- }
return extendedBuilder.build();
}
@@ -622,7 +613,6 @@ public class DatanodeDetails extends NodeImpl implements
private String version;
private long setupTime;
private String revision;
- private String buildDate;
private HddsProtos.NodeOperationalState persistedOpState;
private long persistedOpStateExpiryEpochSec = 0;
private int initialVersion;
@@ -654,7 +644,6 @@ public class DatanodeDetails extends NodeImpl implements
this.version = details.getVersion();
this.setupTime = details.getSetupTime();
this.revision = details.getRevision();
- this.buildDate = details.getBuildDate();
this.persistedOpState = details.getPersistedOpState();
this.persistedOpStateExpiryEpochSec =
details.getPersistedOpStateExpiryEpochSec();
@@ -801,18 +790,6 @@ public class DatanodeDetails extends NodeImpl implements
return this;
}
- /**
- * Sets the DataNode build date.
- *
- * @param date the build date of DataNode.
- *
- * @return DatanodeDetails.Builder
- */
- public Builder setBuildDate(String date) {
- this.buildDate = date;
- return this;
- }
-
/**
* Sets the DataNode setup time.
*
@@ -1054,24 +1031,6 @@ public class DatanodeDetails extends NodeImpl implements
this.revision = rev;
}
- /**
- * Returns the DataNode build date.
- *
- * @return DataNode build date
- */
- public String getBuildDate() {
- return buildDate;
- }
-
- /**
- * Set DataNode build date.
- *
- * @param date DataNode build date
- */
- public void setBuildDate(String date) {
- this.buildDate = date;
- }
-
@Override
public HddsProtos.NetworkNode toProtobuf(
int clientVersion) {
diff --git
a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/HddsVersionInfo.java
b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/HddsVersionInfo.java
index b76a316c90..386b1358b9 100644
---
a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/HddsVersionInfo.java
+++
b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/HddsVersionInfo.java
@@ -44,8 +44,6 @@ public final class HddsVersionInfo {
System.out.println(
"Source code repository " + HDDS_VERSION_INFO.getUrl() + " -r " +
HDDS_VERSION_INFO.getRevision());
- System.out.println("Compiled by " + HDDS_VERSION_INFO.getUser() + " on "
- + HDDS_VERSION_INFO.getDate());
System.out.println(
"Compiled with protoc " + HDDS_VERSION_INFO.getHadoopProtoc2Version() +
", " + HDDS_VERSION_INFO.getGrpcProtocVersion() +
diff --git
a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/VersionInfo.java
b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/VersionInfo.java
index 349c0a8620..d3de20cd47 100644
---
a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/VersionInfo.java
+++
b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/VersionInfo.java
@@ -65,18 +65,6 @@ public class VersionInfo {
return info.getProperty("revision", "Unknown");
}
- public String getBranch() {
- return info.getProperty("branch", "Unknown");
- }
-
- public String getDate() {
- return info.getProperty("date", "Unknown");
- }
-
- public String getUser() {
- return info.getProperty("user", "Unknown");
- }
-
public String getUrl() {
return info.getProperty("url", "Unknown");
}
@@ -108,7 +96,6 @@ public class VersionInfo {
public String getBuildVersion() {
return getVersion() +
" from " + getRevision() +
- " by " + getUser() +
" source checksum " + getSrcChecksum();
}
}
diff --git a/hadoop-hdds/common/src/main/resources/hdds-version-info.properties
b/hadoop-hdds/common/src/main/resources/hdds-version-info.properties
index bf887021c5..3ba2c2cbfa 100644
--- a/hadoop-hdds/common/src/main/resources/hdds-version-info.properties
+++ b/hadoop-hdds/common/src/main/resources/hdds-version-info.properties
@@ -18,9 +18,6 @@
version=${declared.hdds.version}
revision=${version-info.scm.commit}
-branch=${version-info.scm.branch}
-user=${user.name}
-date=${version-info.build.time}
url=${version-info.scm.uri}
srcChecksum=${version-info.source.md5}
hadoopProtoc2Version=${proto2.hadooprpc.protobuf.version}
diff --git
a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/HddsDatanodeService.java
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/HddsDatanodeService.java
index 6b32b74dc7..5f45f954fa 100644
---
a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/HddsDatanodeService.java
+++
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/HddsDatanodeService.java
@@ -228,7 +228,6 @@ public class HddsDatanodeService extends GenericCli
implements ServicePlugin {
datanodeDetails.setSetupTime(Time.now());
datanodeDetails.setRevision(
HddsVersionInfo.HDDS_VERSION_INFO.getRevision());
-
datanodeDetails.setBuildDate(HddsVersionInfo.HDDS_VERSION_INFO.getDate());
TracingUtil.initTracing(
"HddsDatanodeService." + datanodeDetails.getUuidString()
.substring(0, 8), conf);
diff --git
a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/ServiceRuntimeInfo.java
b/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/ServiceRuntimeInfo.java
index bcd75f3f21..3783613f3e 100644
---
a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/ServiceRuntimeInfo.java
+++
b/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/ServiceRuntimeInfo.java
@@ -47,13 +47,6 @@ public interface ServiceRuntimeInfo {
*/
String getSoftwareVersion();
- /**
- * Get the compilation information which contains date, user and branch.
- *
- * @return the compilation information, as a JSON string.
- */
- String getCompileInfo();
-
/**
* Gets the NN start time in milliseconds.
*
diff --git
a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/ServiceRuntimeInfoImpl.java
b/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/ServiceRuntimeInfoImpl.java
index 987f4aee03..74ba3c5b62 100644
---
a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/ServiceRuntimeInfoImpl.java
+++
b/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/ServiceRuntimeInfoImpl.java
@@ -42,12 +42,6 @@ public class ServiceRuntimeInfoImpl implements
ServiceRuntimeInfo {
return versionInfo.getVersion();
}
- @Override
- public String getCompileInfo() {
- return versionInfo.getDate() + " by " + versionInfo.getUser() + " from "
- + versionInfo.getBranch();
- }
-
@Override
public long getStartedTimeInMillis() {
return startedTimeInMillis;
diff --git
a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/HddsServerUtil.java
b/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/HddsServerUtil.java
index 94e9dceb6a..d80b6b3a27 100644
---
a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/HddsServerUtil.java
+++
b/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/HddsServerUtil.java
@@ -742,9 +742,7 @@ public final class HddsServerUtil {
" version = " + versionInfo.getVersion(),
" classpath = " + System.getProperty("java.class.path"),
" build = " + versionInfo.getUrl() + "/"
- + versionInfo.getRevision()
- + " ; compiled by '" + versionInfo.getUser()
- + "' on " + versionInfo.getDate(),
+ + versionInfo.getRevision(),
" java = " + System.getProperty("java.version"),
" conf = " + conf);
}
diff --git a/hadoop-hdds/interface-client/src/main/proto/hdds.proto
b/hadoop-hdds/interface-client/src/main/proto/hdds.proto
index a47fa8ac3d..1fc5884e24 100644
--- a/hadoop-hdds/interface-client/src/main/proto/hdds.proto
+++ b/hadoop-hdds/interface-client/src/main/proto/hdds.proto
@@ -61,7 +61,7 @@ message ExtendedDatanodeDetailsProto {
optional string version = 2;
optional int64 setupTime = 3;
optional string revision = 4;
- optional string buildDate = 5;
+ optional string buildDate = 5; // unused, reserved for compatibility
}
message MoveDataNodePairProto {
diff --git
a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/util/OzoneVersionInfo.java
b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/util/OzoneVersionInfo.java
index b5a15db39c..289fc42b4e 100644
---
a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/util/OzoneVersionInfo.java
+++
b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/util/OzoneVersionInfo.java
@@ -69,8 +69,6 @@ public final class OzoneVersionInfo {
System.out.println(
"Source code repository " + OZONE_VERSION_INFO.getUrl() + " -r " +
OZONE_VERSION_INFO.getRevision());
- System.out.println("Compiled by " + OZONE_VERSION_INFO.getUser() + " on "
- + OZONE_VERSION_INFO.getDate());
System.out.println(
"Compiled with protoc " + OZONE_VERSION_INFO.getHadoopProtoc2Version()
+
", " + OZONE_VERSION_INFO.getGrpcProtocVersion() +
diff --git
a/hadoop-ozone/common/src/main/resources/ozone-version-info.properties
b/hadoop-ozone/common/src/main/resources/ozone-version-info.properties
index 1a6e3b6151..73f02760d6 100644
--- a/hadoop-ozone/common/src/main/resources/ozone-version-info.properties
+++ b/hadoop-ozone/common/src/main/resources/ozone-version-info.properties
@@ -19,9 +19,6 @@
version=${declared.ozone.version}
release=${ozone.release}
revision=${version-info.scm.commit}
-branch=${version-info.scm.branch}
-user=${user.name}
-date=${version-info.build.time}
url=${version-info.scm.uri}
srcChecksum=${version-info.source.md5}
hadoopProtoc2Version=${proto2.hadooprpc.protobuf.version}
diff --git a/hadoop-ozone/dev-support/checks/build.sh
b/hadoop-ozone/dev-support/checks/_build.sh
similarity index 94%
copy from hadoop-ozone/dev-support/checks/build.sh
copy to hadoop-ozone/dev-support/checks/_build.sh
index 5ff1bdc9a0..b1f23a9ba8 100755
--- a/hadoop-ozone/dev-support/checks/build.sh
+++ b/hadoop-ozone/dev-support/checks/_build.sh
@@ -27,6 +27,5 @@ else
fi
export MAVEN_OPTS="-Xmx4096m ${MAVEN_OPTS:-}"
-echo "${MAVEN_OPTIONS}"
-mvn ${MAVEN_OPTIONS} clean install "$@"
-exit $?
+mvn ${MAVEN_OPTIONS} clean "$@"
+rc=$?
diff --git a/hadoop-ozone/dev-support/checks/build.sh
b/hadoop-ozone/dev-support/checks/_diffoscope.sh
similarity index 58%
copy from hadoop-ozone/dev-support/checks/build.sh
copy to hadoop-ozone/dev-support/checks/_diffoscope.sh
index 5ff1bdc9a0..cc7cc700c8 100755
--- a/hadoop-ozone/dev-support/checks/build.sh
+++ b/hadoop-ozone/dev-support/checks/_diffoscope.sh
@@ -13,20 +13,33 @@
# 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.
+
+# Helper script to compare jars reported by maven-artifact-plugin
+
+set -e -u -o pipefail
+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "$DIR/../../.." || exit 1
-: ${OZONE_WITH_COVERAGE:="false"}
+BASE_DIR="$(pwd -P)"
+: ${OUTPUT_LOG:="${BASE_DIR}/target/repro/output.log"}
+
+for jar in $(grep -o "investigate with diffoscope [^ ]*\.jar [^ ]*\.jar"
"${OUTPUT_LOG}" | awk '{ print $NF }'); do
+ jarname=$(basename "$jar")
+ if [[ ! -e "$jar" ]]; then
+ echo "$jar does not exist"
+ continue
+ fi
-MAVEN_OPTIONS='-V -B -DskipTests -DskipDocs --no-transfer-progress'
+ ref=$(find target/reference -name "$jarname")
+ if [[ -z "$ref" ]]; then
+ ref=$(find ~/.m2/repository -name "$jarname")
+ fi
-if [[ "${OZONE_WITH_COVERAGE}" == "true" ]]; then
- MAVEN_OPTIONS="${MAVEN_OPTIONS} -Pcoverage"
-else
- MAVEN_OPTIONS="${MAVEN_OPTIONS} -Djacoco.skip"
-fi
+ if [[ ! -e "$ref" ]]; then
+ echo "Reference not found for: $jarname"
+ continue
+ fi
-export MAVEN_OPTS="-Xmx4096m ${MAVEN_OPTS:-}"
-echo "${MAVEN_OPTIONS}"
-mvn ${MAVEN_OPTIONS} clean install "$@"
-exit $?
+ diffoscope "$ref" "$jar"
+done
diff --git a/hadoop-ozone/dev-support/checks/build.sh
b/hadoop-ozone/dev-support/checks/build.sh
index 5ff1bdc9a0..7e9a9d5cbf 100755
--- a/hadoop-ozone/dev-support/checks/build.sh
+++ b/hadoop-ozone/dev-support/checks/build.sh
@@ -13,20 +13,6 @@
# 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.
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-cd "$DIR/../../.." || exit 1
-
-: ${OZONE_WITH_COVERAGE:="false"}
-
-MAVEN_OPTIONS='-V -B -DskipTests -DskipDocs --no-transfer-progress'
-if [[ "${OZONE_WITH_COVERAGE}" == "true" ]]; then
- MAVEN_OPTIONS="${MAVEN_OPTIONS} -Pcoverage"
-else
- MAVEN_OPTIONS="${MAVEN_OPTIONS} -Djacoco.skip"
-fi
-
-export MAVEN_OPTS="-Xmx4096m ${MAVEN_OPTS:-}"
-echo "${MAVEN_OPTIONS}"
-mvn ${MAVEN_OPTIONS} clean install "$@"
-exit $?
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+source "${DIR}"/_build.sh install "$@"
diff --git a/hadoop-ozone/dev-support/checks/build.sh
b/hadoop-ozone/dev-support/checks/repro.sh
similarity index 64%
copy from hadoop-ozone/dev-support/checks/build.sh
copy to hadoop-ozone/dev-support/checks/repro.sh
index 5ff1bdc9a0..1b74ec1133 100755
--- a/hadoop-ozone/dev-support/checks/build.sh
+++ b/hadoop-ozone/dev-support/checks/repro.sh
@@ -13,20 +13,28 @@
# 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.
+
+# This check verifies build reproducibility.
+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "$DIR/../../.." || exit 1
-: ${OZONE_WITH_COVERAGE:="false"}
+BASE_DIR="$(pwd -P)"
+REPORT_DIR=${OUTPUT_DIR:-"${BASE_DIR}/target/repro"}
+
+rc=0
+source "${DIR}"/_build.sh verify artifact:compare "$@" | tee output.log
+
+mkdir -p "$REPORT_DIR"
+mv output.log "$REPORT_DIR"/
+
+REPORT_FILE="$REPORT_DIR/summary.txt"
+grep 'ERROR.*mismatch' "${REPORT_DIR}/output.log" > "${REPORT_FILE}"
-MAVEN_OPTIONS='-V -B -DskipTests -DskipDocs --no-transfer-progress'
+wc -l "${REPORT_FILE}" | awk '{ print $1 }' > "${REPORT_DIR}/failures"
-if [[ "${OZONE_WITH_COVERAGE}" == "true" ]]; then
- MAVEN_OPTIONS="${MAVEN_OPTIONS} -Pcoverage"
-else
- MAVEN_OPTIONS="${MAVEN_OPTIONS} -Djacoco.skip"
+if [[ -s "${REPORT_FILE}" ]]; then
+ exit 1
fi
-export MAVEN_OPTS="-Xmx4096m ${MAVEN_OPTS:-}"
-echo "${MAVEN_OPTIONS}"
-mvn ${MAVEN_OPTIONS} clean install "$@"
-exit $?
+exit $rc # result of mvn
diff --git a/hadoop-ozone/httpfsgateway/src/main/resources/httpfs.properties
b/hadoop-ozone/httpfsgateway/src/main/resources/httpfs.properties
index 164896e1f0..16d13de384 100644
--- a/hadoop-ozone/httpfsgateway/src/main/resources/httpfs.properties
+++ b/hadoop-ozone/httpfsgateway/src/main/resources/httpfs.properties
@@ -16,6 +16,3 @@ httpfs.version=${project.version}
httpfs.source.repository=${httpfs.source.repository}
httpfs.source.revision=${httpfs.source.revision}
-
-httpfs.build.username=${user.name}
-httpfs.build.timestamp=${httpfs.build.timestamp}
diff --git
a/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/NodeEndpoint.java
b/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/NodeEndpoint.java
index 7f0efe97dd..717a9d74f7 100644
---
a/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/NodeEndpoint.java
+++
b/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/NodeEndpoint.java
@@ -171,7 +171,6 @@ public class NodeEndpoint {
.withVersion(nodeManager.getVersion(datanode))
.withSetupTime(nodeManager.getSetupTime(datanode))
.withRevision(nodeManager.getRevision(datanode))
- .withBuildDate(nodeManager.getBuildDate(datanode))
.withLayoutVersion(
dnInfo.getLastKnownLayoutVersion().getMetadataLayoutVersion())
.withNetworkLocation(datanode.getNetworkLocation())
diff --git
a/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/types/DatanodeMetadata.java
b/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/types/DatanodeMetadata.java
index 06c20a963a..ec7ab6cf8e 100644
---
a/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/types/DatanodeMetadata.java
+++
b/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/types/DatanodeMetadata.java
@@ -84,10 +84,6 @@ public final class DatanodeMetadata {
@JsonInclude(JsonInclude.Include.NON_NULL)
private String revision;
- @XmlElement(name = "buildDate")
- @JsonInclude(JsonInclude.Include.NON_NULL)
- private String buildDate;
-
@XmlElement(name = "layoutVersion")
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
private int layoutVersion;
@@ -110,7 +106,6 @@ public final class DatanodeMetadata {
this.version = builder.version;
this.setupTime = builder.setupTime;
this.revision = builder.revision;
- this.buildDate = builder.buildDate;
this.layoutVersion = builder.layoutVersion;
this.networkLocation = builder.networkLocation;
}
@@ -167,10 +162,6 @@ public final class DatanodeMetadata {
return revision;
}
- public String getBuildDate() {
- return buildDate;
- }
-
public int getLayoutVersion() {
return layoutVersion;
}
@@ -206,7 +197,6 @@ public final class DatanodeMetadata {
private String version;
private long setupTime;
private String revision;
- private String buildDate;
private int layoutVersion;
private String networkLocation;
@@ -282,11 +272,6 @@ public final class DatanodeMetadata {
return this;
}
- public Builder withBuildDate(String buildDate) {
- this.buildDate = buildDate;
- return this;
- }
-
public Builder withLayoutVersion(int layoutVersion) {
this.layoutVersion = layoutVersion;
return this;
diff --git
a/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/scm/ReconNodeManager.java
b/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/scm/ReconNodeManager.java
index 65a9530c5c..2ebeafcccb 100644
---
a/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/scm/ReconNodeManager.java
+++
b/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/scm/ReconNodeManager.java
@@ -205,17 +205,6 @@ public class ReconNodeManager extends SCMNodeManager {
EMPTY_DATANODE_DETAILS).getRevision();
}
- /**
- * Returns the build date of the given node.
- *
- * @param datanodeDetails DatanodeDetails
- * @return buildDate
- */
- public String getBuildDate(DatanodeDetails datanodeDetails) {
- return inMemDatanodeDetails.getOrDefault(datanodeDetails.getUuid(),
- EMPTY_DATANODE_DETAILS).getBuildDate();
- }
-
@Override
public void onMessage(CommandForDatanode commandForDatanode,
EventPublisher ignored) {
diff --git
a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/datanodes/datanodes.tsx
b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/datanodes/datanodes.tsx
index d7fdf2b9eb..4a3c11c11b 100644
---
a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/datanodes/datanodes.tsx
+++
b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/datanodes/datanodes.tsx
@@ -66,7 +66,6 @@ interface IDatanodeResponse {
version: string;
setupTime: number;
revision: string;
- buildDate: string;
networkLocation: string;
}
@@ -92,7 +91,6 @@ interface IDatanode {
version: string;
setupTime: number;
revision: string;
- buildDate: string;
networkLocation: string;
}
@@ -331,15 +329,6 @@ const COLUMNS = [
sorter: (a: IDatanode, b: IDatanode) =>
a.revision.localeCompare(b.revision),
defaultSortOrder: 'ascend' as const
},
- {
- title: 'Build Date',
- dataIndex: 'buildDate',
- key: 'buildDate',
- isVisible: true,
- isSearchable: true,
- sorter: (a: IDatanode, b: IDatanode) =>
a.buildDate.localeCompare(b.buildDate),
- defaultSortOrder: 'ascend' as const
- },
{
title: 'Network Location',
dataIndex: 'networkLocation',
@@ -446,7 +435,6 @@ export class Datanodes extends
React.Component<Record<string, object>, IDatanode
version: datanode.version,
setupTime: datanode.setupTime,
revision: datanode.revision,
- buildDate: datanode.buildDate,
networkLocation: datanode.networkLocation
};
});
diff --git
a/hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestEndpoints.java
b/hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestEndpoints.java
index c3d2fd484a..f1dafa2c75 100644
---
a/hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestEndpoints.java
+++
b/hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestEndpoints.java
@@ -378,7 +378,6 @@ public class TestEndpoints extends AbstractReconSqlDBTest {
.setDatanodeDetails(datanodeDetailsProto)
.setVersion("0.6.0")
.setSetupTime(1596347628802L)
- .setBuildDate("2020-08-01T08:50Z")
.setRevision("3346f493fa1690358add7bb9f3e5b52545993f36")
.build();
StorageReportProto storageReportProto1 =
@@ -409,7 +408,6 @@ public class TestEndpoints extends AbstractReconSqlDBTest {
.setDatanodeDetails(datanodeDetailsProto2)
.setVersion("0.6.0")
.setSetupTime(1596347636802L)
- .setBuildDate("2020-08-01T08:50Z")
.setRevision("3346f493fa1690358add7bb9f3e5b52545993f36")
.build();
StorageReportProto storageReportProto3 =
@@ -441,7 +439,6 @@ public class TestEndpoints extends AbstractReconSqlDBTest {
.setDatanodeDetails(datanodeDetailsProto3)
.setVersion("0.6.0")
.setSetupTime(1596347628802L)
- .setBuildDate("2020-08-01T08:50Z")
.setRevision("3346f493fa1690358add7bb9f3e5b52545993f36")
.build();
StorageReportProto storageReportProto5 =
diff --git
a/hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestOpenContainerCount.java
b/hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestOpenContainerCount.java
index f64d93707a..e320c19069 100644
---
a/hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestOpenContainerCount.java
+++
b/hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestOpenContainerCount.java
@@ -300,7 +300,6 @@ public class TestOpenContainerCount {
.setDatanodeDetails(datanodeDetailsProto)
.setVersion("0.6.0")
.setSetupTime(1596347628802L)
- .setBuildDate("2020-08-01T08:50Z")
.setRevision("3346f493fa1690358add7bb9f3e5b52545993f36")
.build();
diff --git
a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/DatanodeSimulator.java
b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/DatanodeSimulator.java
index 2b178ac0ae..2b4faeac92 100644
---
a/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/DatanodeSimulator.java
+++
b/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/DatanodeSimulator.java
@@ -469,7 +469,6 @@ public class DatanodeSimulator implements Callable<Void> {
details.setVersion(HDDS_VERSION_INFO.getVersion());
details.setSetupTime(Time.now());
details.setRevision(HDDS_VERSION_INFO.getRevision());
- details.setBuildDate(HDDS_VERSION_INFO.getDate());
details.setCurrentVersion(DatanodeVersion.CURRENT_VERSION);
return details;
}
diff --git a/pom.xml b/pom.xml
index f1349f3176..7ee0f41082 100644
--- a/pom.xml
+++ b/pom.xml
@@ -63,6 +63,9 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xs
</organization>
<properties>
+ <!-- Enable Reproducible Builds mode -->
+
<project.build.outputTimestamp>2023-01-01T00:00:00Z</project.build.outputTimestamp>
+
<hadoop2.version>2.10.2</hadoop2.version>
<hadoop.version>3.3.6</hadoop.version>
@@ -1428,6 +1431,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xs
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<doclint>none</doclint>
+ <notimestamp>true</notimestamp>
</configuration>
</plugin>
<plugin>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]