Skip to content

Commit 8d6b20d

Browse files
Copilotjmsundar
andcommitted
chore: combine ci-scripts and dev folders into scripts
Agent-Logs-Url: https://github.com/helloextend/opentelemetry-lambda/sessions/fd6e0fa5-d20f-479b-a3c8-3ec710ac930d Co-authored-by: jmsundar <29724673+jmsundar@users.noreply.github.com>
1 parent 1a8141c commit 8d6b20d

15 files changed

+23
-23
lines changed

.github/workflows/publish-extend-otel-layer.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
- 'collector/**'
1111
- 'nodejs/**'
1212
- 'extend/**'
13-
- 'ci-scripts/**'
13+
- 'scripts/**'
1414
- '.github/workflows/publish-extend-otel-layer.yml'
1515
workflow_dispatch:
1616

@@ -46,19 +46,19 @@ jobs:
4646
steps:
4747
- uses: actions/checkout@v4
4848
# Pinned SHA — bump when upstream cx-contrib lands a fix/feature we want.
49-
# Keep in sync with CX_CONTRIB_SHA in ci-scripts/publish-sandbox.sh.
49+
# Keep in sync with CX_CONTRIB_SHA in scripts/publish-sandbox.sh.
5050
- uses: actions/checkout@v4
5151
with: { repository: coralogix/opentelemetry-js-contrib, ref: 3a9691a699ddd06c3644eec70bf4b50cc4217ba3, path: opentelemetry-js-contrib }
5252
- uses: actions/setup-node@v4
5353
with:
5454
node-version: 22
5555
cache: npm
5656
cache-dependency-path: nodejs/packages/layer/package-lock.json
57-
- run: ./ci-scripts/build_nodejs_layer.sh
57+
- run: ./scripts/build_nodejs_layer.sh
5858
- env:
5959
FILE_PATH: ./nodejs/packages/layer/build/layer.zip
6060
MAX_SIZE: 9437184
61-
run: ./ci-scripts/check_size.sh
61+
run: ./scripts/check_size.sh
6262
- uses: actions/upload-artifact@v4
6363
with:
6464
name: nodejs-layer

.github/workflows/publish-nodejs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ jobs:
4343
with:
4444
node-version: 20
4545
- name: Build
46-
run: ./ci-scripts/build_nodejs_layer.sh
46+
run: ./scripts/build_nodejs_layer.sh
4747
- name: Check layer size
4848
env:
4949
FILE_PATH: ./nodejs/packages/layer/build/layer.zip
5050
MAX_SIZE: 9437184 # 9MB
51-
run: ./ci-scripts/check_size.sh
51+
run: ./scripts/check_size.sh
5252
- uses: aws-actions/configure-aws-credentials@v2
5353
with:
5454
aws-access-key-id: ${{ vars.SIGNER_AWS_ACCESS_KEY_ID }}
@@ -105,4 +105,4 @@ jobs:
105105
env:
106106
LAYER_NAME: "coralogix-opentelemetry-nodejs-wrapper"
107107
COMPATIBLE_RUNTIMES: "nodejs18.x nodejs20.x nodejs22.x nodejs24.x"
108-
run: ./ci-scripts/publish_${{ inputs.environment }}.sh
108+
run: ./scripts/publish_${{ inputs.environment }}.sh

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ The collector extension (in `collector/`) is language-agnostic and powers both N
2020
| `extend/` | Extend-specific collector configs + README for consumers |
2121
| `nodejs/` | Node.js wrapper + cx-wrapper package |
2222
| `python/` | Python wrapper |
23-
| `ci-scripts/` | Build scripts (`build_nodejs_layer.sh`, `publish-sandbox.sh`, `check_size.sh`) |
23+
| `scripts/` | Build & dev scripts (`build_nodejs_layer.sh`, `publish-sandbox.sh`, `check_size.sh`, `build-nodejs.sh`, `deploy-nodejs.sh`) |
2424
| `.github/workflows/publish-extend-otel-layer.yml` | Publish pipeline (Node.js layer today) |
2525
| `UPSTREAM.md` | Fork point + upstream sync status |
2626

2727
## Publishing
2828

2929
**Production** — push to `main` triggers `publish-extend-otel-layer.yml`, which publishes `extend-nodejs-wrapper-and-exporter-{amd64,arm64}` to account 159581800400 in `us-east-1` and `us-west-2`, org-visible to all Extend AWS accounts.
3030

31-
**Sandbox**`./ci-scripts/publish-sandbox.sh {amd64|arm64}` publishes a private layer (`extend-nodejs-wrapper-and-exporter-sandbox-{arch}`) to the currently-authenticated account in `us-east-1`. Auto-clones the pinned `coralogix/opentelemetry-js-contrib` fork to `.build-cache/` on first run.
31+
**Sandbox**`./scripts/publish-sandbox.sh {amd64|arm64}` publishes a private layer (`extend-nodejs-wrapper-and-exporter-sandbox-{arch}`) to the currently-authenticated account in `us-east-1`. Auto-clones the pinned `coralogix/opentelemetry-js-contrib` fork to `.build-cache/` on first run.
3232

3333
## Consumer wiring
3434

UPSTREAM.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This repo is a fork of [`coralogix/opentelemetry-lambda`](https://github.com/coralogix/opentelemetry-lambda) (branch `coralogix-nodejs-autoinstrumentation`), which is itself a fork of [`open-telemetry/opentelemetry-lambda`](https://github.com/open-telemetry/opentelemetry-lambda).
44

5-
We also consume [`coralogix/opentelemetry-js-contrib`](https://github.com/coralogix/opentelemetry-js-contrib) (branch `coralogix-autoinstrumentation`) at build time — pinned separately in `ci-scripts/publish-sandbox.sh` and `.github/workflows/publish-extend-otel-layer.yml`.
5+
We also consume [`coralogix/opentelemetry-js-contrib`](https://github.com/coralogix/opentelemetry-js-contrib) (branch `coralogix-autoinstrumentation`) at build time — pinned separately in `scripts/publish-sandbox.sh` and `.github/workflows/publish-extend-otel-layer.yml`.
66

77
Why we fork cx-contrib: upstream OpenTelemetry has declined the Lambda-specific PRs (trigger subsystem, early-spans-on-timeout, `cx.internal.*` reconciliation attrs — see contrib#1349, contrib#1295, contrib#1309). See `~/workspace/scratch/otel-fork-research/summary.md` for the full rationale.
88

@@ -43,7 +43,7 @@ git log 3a9691a699ddd06c3644eec70bf4b50cc4217ba3..origin/coralogix-autoinstrumen
4343
```
4444

4545
When bumping, update **both** places in sync:
46-
- `ci-scripts/publish-sandbox.sh``CX_CONTRIB_SHA`
46+
- `scripts/publish-sandbox.sh``CX_CONTRIB_SHA`
4747
- `.github/workflows/publish-extend-otel-layer.yml``ref:` on the cx-contrib checkout step
4848
- This file's fork-points table
4949

extend/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Required env vars:
4343

4444
## Build (pending workflow setup)
4545

46-
Follows upstream: `./ci-scripts/build_nodejs_layer.sh` — requires a sibling checkout of `coralogix/opentelemetry-js-contrib` (branch `coralogix-autoinstrumentation`) set via `OPENTELEMETRY_JS_CONTRIB_PATH`. See `.github/workflows/publish-nodejs.yml` for the published flow.
46+
Follows upstream: `./scripts/build_nodejs_layer.sh` — requires a sibling checkout of `coralogix/opentelemetry-js-contrib` (branch `coralogix-autoinstrumentation`) set via `OPENTELEMETRY_JS_CONTRIB_PATH`. See `.github/workflows/publish-nodejs.yml` for the published flow.
4747

4848
**Extend-specific follow-ups** (tracked in DEVOPS-2394):
4949
- [ ] Add GitHub Actions workflow to publish to Extend AWS accounts

extend/plan-publish.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ package-extend: build
8686

8787
### 4. Node.js wrapper build — reuse upstream script
8888

89-
`ci-scripts/build_nodejs_layer.sh` already builds `nodejs/packages/layer/build/layer.zip`. Needs sibling checkouts + env vars (see `publish-nodejs.yml:17-43`):
89+
`scripts/build_nodejs_layer.sh` already builds `nodejs/packages/layer/build/layer.zip`. Needs sibling checkouts + env vars (see `publish-nodejs.yml:17-43`):
9090

9191
- `OPENTELEMETRY_JS_CONTRIB_PATH` → `coralogix/opentelemetry-js-contrib@coralogix-autoinstrumentation`
9292
- `OPENTELEMETRY_JS_PATH` → `coralogix/opentelemetry-js@coralogix-autoinstrumentation`
@@ -123,7 +123,7 @@ on:
123123
- 'collector/**'
124124
- 'nodejs/**'
125125
- 'extend/**'
126-
- 'ci-scripts/**'
126+
- 'scripts/**'
127127
- '.github/workflows/publish-extend-otel-layer.yml'
128128
workflow_dispatch:
129129
@@ -163,11 +163,11 @@ jobs:
163163
with: { repository: coralogix/import-in-the-middle, ref: coralogix-autoinstrumentation, path: import-in-the-middle }
164164
- uses: actions/setup-node@v4
165165
with: { node-version: 20 }
166-
- run: ./ci-scripts/build_nodejs_layer.sh
166+
- run: ./scripts/build_nodejs_layer.sh
167167
- env:
168168
FILE_PATH: ./nodejs/packages/layer/build/layer.zip
169169
MAX_SIZE: 9437184
170-
run: ./ci-scripts/check_size.sh
170+
run: ./scripts/check_size.sh
171171
- uses: actions/upload-artifact@v4
172172
with:
173173
name: nodejs-layer
@@ -212,14 +212,14 @@ No `add-layer-version-permission` step — layer stays private.
212212

213213
### 7. Size gate
214214

215-
`ci-scripts/check_size.sh` runs inside `build-nodejs` (9 MB cap on nodejs zip, upstream default). Lambda layer hard limit is 250 MB unzipped across all layers — collector binary ~30-50 MB + nodejs ~9 MB leaves ample headroom.
215+
`scripts/check_size.sh` runs inside `build-nodejs` (9 MB cap on nodejs zip, upstream default). Lambda layer hard limit is 250 MB unzipped across all layers — collector binary ~30-50 MB + nodejs ~9 MB leaves ample headroom.
216216

217217
## Verification
218218

219219
End-to-end, on a throwaway branch:
220220

221221
1. **Local build per arch**`make -C collector package-extend GOARCH=amd64` and `GOARCH=arm64`; inspect `build/opentelemetry-collector-layer-*.zip` has `extensions/collector` binary + all 3 configs in `collector-config/` with `config.yaml` as cx-only contents
222-
2. **Local nodejs build** — clone the 3 coralogix forks as siblings, run `./ci-scripts/build_nodejs_layer.sh`, confirm `nodejs/packages/layer/build/layer.zip` ≤ 9 MB and contains `nodejs/node_modules/` + `otel-handler`
222+
2. **Local nodejs build** — clone the 3 coralogix forks as siblings, run `./scripts/build_nodejs_layer.sh`, confirm `nodejs/packages/layer/build/layer.zip` ≤ 9 MB and contains `nodejs/node_modules/` + `otel-handler`
223223
3. **Workflow dry-run** — push to a throwaway branch, trigger `workflow_dispatch`, confirm `build-collector` + `build-nodejs` succeed and artifacts upload
224224
4. **Publish dry-run** — temporarily scope `package-and-publish` to a single arch/region, confirm `LayerVersionArn` prints in the job log and `aws lambda list-layer-versions --layer-name extend-otel-lambda-arm64 --region us-east-1` shows the version
225225
5. **Consumer smoke** — wire one low-traffic Lambda via `extend-cdk-lib` `NodeLambdaBuilder` to the new layer ARN, confirm traces land in CX (cx-only) and Arize + S3 (cx-arize-s3)

nodejs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ To build the layer and sample applications run the command below from
4040
the root of the application:
4141

4242
```sh
43-
./dev/build-nodejs.sh
43+
./scripts/build-nodejs.sh
4444
```
4545

46-
This is a thin wrapper over `./ci-scripts/build_nodejs_layer.sh` that
46+
This is a thin wrapper over `./scripts/build_nodejs_layer.sh` that
4747
will clone the forked dependencies if the paths indicated by the
4848
previously mentioned environment variables are empty, then use
4949
that script to download all dependencies and compile all code.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if [ ! -d "$OPENTELEMETRY_JS_PATH" ]; then
2929
git clone git@github.com:coralogix/opentelemetry-js.git "$OPENTELEMETRY_JS_PATH" -b coralogix-autoinstrumentation
3030
fi
3131

32-
"$ROOT_DIR/ci-scripts/build_nodejs_layer.sh"
32+
"$ROOT_DIR/scripts/build_nodejs_layer.sh"
3333

3434
# Useful for using the layer locally
3535
pushd "$ROOT_DIR/nodejs/packages/layer" >/dev/null

0 commit comments

Comments
 (0)