Skip to content

Commit 20f5908

Browse files
Merge branch 'master' into clean-up-build-cmd
2 parents 2eed843 + e8d1e47 commit 20f5908

28 files changed

+398
-112
lines changed

.github/workflows/db_sync_docker_sync_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ jobs:
117117
118118
119119
- name: Upload Logs
120-
uses: actions/upload-artifact@v4
120+
uses: actions/upload-artifact@v5
121121
with:
122122
name: ${{ matrix.env }}-db-sync-logs
123123
path: |

.github/workflows/node_sync_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
echo "current branch3: $(git branch --show-current)"
9595
python sync_tests/node_write_sync_values_to_db.py -e ${{ matrix.env }}
9696
- name: generate artifacts
97-
uses: actions/upload-artifact@v4
97+
uses: actions/upload-artifact@v5
9898
if: always()
9999
with:
100100
name: node_logs_${{ matrix.env }}_${{ matrix.os }}

.github/workflows/regression_reusable.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,27 +126,27 @@ jobs:
126126
curl -s -X PUT --fail-with-body -u ${{ secrets.TCACHE_BASIC_AUTH }} "${{ secrets.TCACHE_URL }}/${testrun_name_strip}/${{ github.run_number }}/import" -F "junitxml=@testrun-report.xml"
127127
fi
128128
- name: ↟ Upload testing artifacts on failure
129-
uses: actions/upload-artifact@v4
129+
uses: actions/upload-artifact@v5
130130
if: failure()
131131
with:
132132
name: testing-artifacts
133133
path: testing_artifacts.tar.xz
134134
- name: ↟ Upload Allure results
135-
uses: actions/upload-artifact@v4
135+
uses: actions/upload-artifact@v5
136136
# When using `always()`, you lose ability to manually cancel the workflow.
137137
# Use `success() || failure()` instead.
138138
if: success() || failure()
139139
with:
140140
name: allure-results
141141
path: allure-results.tar.xz
142142
- name: ↟ Upload HTML report
143-
uses: actions/upload-artifact@v4
143+
uses: actions/upload-artifact@v5
144144
if: success() || failure()
145145
with:
146146
name: testrun-report
147147
path: testrun-report.html
148148
- name: ↟ Upload testrun files
149-
uses: actions/upload-artifact@v4
149+
uses: actions/upload-artifact@v5
150150
if: success() || failure()
151151
with:
152152
name: testrun-files
@@ -157,7 +157,7 @@ jobs:
157157
deselected_tests.txt
158158
requirements_coverage.json
159159
- name: ↟ Upload CLI coverage
160-
uses: actions/upload-artifact@v4
160+
uses: actions/upload-artifact@v5
161161
if: success() || failure()
162162
with:
163163
name: cli-coverage

.github/workflows/smash_tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,15 @@ jobs:
120120

121121

122122
- name: Publish cardano-db-sync and SMASH logs
123-
uses: actions/upload-artifact@v4
123+
uses: actions/upload-artifact@v5
124124
if: always()
125125
with:
126126
name: db_sync_and smash_logs_${{ env.ENVM }}
127127
path: ${{ github.workspace }}/cardano-db-sync/logs/*
128128

129129

130130
- name: Publish test reports
131-
uses: actions/upload-artifact@v4
131+
uses: actions/upload-artifact@v5
132132
if: always()
133133
with:
134134
name: pytest_results_${{ env.ENVM }}

.github/workflows/upgrade_reusable.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,33 +51,33 @@ jobs:
5151
./.github/node_upgrade.sh
5252
echo "::endgroup::"
5353
- name: ↟ Upload testing artifacts on failure
54-
uses: actions/upload-artifact@v4
54+
uses: actions/upload-artifact@v5
5555
if: failure()
5656
with:
5757
name: testing-artifacts
5858
path: testing_artifacts.tar.xz
5959
- name: ↟ Upload Allure results for step1
60-
uses: actions/upload-artifact@v4
60+
uses: actions/upload-artifact@v5
6161
# When using `always()`, you lose ability to manually cancel the workflow.
6262
# Use `success() || failure()` instead.
6363
if: success() || failure()
6464
with:
6565
name: allure-results-step1
6666
path: allure-results-step1.tar.xz
6767
- name: ↟ Upload Allure results for step2
68-
uses: actions/upload-artifact@v4
68+
uses: actions/upload-artifact@v5
6969
if: success() || failure()
7070
with:
7171
name: allure-results-step2
7272
path: allure-results-step2.tar.xz
7373
- name: ↟ Upload Allure results for step3
74-
uses: actions/upload-artifact@v4
74+
uses: actions/upload-artifact@v5
7575
if: success() || failure()
7676
with:
7777
name: allure-results-step3
7878
path: allure-results-step3.tar.xz
7979
- name: ↟ Upload HTML reports
80-
uses: actions/upload-artifact@v4
80+
uses: actions/upload-artifact@v5
8181
if: success() || failure()
8282
with:
8383
name: testrun-reports
@@ -86,15 +86,15 @@ jobs:
8686
testrun-report-step2.html
8787
testrun-report-step3.html
8888
- name: ↟ Upload testrun files
89-
uses: actions/upload-artifact@v4
89+
uses: actions/upload-artifact@v5
9090
if: success() || failure()
9191
with:
9292
name: testrun-files
9393
path: |
9494
scheduling.log.xz
9595
errors_all.log
9696
- name: ↟ Upload CLI coverage
97-
uses: actions/upload-artifact@v4
97+
uses: actions/upload-artifact@v5
9898
if: success() || failure()
9999
with:
100100
name: cli-coverage

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ __pycache__/
2626

2727
# Env variables
2828
/.source*
29+
!/.source.dev
2930

3031
# Distribution / packaging
3132
.Python

.source.dev

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#!/bin/bash
2+
3+
# An environment setup script for cardano-node-tests local development.
4+
#
5+
# Create a `.source` script in the root of the repository.
6+
# Source this file from the .source script. You can also include additional environment
7+
# variables such as DBSYNC_SCHEMA_DIR and GITHUB_TOKEN in that file, or change INSTANCE_NUM.
8+
#
9+
# export DBSYNC_SCHEMA_DIR="$HOME/Source/repos/cardano-db-sync/schema"
10+
# export GITHUB_TOKEN=ghp_....
11+
INSTANCE_NUM="${INSTANCE_NUM:-0}"
12+
13+
# Ensure we are in the correct directory
14+
if [[ "${PWD##*/}" != "cardano-node-tests"* ]]; then
15+
echo "Must be in cardano-node-tests* directory" >&2
16+
return 1
17+
fi
18+
19+
# Activate poetry virtual environment
20+
if [ -z "${VIRTUAL_ENV:-}" ]; then
21+
# shellcheck disable=SC2091
22+
$(poetry env activate)
23+
# Override PYTHONPATH to prefer virtual environment packages over nix packages
24+
PYTHONPATH="$(echo "$VIRTUAL_ENV"/lib/python3*/site-packages):$PYTHONPATH"
25+
export PYTHONPATH
26+
fi
27+
28+
# Set Cardano Node socket path and other environment variables
29+
export CARDANO_NODE_SOCKET_PATH="/var/tmp/cardonnay/state-cluster${INSTANCE_NUM}/bft1.socket"
30+
export DEV_CLUSTER_RUNNING=1 CLUSTERS_COUNT=1 FORBID_RESTART=1 NO_ARTIFACTS=1
31+
unset BOOTSTRAP_DIR
32+
33+
mkdir -p "${CARDANO_NODE_SOCKET_PATH%/*}"
34+
35+
# Set temporary directory for this instance
36+
TMPDIR="$PWD/tmp"
37+
if [ "$INSTANCE_NUM" != 0 ]; then
38+
TMPDIR="$PWD/tmp${INSTANCE_NUM}"
39+
fi
40+
mkdir -p "$TMPDIR"
41+
export TMPDIR
42+
43+
# Remove ghcup from PATH to avoid conflicts with nix environment
44+
PATH="$(echo "$PATH" | tr ":" "\n" | grep -v "ghcup" | tr "\n" ":")"
45+
export PATH
46+
47+
# Prepend instance-specific .bin directory to PATH if it exists
48+
if [ -e "$PWD/.bin${INSTANCE_NUM}" ]; then
49+
export PATH="$PWD/.bin${INSTANCE_NUM}:$PATH"
50+
fi
51+
52+
# Prepend default .bin directory to PATH for instance 0 if it exists
53+
if [ "$INSTANCE_NUM" = 0 ] && [ -e "$PWD/.bin" ]; then
54+
export PATH="$PWD/.bin:$PATH"
55+
fi
56+
57+
# Set database connection environment variables for db-sync
58+
export PGHOST=localhost PGUSER=postgres
59+
60+
# Enable SMASH server if available
61+
if [ -n "${DBSYNC_SCHEMA_DIR:-}" ] && command -v cardano-smash-server >/dev/null 2>&1; then
62+
export SMASH=true
63+
fi
64+
65+
# Enable cardano-cli bash completion
66+
if ! command -v _cardano-cli >/dev/null 2>&1 && command -v cardano-cli >/dev/null 2>&1; then
67+
# shellcheck disable=SC1090
68+
. <(cardano-cli --bash-completion-script cardano-cli)
69+
fi
70+
71+
unset INSTANCE_NUM

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@ build_doc:
3535
doc:
3636
./scripts/deploy_doc.sh
3737

38+
39+
# reinstall cardano-clusterlib-py in editable mode from a given git repository
40+
.PHONY: reinstall-editable
41+
reinstall-editable:
42+
@if [ -z "$(repo)" ]; then \
43+
echo "Usage: make reinstall-editable repo=/path/to/cardano-clusterlib-py" >&2; \
44+
exit 1; \
45+
fi
46+
@./scripts/clusterlib_reinstall_editable.sh "$(repo)"
47+
48+
3849
# run tests
3950

4051
TESTS_DIR ?= cardano_node_tests/

README.md

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -174,18 +174,20 @@ NODE_REV=10.5.1 BOOTSTRAP_DIR=~/tmp/preview_config/ ./.github/regression.sh
174174
make install
175175
```
176176

177-
### 🧱 Start Development Cluster
177+
### 🔧 Activate Dev Environment
178178

179179
```sh
180180
cd ../cardano-node
181181
git checkout <tag>
182182
nix develop .#devops
183183
/bin/bash --login # fresh shell needed
184184
cd ../cardano-node-tests
185-
source "$(poetry env info --path)"/bin/activate
186-
export PYTHONPATH="$(echo $VIRTUAL_ENV/lib/python3*/site-packages):$PYTHONPATH"
187-
export CARDANO_NODE_SOCKET_PATH="$PWD/dev_workdir/state-cluster0/bft1.socket" DEV_CLUSTER_RUNNING=1
188-
mkdir -p "${CARDANO_NODE_SOCKET_PATH%/*}"
185+
source .source.dev
186+
```
187+
188+
### 🧱 Start Development Cluster
189+
190+
```sh
189191
prepare-cluster-scripts -c -d dev_workdir/conway_fast -t conway_fast
190192
./dev_workdir/conway_fast/start-cluster
191193
```
@@ -198,6 +200,12 @@ prepare-cluster-scripts -c -d dev_workdir/conway_fast -t conway_fast
198200
make check_dev_env
199201
```
200202

203+
### 🧰 Reinstall `cardano-clusterlib` in Editable Mode
204+
205+
```sh
206+
make reinstall-editable repo=../cardano-clusterlib-py
207+
```
208+
201209
### 🧪 Run Individual Tests
202210

203211
```sh
@@ -212,18 +220,6 @@ source "$(poetry env info --path)"/bin/activate
212220
make lint
213221
```
214222

215-
### 🧰 Use `cardano-clusterlib` in Dev Mode
216-
217-
```sh
218-
source "$(poetry env info --path)"/bin/activate
219-
make install
220-
pip uninstall cardano-clusterlib
221-
cd ../cardano-clusterlib-py
222-
pip install -e . --config-settings editable_mode=compat
223-
cd -
224-
python -c 'from cardano_clusterlib import clusterlib_klass; print(clusterlib_klass.__file__)'
225-
```
226-
227223
> ⚠️ After each dependencies update, repeat the steps above to retain dev mode.
228224
229225
### 📦 Update Poetry Dependencies

cardano_node_tests/tests/issues.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,12 @@
191191
fixed_in="10.1.3.0", # Unknown yet, will be fixed/changed sometime in the future
192192
message="Delegation to DRep2 removed after retirement of DRep1.",
193193
)
194+
ledger_5365 = blockers.GH(
195+
issue=5365,
196+
repo="IntersectMBO/cardano-ledger",
197+
fixed_in="10.6.0.0",
198+
message="queryPoolState returns current pool params instead of the future ones.",
199+
)
194200

195201
node_3788 = blockers.GH(
196202
issue=3788,

0 commit comments

Comments
 (0)