fix: patch logger and Docker build to emit query-completed logs#1
Open
tvansteenburgh wants to merge 1 commit into
Open
fix: patch logger and Docker build to emit query-completed logs#1tvansteenburgh wants to merge 1 commit into
tvansteenburgh wants to merge 1 commit into
Conversation
…7523) [ENG-7523](https://stacklet.atlassian.net/browse/ENG-7523) ### what - Patch `prodLogger` in `cubejs-server-core` to unconditionally emit "Performing query completed" messages regardless of log level - Introduce `scripts/build-docker.sh` to compile locally patched packages and stage their `dist/` output into `packages/cubejs-docker/stacklet-patches/` before `docker build` - Update `packages/cubejs-docker/latest.Dockerfile` to overlay any `*-dist/` directories found in `stacklet-patches/` onto the npm-installed package versions - Add `packages/cubejs-docker/DEVELOPMENT.md` documenting the Stacklet build workflow ### why The CloudWatch log metric filter in `platform-cubejs-schemas` relies on "Performing query completed" messages to track pre-aggregation runs, but the upstream logger gates them on log level. Our goal is to preserve these specific log lines needed for metrics without the expense of running at trace-level logging across the board. The Docker image installs packages from npm via `yarn install --prod`, so local TypeScript changes compiled into `packages/*/dist/` are silently ignored. The build script and Dockerfile overlay ensure the patched logger is always present in the resulting image. ### testing Run `./scripts/build-docker.sh <tag>` and verify: docker run --rm <tag> grep -c "Performing query completed" \ /cube/node_modules/@cubejs-backend/server-core/dist/src/core/logger.js Expected output: 2 ### docs Updated `packages/cubejs-docker/DEVELOPMENT.md` with Stacklet build instructions and pattern for adding future patched packages. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ENG-7523
what
prodLoggerincubejs-server-coreto unconditionally emit"Performing query completed" messages regardless of log level
scripts/build-docker.shto compile locally patched packagesand stage their
dist/output intopackages/cubejs-docker/stacklet-patches/beforedocker buildpackages/cubejs-docker/latest.Dockerfileto overlay any*-dist/directories found instacklet-patches/onto thenpm-installed package versions
packages/cubejs-docker/DEVELOPMENT.mddocumenting the Stackletbuild workflow
why
The CloudWatch log metric filter in
platform-cubejs-schemasrelies on"Performing query completed" messages to track pre-aggregation runs, but
the upstream logger gates them on log level. Our goal is to preserve these
specific log lines needed for metrics without the expense of running at
trace-level logging across the board. The Docker image installs packages
from npm via
yarn install --prod, so local TypeScript changes compiledinto
packages/*/dist/are silently ignored. The build script andDockerfile overlay ensure the patched logger is always present in the
resulting image.
testing
./scripts/build-docker.sh <tag>scriptdocs
packages/cubejs-docker/DEVELOPMENT.mdwith Stacklet build instructions and pattern for adding future patched packages.