Skip to content

Commit 2416263

Browse files
Copilotvobu
andcommitted
fix: address code review feedback for notebook and workflow
Co-authored-by: vobu <6573426+vobu@users.noreply.github.com>
1 parent 24bf054 commit 2416263

File tree

3 files changed

+21
-8
lines changed

3 files changed

+21
-8
lines changed

.github/workflows/e2e-notebook.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Start Camunda 8.8 with Docker Compose
3434
run: |
3535
cd assets/c8/8.8
36-
DATABASE=elasticsearch docker compose --profile elasticsearch up -d
36+
docker compose --profile elasticsearch up -d
3737
env:
3838
DATABASE: elasticsearch
3939

@@ -205,14 +205,14 @@ jobs:
205205
if: always()
206206
run: |
207207
cd assets/c8/8.8
208-
DATABASE=elasticsearch docker compose --profile elasticsearch down -v
208+
docker compose --profile elasticsearch down -v
209209
env:
210210
DATABASE: elasticsearch
211211

212212
- name: Show Camunda logs on failure
213213
if: failure()
214214
run: |
215215
cd assets/c8/8.8
216-
DATABASE=elasticsearch docker compose --profile elasticsearch logs
216+
docker compose --profile elasticsearch logs
217217
env:
218218
DATABASE: elasticsearch

examples/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,12 @@ cd assets/c8/8.8
161161
docker compose --profile elasticsearch up -d
162162
cd ../..
163163

164-
# Run the test script
164+
# Run the test script (make it executable first if needed)
165+
chmod +x examples/test-notebook-operations.sh
165166
./examples/test-notebook-operations.sh
167+
168+
# Or run directly with bash
169+
bash examples/test-notebook-operations.sh
166170
```
167171

168172
This script validates all the operations demonstrated in the notebook.

examples/e2e-operations.ipynb

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,17 @@
6767
"const fs = require('fs');\n",
6868
"const path = require('path');\n",
6969
"\n",
70+
"// Determine repository root\n",
71+
"// Note: In Jupyter kernels, __dirname may point to a temp directory.\n",
72+
"// If paths don't work, adjust repoRoot to point to your c8ctl directory.\n",
73+
"const repoRoot = typeof __dirname !== 'undefined' && fs.existsSync(path.join(__dirname, '..', 'package.json'))\n",
74+
" ? path.join(__dirname, '..')\n",
75+
" : process.cwd();\n",
76+
"\n",
77+
"console.log('Repository root:', repoRoot);\n",
78+
"\n",
7079
"// Determine which c8ctl command to use\n",
7180
"const majorVersion = parseInt(process.version.slice(1).split('.')[0]);\n",
72-
"const repoRoot = path.join(__dirname, '..');\n",
7381
"const distExists = fs.existsSync(path.join(repoRoot, 'dist', 'index.js'));\n",
7482
"\n",
7583
"let c8ctlCmd;\n",
@@ -94,6 +102,7 @@
94102
" const result = execSync(cmd, { \n",
95103
" encoding: 'utf8',\n",
96104
" stdio: options.silent ? 'pipe' : 'inherit',\n",
105+
" cwd: repoRoot,\n",
97106
" ...options \n",
98107
" });\n",
99108
" return result;\n",
@@ -116,8 +125,8 @@
116125
"console.log('Node.js version:', process.version);\n",
117126
"console.log('Platform:', process.platform);\n",
118127
"\n",
119-
"// Verify we have v22 LTS\n",
120-
"const majorVersion = parseInt(process.version.slice(1).split('.')[0]);\n",
128+
"// Verify we have v22 LTS (reusing majorVersion from setup cell)\n",
129+
"// Note: majorVersion was defined in the first cell\n",
121130
"if (majorVersion < 22) {\n",
122131
" console.warn('⚠️ Warning: Node.js v22 or higher is recommended');\n",
123132
"} else {\n",
@@ -745,7 +754,7 @@
745754
"file_extension": ".js",
746755
"mimetype": "application/javascript",
747756
"name": "javascript",
748-
"version": "22.0.0"
757+
"version": "22"
749758
}
750759
},
751760
"nbformat": 4,

0 commit comments

Comments
 (0)