Copilot commented on code in PR #216:
URL: https://github.com/apache/openserverless/pull/216#discussion_r3802760652
##########
Taskfile.yml:
##########
@@ -194,9 +207,24 @@ tasks:
fi
+ gitinit:
+ desc: initialize git if missing
+ cmds:
+ - |
+ for i in build cli olaris-op runtimes streamer admin-api
+ do
+ cd "$i"
+ if ! test -e .git
+ then git init 2>/dev/null
+ git commit -m "init" --allow-empty
+ fi
+ cd ..
Review Comment:
`git commit` will fail if `user.name` / `user.email` are not configured
(e.g., on macOS/local dev where `build-and-test-ubuntu.sh` isn’t used). Make
`gitinit` self-contained by configuring identity locally for these repos (or
using `git -c user.*` for the commit). Additionally, using `cd` inside a loop
is brittle: if `cd \"$i\"` fails the task stops in an unexpected directory;
using `pushd/popd` (or checking the directory exists before `cd`) makes this
more reliable.
##########
README.md:
##########
@@ -11,16 +11,23 @@ Welcome to [Apache
OpenServerless](https://openserverless.apache.org), an incub
# Build and test from sources
> [!WARNING]
-> Building from the latest sources in git is **not recommended for production
use**. The `main` branch may contain unstable, untested, or incomplete changes.
For production deployments, use an official release tarball instead. There are
no Apache Software Foundation approved releases yet.
+> Building from the latest sources in git is **not recommended for production
use**. The `main` branch may contain unstable, untested, or incomplete changes.
For production deployments, use an official release tarball instead.
-Download a releases tarball or clone all the latest sources with:
+Download a releases tarball from the Apache distribution, untar and cd to it:
```
-git clone https://github.com/apache/openserverless --recurse-submodules
+tar xzvf openseerverless-<version>.tar.gz
Review Comment:
The tarball name appears misspelled: `openseerverless` should likely be
`openserverless`.
##########
Taskfile.yml:
##########
@@ -225,9 +255,24 @@ tasks:
license-eye header {{.CMD}}
for i in */.licenserc.yaml
do
- DIR=$(dirname $i)
+ DIR="$(dirname $i)"
echo "*** Checking license headers in $DIR"
cd $DIR
Review Comment:
`DIR` is computed with quotes, but then used unquoted in `cd $DIR`, which
will break when a path contains spaces. Quote it consistently (e.g., `cd
\"$DIR\"`).
##########
build-and-test-ubuntu.sh:
##########
@@ -99,6 +99,8 @@ echo "Building and testing"
cd "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
git config --global --add safe.directory "$PWD"
git config --global --add safe.directory "$PWD/olaris-op"
+git config --global user.name "Build OpenServerless"
+git config --global user.email "[email protected]"
Review Comment:
Setting git identity with `--global` mutates the runner/user’s global git
config and can leak across jobs or affect unrelated repos. Prefer setting
repo-local config (no `--global`) or passing identity only for the command that
needs it (e.g., via `git -c user.name=... -c user.email=... commit ...`). Also
remove the trailing whitespace at the end of these lines.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]