Skip to content

Commit

Permalink
Merge branch 'main' into 11751-determine-node-ids-to-start-without-ne…
Browse files Browse the repository at this point in the history
…twork

# Conflicts:
#	platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/util/BootstrapUtils.java
  • Loading branch information
edward-swirldslabs committed Dec 22, 2024
2 parents e3d685b + d3dcd58 commit d31f0ee
Show file tree
Hide file tree
Showing 86 changed files with 365 additions and 408 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/flow-artifact-determinism.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ on:
default: "21.0.4"
push:
branches:
- develop
- main
- 'release/**'
tags:
- 'v*.*.*'
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/node-flow-build-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ on:
default: "temurin"
push:
branches:
- develop
- main
- 'release/*'

Expand Down Expand Up @@ -124,7 +123,7 @@ jobs:
with:
workflow: .github/workflows/node-flow-deploy-release-artifact.yaml
repo: hashgraph/hedera-services # ensure we are executing in the hashgraph org
ref: develop # ensure we are always using the workflow definition from the develop branch
ref: main # ensure we are always using the workflow definition from the main branch
token: ${{ secrets.GH_ACCESS_TOKEN }}
inputs: '{
"ref": "${{ steps.workflow-inputs.outputs.input-ref }}",
Expand Down
41 changes: 35 additions & 6 deletions .github/workflows/node-flow-deploy-release-artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ defaults:
run:
shell: bash

permissions:
id-token: write
contents: read
actions: read

jobs:
prepare-tag-release:
name: Prepare Release [Tag]
Expand Down Expand Up @@ -150,28 +155,52 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: '0'
ref: develop
ref: main
token: ${{ secrets.GH_ACCESS_TOKEN }}

- name: Trigger ZXF Prepare Extended Test Suite
- name: Check Prep XTS Job State
id: check-xts-job
if: ${{ needs.release-branch.result == 'success' }}
env:
GH_TOKEN: ${{ github.token }}
run: |
JOB_ENABLED="true"
JOB_STATE=$(gh workflow list --all --json name,state | jq -r '.[]|select(.name=="ZXF: Prepare Extended Test Suite")|.state')
[[ "${JOB_STATE}" == "disabled_manually" ]] && JOB_ENABLED="false"
echo "enabled=${JOB_ENABLED}" >> $GITHUB_OUTPUT
- name: Trigger ZXF Prepare Extended Test Suite
if: ${{ needs.release-branch.result == 'success' && steps.check-xts-job.outputs.enabled == 'true' }}
uses: step-security/workflow-dispatch@4d1049025980f72b1327cbfdeecb07fe7a20f577 # v1.2.4
with:
workflow: .github/workflows/zxf-prepare-extended-test-suite.yaml
repo: hashgraph/hedera-services # ensure we are executing in the hashgraph org
ref: develop # ensure we are always using the workflow definition from the develop branch
ref: main # ensure we are always using the workflow definition from the main branch
token: ${{ secrets.GH_ACCESS_TOKEN }}
inputs: '{ "ref": "${{ inputs.ref }}" }'

- name: Trigger ZXF Deploy Integration
- name: Check Integration Job State
id: check-integration-job
if: ${{ needs.release-branch.result == 'success' &&
(inputs.author != '' && inputs.msg != '' && inputs.sha != '') &&
!cancelled() }}
env:
GH_TOKEN: ${{ github.token }}
run: |
JOB_ENABLED="true"
JOB_STATE=$(gh workflow list --all --json name,state | jq -r '.[]|select(.name=="ZXF: [Node] Deploy Integration Network Release")|.state')
[[ "${JOB_STATE}" == "disabled_manually" ]] && JOB_ENABLED="false"
echo "enabled=${JOB_ENABLED}" >> $GITHUB_OUTPUT
- name: Trigger ZXF Deploy Integration
if: ${{ needs.release-branch.result == 'success' && steps.check-integration-job.outputs.enabled == 'true' &&
(inputs.author != '' && inputs.msg != '' && inputs.sha != '') &&
!cancelled() }}
uses: step-security/workflow-dispatch@4d1049025980f72b1327cbfdeecb07fe7a20f577 # v1.2.4
with:
workflow: .github/workflows/node-zxf-deploy-integration.yaml
repo: hashgraph/hedera-services # ensure we are executing in the hashgraph org
ref: develop # ensure we are always using the workflow definition from the develop branch
ref: main # ensure we are always using the workflow definition from the main branch
token: ${{ secrets.GH_ACCESS_TOKEN }}
inputs: '{
"ref": "${{ inputs.ref }}",
Expand All @@ -195,7 +224,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
token: ${{ secrets.GH_ACCESS_TOKEN }}
ref: develop
ref: main
fetch-depth: '0'

- name: Checkout Hedera Protobufs Code
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/node-zxc-build-release-artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,13 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Java
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
with:
distribution: ${{ inputs.java-distribution }}
java-version: ${{ inputs.java-version }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2
with:
gradle-version: ${{ inputs.gradle-version }}

Expand Down Expand Up @@ -284,13 +284,13 @@ jobs:
if: ${{ inputs.dry-run-enabled != true && !cancelled() && !failure() }}

- name: Setup Java
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
with:
distribution: ${{ inputs.java-distribution }}
java-version: ${{ inputs.java-version }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2
with:
gradle-version: ${{ inputs.gradle-version }}

Expand Down Expand Up @@ -714,13 +714,13 @@ jobs:
if: ${{ inputs.dry-run-enabled != true && !cancelled() && !failure() }}

- name: Setup Java
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
with:
distribution: ${{ inputs.java-distribution }}
java-version: ${{ inputs.java-version }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2
with:
gradle-version: ${{ inputs.gradle-version }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/node-zxc-compile-application-code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,13 @@ jobs:
run: git fetch --unshallow --no-recurse-submodules

- name: Setup Java
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
with:
distribution: ${{ inputs.java-distribution }}
java-version: ${{ inputs.java-version }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2
with:
cache-read-only: false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
##

name: "ZXCron: [Node] Develop JRS Tests"
name: "ZXCron: [Node] Main JRS Tests"
on:
workflow_dispatch:

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/node-zxf-snyk-monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ name: "ZXF: Snyk Monitor"
on:
push:
branches:
- develop
- main
workflow_dispatch:

permissions:
Expand All @@ -40,13 +40,13 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Java
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
with:
distribution: temurin
java-version: 21

- name: Setup Gradle
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2
with:
build-root-directory: hedera-node
gradle-version: wrapper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
##

name: "ZXCron: [Platform] Develop JRS Regression"
name: "ZXCron: [Platform] Main JRS Regression"
on:
schedule:
- cron: '30 5 * * *'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/zxc-jrs-regression.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -336,13 +336,13 @@ jobs:
node-version: 18

- name: Setup Java
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
with:
distribution: ${{ inputs.java-distribution }}
java-version: ${{ inputs.java-version }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2
with:
gradle-version: ${{ inputs.gradle-version }}
gradle-home-cache-strict-match: false
Expand Down Expand Up @@ -486,8 +486,8 @@ jobs:
fi
if [[ -n "${HEDERA_TESTS_ENABLED}" && "${HEDERA_TESTS_ENABLED}" = true ]]; then
# Override for the develop branch
if [[ "${SLACK_BRANCH}" != "develop" ]]; then
# Override for the main branch
if [[ "${SLACK_BRANCH}" != "main" ]]; then
SLACK_SUMMARY="hedera-gcp-${SLACK_BRANCH}-summary"
SLACK_RESULTS="hedera-gcp-${SLACK_BRANCH}-regression"
else
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/zxc-verify-docker-build-determinism.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,14 @@ jobs:
echo "file=${BASELINE_FILE}" >> "${GITHUB_OUTPUT}"
- name: Setup Java
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
if: ${{ steps.baseline.outputs.exists == 'false' && !failure() && !cancelled() }}
with:
distribution: ${{ inputs.java-distribution }}
java-version: ${{ inputs.java-version }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2
if: ${{ steps.baseline.outputs.exists == 'false' && !failure() && !cancelled() }}
with:
cache-disabled: true
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/zxc-verify-gradle-build-determinism.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ jobs:
ref: ${{ inputs.ref }}

- name: Setup Java
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
with:
distribution: ${{ inputs.java-distribution }}
java-version: ${{ inputs.java-version }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2
with:
cache-disabled: true

Expand Down Expand Up @@ -175,13 +175,13 @@ jobs:
python-version: 3.9

- name: Setup Java
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
with:
distribution: ${{ inputs.java-distribution }}
java-version: ${{ inputs.java-version }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2
with:
cache-disabled: true

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/zxcron-extended-test-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: '0'
ref: develop
ref: main
token: ${{ secrets.GH_ACCESS_TOKEN }}

# Check if the xts-candidate tag exists
# the command git branch --contains xts-tag-commit | grep --quiet <default branch>
# will return an exit code of 1 if the tagged commit is not found on the develop
# will return an exit code of 1 if the tagged commit is not found on the main
# branch.
- name: Check for tags
id: check-tags-exist
Expand Down Expand Up @@ -93,17 +93,17 @@ jobs:
gh run cancel ${{ github.run_id }}
fi
# Check if the tag exists on the develop branch
# Check if the tag exists on the main branch
set +e
git branch --contains "${XTS_COMMIT}" | grep --quiet develop >/dev/null 2>&1
git branch --contains "${XTS_COMMIT}" | grep --quiet main >/dev/null 2>&1
BRANCH_ON_DEVELOP="${?}"
set -e
# Get commit author
AUTHOR_NAME=$(git log -1 --format='%an' "${XTS_COMMIT}")
AUTHOR_EMAIL=$(git log -1 --format='%ae' "${XTS_COMMIT}")
# If the tag exists on the Develop Branch set the output variables as appropriate
# If the tag exists on the Main Branch set the output variables as appropriate
# Otherwise cancel out
if [[ "${BRANCH_ON_DEVELOP}" -eq 0 ]]; then
echo "xts-tag-exists=true" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -260,7 +260,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: '0'
ref: develop
ref: main
token: ${{ secrets.GH_ACCESS_TOKEN }}

- name: Collect run logs in a log file
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/zxcron-promote-build-candidate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: '0'
ref: develop
ref: main
token: ${{ secrets.GH_ACCESS_TOKEN }}

- name: Find Build Candidates
Expand All @@ -74,8 +74,8 @@ jobs:
gh run cancel ${{ github.run_id }}
fi
# Verify the commit is on develop and continue
if git branch --contains "${CANDIDATE_COMMIT}" | grep --quiet develop >/dev/null 2>&1; then
# Verify the commit is on main and continue
if git branch --contains "${CANDIDATE_COMMIT}" | grep --quiet main >/dev/null 2>&1; then
git push --delete origin $(git tag --list "${TAG_PATTERN}")
git tag --delete $(git tag --list "${TAG_PATTERN}")
echo "build-candidate-exists=true" >> "${GITHUB_OUTPUT}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zxf-collect-workflow-logs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: '0'
ref: develop
ref: main
token: ${{ secrets.GH_ACCESS_TOKEN }}

- name: Get run logs
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/zxf-prepare-extended-test-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,18 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: '0'
ref: 'develop'
ref: 'main'
token: ${{ secrets.GH_ACCESS_TOKEN }}

- name: Validate Input Ref
id: validate-input
env:
COMMIT_ID: ${{ inputs.ref }}
run: |
if git merge-base --is-ancestor "${COMMIT_ID}" develop >/dev/null 2>&1; then
if git merge-base --is-ancestor "${COMMIT_ID}" main >/dev/null 2>&1; then
echo "commit_on_dev=true" >> $GITHUB_OUTPUT
else
echo "::error title=Branch Alignment::The provided commit (${COMMIT_ID}) is not present on the develop branch."
echo "::error title=Branch Alignment::The provided commit (${COMMIT_ID}) is not present on the main branch."
exit 1
fi
Expand Down
Loading

0 comments on commit d31f0ee

Please sign in to comment.