Skip to content

Cap each log field (message, stacktrace) to max 32K characters #30806

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Oct 11, 2023

Conversation

rodireich
Copy link
Contributor

@rodireich rodireich commented Sep 27, 2023

What

A thread safety issue causes log lines to be interleaved with other AirbyteMessages when:

  1. logging from another thread
  2. Log line is over 8K characters

How

Cap max log line length to undo 8k by limiting both message size and logged stack trace size to under 16,000 characters

@rodireich rodireich requested review from davinchia and a team September 27, 2023 21:10
@rodireich rodireich requested a review from a team as a code owner September 27, 2023 21:10
@vercel
Copy link

vercel bot commented Sep 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Oct 11, 2023 7:18pm

@octavia-squidington-iii octavia-squidington-iii added the CDK Connector Development Kit label Sep 28, 2023
@@ -15,6 +15,9 @@ if [[ $IS_CAPTURE_HEAP_DUMP_ON_ERROR = true ]]; then
echo "APPLICATION=$APPLICATION"
fi
fi
#30781 - Allocate 32KB for log4j appender buffer to ensure that each line is logged in a single println
JAVA_OPTS=$JAVA_OPTS" -Dlog4j.encoder.byteBufferSize=32768"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This control the size of buffer defined in log4j's ConsoleAppender
(See here line 47)

This is the base shell command for all java connector.
We could put this JVM options separately on each connector's build.gradle but it's likely to be forgotten.
@davinchia @evantahler @prateekmukhedkar

@airbyte-oss-build-runner
Copy link
Collaborator

source-alloydb test report (commit 2c6028b9db) - ❌

⏲️ Total pipeline duration: 04mn01s

Step Result
Build connector tar
Build source-alloydb docker image for platform linux/x86_64
Java Connector Unit Tests
Java Connector Integration Tests
Acceptance tests
Validate metadata for source-alloydb
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-alloydb test

@rodireich rodireich changed the title Cap each log field (message, stacktrace) to max 3750 characters Cap each log field (message, stacktrace) to max 32K characters Oct 6, 2023
@airbyte-oss-build-runner
Copy link
Collaborator

source-postgres-strict-encrypt test report (commit 40d3f99ca5) - ❌

⏲️ Total pipeline duration: 10mn33s

Step Result
Build connector tar
Build source-postgres-strict-encrypt docker image for platform(s) linux/x86_64
Java Connector Unit Tests
Java Connector Integration Tests
Acceptance tests
Validate metadata for source-postgres-strict-encrypt
Connector version semver check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-postgres-strict-encrypt test

@airbyte-oss-build-runner
Copy link
Collaborator

source-pokeapi test report (commit 884985241e) - ✅

⏲️ Total pipeline duration: 01mn13s

Step Result
Build source-pokeapi docker image for platform(s) linux/x86_64
Acceptance tests
Code format checks
Validate metadata for source-pokeapi
Connector version semver check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-pokeapi test

@airbyte-oss-build-runner
Copy link
Collaborator

source-mysql test report (commit 884985241e) - ✅

⏲️ Total pipeline duration: 28mn57s

Step Result
Build connector tar
Build source-mysql docker image for platform(s) linux/x86_64
Java Connector Unit Tests
Java Connector Integration Tests
Acceptance tests
Validate metadata for source-mysql
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-mysql test

@airbyte-oss-build-runner
Copy link
Collaborator

source-mysql-strict-encrypt test report (commit 884985241e) - ✅

⏲️ Total pipeline duration: 08mn31s

Step Result
Build connector tar
Build source-mysql-strict-encrypt docker image for platform(s) linux/x86_64
Java Connector Unit Tests
Java Connector Integration Tests
Acceptance tests
Validate metadata for source-mysql-strict-encrypt
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-mysql-strict-encrypt test

@airbyte-oss-build-runner
Copy link
Collaborator

source-postgres-strict-encrypt test report (commit 884985241e) - ❌

⏲️ Total pipeline duration: 06mn20s

Step Result
Build connector tar
Build source-postgres-strict-encrypt docker image for platform(s) linux/x86_64
Java Connector Unit Tests
Java Connector Integration Tests
Acceptance tests
Validate metadata for source-postgres-strict-encrypt
Connector version semver check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-postgres-strict-encrypt test

@airbyte-oss-build-runner
Copy link
Collaborator

source-pokeapi test report (commit dfaadee40b) - ✅

⏲️ Total pipeline duration: 02mn00s

Step Result
Build source-pokeapi docker image for platform(s) linux/x86_64
Acceptance tests
Code format checks
Validate metadata for source-pokeapi
Connector version semver check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-pokeapi test

@airbyte-oss-build-runner
Copy link
Collaborator

source-postgres test report (commit dfaadee40b) - ✅

⏲️ Total pipeline duration: 28mn01s

Step Result
Build connector tar
Build source-postgres docker image for platform(s) linux/x86_64
Java Connector Unit Tests
Java Connector Integration Tests
Acceptance tests
Validate metadata for source-postgres
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-postgres test

@airbyte-oss-build-runner
Copy link
Collaborator

source-postgres-strict-encrypt test report (commit dfaadee40b) - ✅

⏲️ Total pipeline duration: 07mn46s

Step Result
Build connector tar
Build source-postgres-strict-encrypt docker image for platform(s) linux/x86_64
Java Connector Unit Tests
Java Connector Integration Tests
Acceptance tests
Validate metadata for source-postgres-strict-encrypt
Connector version semver check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-postgres-strict-encrypt test

@airbyte-oss-build-runner
Copy link
Collaborator

source-mysql-strict-encrypt test report (commit dfaadee40b) - ✅

⏲️ Total pipeline duration: 03mn45s

Step Result
Build connector tar
Build source-mysql-strict-encrypt docker image for platform(s) linux/x86_64
Java Connector Unit Tests
Java Connector Integration Tests
Acceptance tests
Validate metadata for source-mysql-strict-encrypt
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-mysql-strict-encrypt test

@airbyte-oss-build-runner
Copy link
Collaborator

source-mysql test report (commit dfaadee40b) - ✅

⏲️ Total pipeline duration: 03mn40s

Step Result
Build connector tar
Build source-mysql docker image for platform(s) linux/x86_64
Java Connector Unit Tests
Java Connector Integration Tests
Acceptance tests
Validate metadata for source-mysql
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-mysql test

@airbyte-oss-build-runner
Copy link
Collaborator

source-mysql-strict-encrypt test report (commit b74634a7a4) - ✅

⏲️ Total pipeline duration: 12mn05s

Step Result
Build connector tar
Build source-mysql-strict-encrypt docker image for platform(s) linux/x86_64
Java Connector Unit Tests
Java Connector Integration Tests
Acceptance tests
Validate metadata for source-mysql-strict-encrypt
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-mysql-strict-encrypt test

@airbyte-oss-build-runner
Copy link
Collaborator

source-postgres-strict-encrypt test report (commit 50d8f7664d) - ✅

⏲️ Total pipeline duration: 11mn11s

Step Result
Build connector tar
Build source-postgres-strict-encrypt docker image for platform(s) linux/x86_64
Java Connector Unit Tests
Java Connector Integration Tests
Acceptance tests
Validate metadata for source-postgres-strict-encrypt
Connector version semver check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-postgres-strict-encrypt test

@airbyte-oss-build-runner
Copy link
Collaborator

source-postgres test report (commit 50d8f7664d) - ✅

⏲️ Total pipeline duration: 25mn47s

Step Result
Build connector tar
Build source-postgres docker image for platform(s) linux/x86_64
Java Connector Unit Tests
Java Connector Integration Tests
Acceptance tests
Validate metadata for source-postgres
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-postgres test

@airbyte-oss-build-runner
Copy link
Collaborator

source-mysql test report (commit 50d8f7664d) - ✅

⏲️ Total pipeline duration: 27mn21s

Step Result
Build connector tar
Build source-mysql docker image for platform(s) linux/x86_64
Java Connector Unit Tests
Java Connector Integration Tests
Acceptance tests
Validate metadata for source-mysql
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-mysql test

@airbyte-oss-build-runner
Copy link
Collaborator

source-mysql-strict-encrypt test report (commit 50d8f7664d) - ✅

⏲️ Total pipeline duration: 08mn39s

Step Result
Build connector tar
Build source-mysql-strict-encrypt docker image for platform(s) linux/x86_64
Java Connector Unit Tests
Java Connector Integration Tests
Acceptance tests
Validate metadata for source-mysql-strict-encrypt
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-mysql-strict-encrypt test

@rodireich rodireich merged commit 3d9578f into master Oct 11, 2023
@rodireich rodireich deleted the 30781-truncate-log branch October 11, 2023 20:34
ariesgun pushed a commit to ariesgun/airbyte that referenced this pull request Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 Large log message in java connectors can lead to loss of records
6 participants