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

chore: Cherry pick fixes for update of default branch to main #17200

Merged
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/flow-artifact-determinism.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##
# Copyright (C) 2023-2024 Hedera Hashgraph, LLC
# Copyright (C) 2023-2025 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -35,7 +35,7 @@ on:
default: "21.0.4"
push:
branches:
- develop
- main
- 'release/**'
tags:
- 'v*.*.*'
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/node-flow-build-application.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##
# Copyright (C) 2022-2024 Hedera Hashgraph, LLC
# Copyright (C) 2022-2025 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down 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
43 changes: 36 additions & 7 deletions .github/workflows/node-flow-deploy-release-artifact.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##
# Copyright (C) 2022-2024 Hedera Hashgraph, LLC
# Copyright (C) 2022-2025 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down 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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##
# Copyright (C) 2022-2024 Hedera Hashgraph, LLC
# Copyright (C) 2022-2025 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -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
4 changes: 2 additions & 2 deletions .github/workflows/node-zxf-snyk-monitor.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##
# Copyright (C) 2023-2024 Hedera Hashgraph, LLC
# Copyright (C) 2023-2025 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -19,7 +19,7 @@ name: "ZXF: Snyk Monitor"
on:
push:
branches:
- develop
- main
workflow_dispatch:

permissions:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##
# Copyright (C) 2022-2024 Hedera Hashgraph, LLC
# Copyright (C) 2022-2025 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -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
6 changes: 3 additions & 3 deletions .github/workflows/zxc-jrs-regression.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##
# Copyright (C) 2022-2024 Hedera Hashgraph, LLC
# Copyright (C) 2022-2025 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
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
14 changes: 7 additions & 7 deletions .github/workflows/zxcron-extended-test-suite.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##
# Copyright (C) 2023-2024 Hedera Hashgraph, LLC
# Copyright (C) 2023-2025 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down 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="${?}"
rbarkerSL marked this conversation as resolved.
Show resolved Hide resolved
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
8 changes: 4 additions & 4 deletions .github/workflows/zxcron-promote-build-candidate.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##
# Copyright (C) 2023-2024 Hedera Hashgraph, LLC
# Copyright (C) 2023-2025 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down 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
4 changes: 2 additions & 2 deletions .github/workflows/zxf-collect-workflow-logs.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##
# Copyright (C) 2023-2024 Hedera Hashgraph, LLC
# Copyright (C) 2023-2025 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down 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
8 changes: 4 additions & 4 deletions .github/workflows/zxf-prepare-extended-test-suite.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##
# Copyright (C) 2023-2024 Hedera Hashgraph, LLC
# Copyright (C) 2023-2025 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down 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
9 changes: 5 additions & 4 deletions docs/branch-naming-conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,19 @@ naming standard.

### Permanent & Default Branches

The repository will contain two permanent branches as per the GitFlow Workflow `main` and `develop`
branches.
The repository will contain one permanent branch, `main`, per the Hashgraph Continuous Integration
Test and Release workflow
rbarkerSL marked this conversation as resolved.
Show resolved Hide resolved

**Default Branches**
rbarkerSL marked this conversation as resolved.
Show resolved Hide resolved

The default branch for a repository will be `develop` as per the branching workflow.
The default branch for a repository will be `main` as per the Hashgraph Continuous Integration
Test and Release workflow.

### Branch to Issue Relationship

Aside from the permanent or release branches, no short-lived (feature, hotfix, bugfix) branch should
be created without being associated to an issue number. No short-lived branch should be merged into
`develop` or `main` without an associated and approved pull request.
`main` without an associated and approved pull request.

### Feature Branch Naming

Expand Down
8 changes: 4 additions & 4 deletions docs/continuous-integration-testing-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ two major components of CITR: MATS and XTS.
MATS is the Minimal Acceptable Test Suite; this suite of tests is run against every pull request (PR) that is opened in
the `hashgraph/hedera-services` repository.

XTS is the eXtended Test Suite; this suite of tests is run against the latest commit on the develop branch every three
XTS is the eXtended Test Suite; this suite of tests is run against the latest commit on the main branch every three
hours (provided there is a new commit to run against).

MATS tests are inclusive of a series of unit tests and performance tests that must be executed against a PR branch prior
to merging into develop. The MATS tests are intended to complete within a 30-minute time window to provide developers
to merging into main. The MATS tests are intended to complete within a 30-minute time window to provide developers
with valuable insight of the impact of new code on the default branch.

XTS tests are run against the default branch once every three hours. These cover test cases that are unable to complete
Expand All @@ -38,14 +38,14 @@ There is an additional workflow: `ZXF: Extended Test Suite - Dry Run` which is a
`hashgraph/hedera-services` repository.

The XTS Dry-Run workflow runs a provided commit on any branch through the same XTS tests that would be run against the
latest on develop every three hours. This workflow is run with a manual trigger and will execute in parallel to any
latest on main every three hours. This workflow is run with a manual trigger and will execute in parallel to any
other actions ongoing in the `hashgraph/hedera-services` repository.

A developer can manually trigger a run using the parameters in the web UI:

```text
Use Workflow From
Branch: develop # this should always be `develop`
Branch: main # this should always be `main`
The commit sha to check out
<your current commit hash>
The branch name, for JRS Panel output
Expand Down
4 changes: 2 additions & 2 deletions docs/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ This file contains the address book to use when starting from genesis.
**Congestion Pricing**: A mechanism designed to manage network congestion by dynamically adjusting
transaction fees based on network demand. The primary goal of congestion pricing is to discourage
excessive network usage during peak times. Refer to
[Congestion Pricing](https://github.com/hashgraph/hedera-services/blob/develop/hedera-node/docs/fees/automated-congestion-pricing.md)
[Congestion Pricing](https://github.com/hashgraph/hedera-services/blob/main/hedera-node/docs/fees/automated-congestion-pricing.md)
and
[Fees](https://github.com/hashgraph/hedera-services/blob/develop/hedera-node/docs/design/app/fees.md).
[Fees](https://github.com/hashgraph/hedera-services/blob/main/hedera-node/docs/design/app/fees.md).

## Consensus Time

Expand Down
Loading
Loading