Skip to content

Commit

Permalink
A0-4278: Support for finality version in FE engine (#52)
Browse files Browse the repository at this point in the history
* A0-4278: Support for finality version in FE create

* Testing

* Typo

* Another typo

* Revert "Testing"

This reverts commit 4e33c4e.

* Testing

* Removed trailing whitespaces in bash script

* Changed finality-version type to string

* Revert testing
  • Loading branch information
Marcin-Radecki authored May 21, 2024
1 parent 4d7433e commit 2c210a1
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/_featurenet-create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ on:
type: string
required: false
default: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY'
finality-version:
description: 'Finality version to start FE with. Must be a cardinal number'
type: string
required: false
outputs:
ws-hostname:
description: Hostname of the WS endpoint
Expand Down Expand Up @@ -142,6 +146,7 @@ jobs:
git-commit-email: ${{ secrets.AUTOCOMMIT_EMAIL }}
wait-for-finalized-heads: "true"
sudo-account-id: ${{ inputs.sudo-account-id }}
finality-version: ${{ inputs.finality-version }}

- name: Finish featurenet Deployment
uses: bobheadxi/deployments@v1
Expand Down
13 changes: 10 additions & 3 deletions create-featurenet/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ inputs:
description: 'Sudo account ID'
required: false
default: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY'
finality-version:
description: 'Finality version to start FE with. Must be a cardinal number'
required: false
outputs:
ws-hostname:
description: Hostname of the WS endpoint
Expand Down Expand Up @@ -124,6 +127,10 @@ runs:
echo "!!! Invalid sudo-account-id"
exit 1
fi
if [[ ! '${{ inputs.finality-version }}' =~ ^[0-9]+$ ]]; then
echo "!!! finality-version must be a cardinal number"
exit 1
fi
- name: Checkout featurenet template repo
uses: actions/checkout@v4
Expand Down Expand Up @@ -152,10 +159,10 @@ runs:
'${{ inputs.rolling-update-partition }}' \
'${{ inputs.expiration }}' \
'${{ inputs.sudo-account-id }}' \
'not-used' \
'${{ inputs.featurenet-chain-bootstrapper-image }}' \
${{ inputs.internal == 'true' && '-i' || '' }} \
-c -g | tee -a tmp-opssh-createfeaturenet-output.txt
'${{ inputs.finality-version }}' \
${{ inputs.internal == 'true' && '-i' || '' }} \
-c -g | tee -a tmp-opssh-createfeaturenet-output.txt
ws_hostname=$(cat tmp-opssh-createfeaturenet-output.txt | grep '^__output:ws-hostname:' | cut -d: -f3)
echo "ws-hostname=${ws_hostname}" >> $GITHUB_OUTPUT
Expand Down
5 changes: 3 additions & 2 deletions get-aleph-node-fqdn-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,9 @@ runs:
if [[ '${{ steps.check-fqdn-prod-node-image-in-dev-repo.outputs.image-exists }}' != '' ]]; then
image_exists='${{ steps.check-fqdn-prod-node-image-in-dev-repo.outputs.image-exists }}'
fi
chain_bootstrapper_fqdn_image='not-required'
chain_bootstrapper_fqdn_image_latest='not-required'
chain_bootstrapper_fqdn_image='does-not-exist-yet'
chain_bootstrapper_fqdn_image_latest='does-not-exist-yet'
# fallback is to not build boostrapper image when it was not part of the aleph-node repo yet
chain_bootstrapper_image_exists='true'
if [[ '${{ steps.check-chain-bootstrapper-crate-existence.outputs.exists }}' == 'true' ]]; then
chain_bootstrapper_image_exists='${{ steps.check-chain-bootstrapper-image-exists.outputs.image-exists }}'
Expand Down
10 changes: 5 additions & 5 deletions update-featurenet/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ runs:
./upsert-featurenet.sh \
'${{ inputs.featurenet-name }}' \
'${{ inputs.featurenet-aleph-node-image }}' \
'not-used-because-update' \
'replicas-not-used-because-update' \
'${{ inputs.rolling-update-partition }}' \
'not-used-because-update' \
'not-used-because-update' \
'not-used-because-update' \
'not-used-because-update' \
'expiration-not-used-because-update' \
'sudo-not-used-because-update' \
'chain-bootstrapper-not-used-because-update' \
'finality-version-not-used-because-update' \
-u \
-c -g | tee -a tmp-opssh-updatefeaturenet-output.txt
Expand Down

0 comments on commit 2c210a1

Please sign in to comment.