From a3d55e1923dc37abf5c51bf5da14437a8173020d Mon Sep 17 00:00:00 2001 From: Michele Sciabarra <“msciabarra@apache.org”> Date: Sat, 24 Jan 2026 18:25:54 +0000 Subject: [PATCH 1/5] remove the devcontainer test --- ide/opsfile.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ide/opsfile.yml b/ide/opsfile.yml index 917c378..d4539dc 100644 --- a/ide/opsfile.yml +++ b/ide/opsfile.yml @@ -48,7 +48,7 @@ tasks: You can then use 'ops ide devel' and 'ops ide deploy'. You can also reopen the project with VSCode and use the command 'Reopen in Container'. cmds: - - test -e "/.dockerenv" || die "{{.MSG}}" + #- test -e "/.dockerenv" || die "{{.MSG}}" - test "$(python3 -V | awk -F. '{print $2}')" -ge 10 || die "python 3.10 or greater not available" - test -x "$(which virtualenv)" || die "you need python virtualenv" - test "$(node -v | awk -F. '{print substr($1,2) }')" -ge 18 || die "nodejs 18 or greater not available" From f5b7e5825cf61123775dfe48ce0b8efe4b8d7308 Mon Sep 17 00:00:00 2001 From: Michele Sciabarra Date: Mon, 26 Jan 2026 07:19:58 +0000 Subject: [PATCH 2/5] bestiaenv --- ide/opsfile.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ide/opsfile.yml b/ide/opsfile.yml index d4539dc..c565b6c 100644 --- a/ide/opsfile.yml +++ b/ide/opsfile.yml @@ -48,7 +48,7 @@ tasks: You can then use 'ops ide devel' and 'ops ide deploy'. You can also reopen the project with VSCode and use the command 'Reopen in Container'. cmds: - #- test -e "/.dockerenv" || die "{{.MSG}}" + - test -e "/.dockerenv" || test -e '/.bestiaenv' || die "{{.MSG}}" - test "$(python3 -V | awk -F. '{print $2}')" -ge 10 || die "python 3.10 or greater not available" - test -x "$(which virtualenv)" || die "you need python virtualenv" - test "$(node -v | awk -F. '{print substr($1,2) }')" -ge 18 || die "nodejs 18 or greater not available" From 27bad9ca705793396b91317fbe0b9bdee69de5a8 Mon Sep 17 00:00:00 2001 From: Michele Sciabarra Date: Thu, 19 Feb 2026 16:53:02 +0000 Subject: [PATCH 3/5] removed devcontinaer for python --- ide/python/build-venv.sh | 8 ++------ ide/python/installer.code-workspace | 17 +++++++++++++++++ ide/util/opsfile.yml | 4 ++-- 3 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 ide/python/installer.code-workspace diff --git a/ide/python/build-venv.sh b/ide/python/build-venv.sh index cf94ce5..30a7b72 100644 --- a/ide/python/build-venv.sh +++ b/ide/python/build-venv.sh @@ -20,13 +20,9 @@ DIR="${1:?directory}" ZIP="${2:?zip file}" cd "$DIR" if ! test -d virtualenv - then virtualenv virtualenv +then uv venv virtualenv --python=/usr/bin/python3 fi -source virtualenv/bin/activate -pip install --upgrade pip -pip install -r requirements.txt -virtualenv/bin/python -m pip uninstall -y -q setuptools wheel pip -touch virtualenv/bin/activate +uv pip install --python= virtualenv/bin/python -r requirements.txt if test -f "$ZIP" then rm "$ZIP" fi diff --git a/ide/python/installer.code-workspace b/ide/python/installer.code-workspace new file mode 100644 index 0000000..0a4554e --- /dev/null +++ b/ide/python/installer.code-workspace @@ -0,0 +1,17 @@ +{ + "folders": [ + { + "path": "../../.." + }, + { + "path": "../../../../python-starter" + } + ], + "settings": { + "workbench.colorCustomizations": { + "activityBar.background": "#5A0F2E", + "titleBar.activeBackground": "#7E1541", + "titleBar.activeForeground": "#FEFBFD" + } + } +} \ No newline at end of file diff --git a/ide/util/opsfile.yml b/ide/util/opsfile.yml index 0d30e1b..7ff0c9d 100644 --- a/ide/util/opsfile.yml +++ b/ide/util/opsfile.yml @@ -30,11 +30,11 @@ tasks: then $OPS ide python zip DIR="$($OPS -opspath "packages/{{.A}}")" elif test -e "packages/{{.A}}/package.json" then $OPS ide nodejs zip DIR="$($OPS -opspath "packages/{{.A}}")" - else echo "no zip environment" + else true #echo "no zip environment" fi action: - desc: build an action filling its zip file + desc: build an action filling its zip file silent: true requires: { vars: [A]} cmds: From a3641e0d9177fe3d4ed121a5531e15b6884967c6 Mon Sep 17 00:00:00 2001 From: Michele Sciabarra Date: Fri, 20 Feb 2026 09:37:15 +0000 Subject: [PATCH 4/5] buld env --- ide/python/build-venv.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ide/python/build-venv.sh b/ide/python/build-venv.sh index 30a7b72..2a806a1 100644 --- a/ide/python/build-venv.sh +++ b/ide/python/build-venv.sh @@ -22,7 +22,7 @@ cd "$DIR" if ! test -d virtualenv then uv venv virtualenv --python=/usr/bin/python3 fi -uv pip install --python= virtualenv/bin/python -r requirements.txt +uv pip install --python=virtualenv/bin/python -r requirements.txt if test -f "$ZIP" then rm "$ZIP" fi From 56cf025661d34dc62e63779395faf9160bf20523 Mon Sep 17 00:00:00 2001 From: Michele Sciabarra Date: Fri, 20 Feb 2026 10:55:12 +0000 Subject: [PATCH 5/5] fix node and --pin --- ide/docopts.md | 7 ++++--- ide/nodejs/build-node.sh | 3 +-- ide/opsfile.yml | 13 ++++++++----- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/ide/docopts.md b/ide/docopts.md index 5bc22b2..8b35feb 100644 --- a/ide/docopts.md +++ b/ide/docopts.md @@ -24,12 +24,12 @@ OpenServerless Ide Development Utilities. ```text Usage: - ide login [] [] + ide login [] [] [--pin] ide devel [--fast] [--dry-run] ide deploy [|--packages|--web] [--dry-run] ide undeploy [] [--dry-run] ide clean - ide setup + ide setup ide serve ide poll ide shell @@ -60,8 +60,9 @@ Usage: ## Options ``` ---dry-run Simulates the execution without making any actual changes +--dry-run Simulates the execution without making any actual changes --packages Only deploy packages, skip web upload --web Only deploy web folder, skip packages --fast Skip the initial deployment step and go in incremental update mode +--pin Pin the current auth in the .env to check you are not deploying on the wrong user ``` diff --git a/ide/nodejs/build-node.sh b/ide/nodejs/build-node.sh index 9235046..a8f77d5 100644 --- a/ide/nodejs/build-node.sh +++ b/ide/nodejs/build-node.sh @@ -19,8 +19,7 @@ DIR="${1:?directory}" ZIP="${2:?zip file}" cd "$DIR" -npm install -touch node_modules/.package-lock.json +bun install if test -f "$ZIP" then rm "$ZIP" fi diff --git a/ide/opsfile.yml b/ide/opsfile.yml index c565b6c..75d28e8 100644 --- a/ide/opsfile.yml +++ b/ide/opsfile.yml @@ -48,10 +48,6 @@ tasks: You can then use 'ops ide devel' and 'ops ide deploy'. You can also reopen the project with VSCode and use the command 'Reopen in Container'. cmds: - - test -e "/.dockerenv" || test -e '/.bestiaenv' || die "{{.MSG}}" - - test "$(python3 -V | awk -F. '{print $2}')" -ge 10 || die "python 3.10 or greater not available" - - test -x "$(which virtualenv)" || die "you need python virtualenv" - - test "$(node -v | awk -F. '{print substr($1,2) }')" -ge 18 || die "nodejs 18 or greater not available" - test "$(printf '%s\n' "$(bun -v)" "1.1.18" | sort -V | head -n 1)" = "1.1.18" || die "bun 1.1.18 or greater not available" - test -d "$OPS_PWD/packages" || die "no packages in current directory" - test -e ~/.wskprops || die "please run 'ops ide login' first" @@ -141,7 +137,7 @@ tasks: login: - silent: true + silent: false desc: login in you OpenServerless host cmds: - | @@ -197,6 +193,13 @@ tasks: config OPSDEV_HOST="$OPSDEV_HOST_PROT://$OPSDEV_USERNAME.$OPSDEV_HOST_URL" source ~/.wskprops fi + if {{.__pin}} + then + touch $OPS_PWD/.env + mv $OPS_PWD/.env $OPS_PWD/.env.$$ + cat $OPS_PWD/.env.$$ | rg -v "AUTH_CHECK=" >$OPS_PWD/.env || true + echo "AUTH_CHECK=$AUTH" >>$OPS_PWD/.env + fi