Skip to content
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

Kube Logs are stored and retrieved from Cloud Storage. #4053

Merged
merged 44 commits into from Jun 19, 2021

Conversation

davinchia
Copy link
Contributor

@davinchia davinchia commented Jun 11, 2021

Remaining work
[X] Modify API to read from Cloud. In general, we should defer to local if the log file exists, and Cloud Storage if it does not.
[x] Figure out configuration to also support GCS.
[X] Modify Kube deployment to support Cloud.
[x] Add better comments and log test to the Docker and Kube acceptance tests.

Future work (will create tickets for these):

@davinchia davinchia changed the title Kube Logging POC. WIP: Kube Logging POC. Jun 11, 2021
@davinchia davinchia changed the title WIP: Kube Logging POC. WIP: Kube Logging. Jun 14, 2021
@github-actions github-actions bot added the area/platform issues related to the platform label Jun 15, 2021
<PatternLayout pattern="${default-worker-file-pattern}"/>
</File>
</Route>
</Routes>
<IdlePurgePolicy timeToLive="15" timeUnit="minutes"/>
</Routing>
<Routing name="LogSplitCloud">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

will comment why we had to configure in this way - essentially only accepts one appender.


public class LogHelpers {

// if you update these values, you must also update log4j2.xml
private static final Logger LOGGER = LoggerFactory.getLogger(LogHelpers.class);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

should all the logging related stuff be moved to it's own module? or can it stay in models for now?

Copy link
Contributor

Choose a reason for hiding this comment

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

Can stay for now but should be split eventually.

This reverts commit 19db827.
…g this ID. Consolidate all MDC operations to setMDC function in WorkerUtils. Remove unused functions.
@github-actions github-actions bot added the area/worker Related to worker label Jun 17, 2021
@davinchia davinchia changed the title WIP: Kube Logging. Kube Logs are stored and retrieved from Cloud Storage. Jun 18, 2021
.env Outdated Show resolved Hide resolved
@@ -50,7 +50,7 @@
private static final ObjectWriter OBJECT_WRITER = OBJECT_MAPPER.writer(new JsonPrettyPrinter());

private static ObjectMapper initMapper() {
final ObjectMapper result = new ObjectMapper();
final ObjectMapper result = new ObjectMapper().findAndRegisterModules();
Copy link
Contributor

Choose a reason for hiding this comment

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

why?

@@ -3,6 +3,5 @@ plugins {
}

dependencies {
implementation 'org.apache.commons:commons-compress:1.20'
implementation 'org.apache.commons:commons-lang3:3.11'
// Dependencies for this module should be specified in the top-level build.gradle.
Copy link
Contributor

Choose a reason for hiding this comment

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

why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because of https://github.com/airbytehq/airbyte/blob/master/build.gradle#L181, if everything is depending on airbyte-commons, it seems cleaner to have all of common's dependencies in the build.gradle as well.

@@ -45,7 +45,7 @@

public static final YAMLFactory YAML_FACTORY = new YAMLFactory();
// Object Mapper is thread-safe
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(YAML_FACTORY);
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(YAML_FACTORY).findAndRegisterModules();
Copy link
Contributor

Choose a reason for hiding this comment

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

why?


public class LogHelpers {

// if you update these values, you must also update log4j2.xml
private static final Logger LOGGER = LoggerFactory.getLogger(LogHelpers.class);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can stay for now but should be split eventually.

@github-actions github-actions bot added the area/connectors Connector related issues label Jun 19, 2021
@davinchia davinchia marked this pull request as ready for review June 19, 2021 02:50
@davinchia
Copy link
Contributor Author

davinchia commented Jun 19, 2021

/test connector=connectors/destination-redshift

🕑 connectors/destination-redshift https://github.com/airbytehq/airbyte/actions/runs/951654970
✅ connectors/destination-redshift https://github.com/airbytehq/airbyte/actions/runs/951654970

@davinchia
Copy link
Contributor Author

davinchia commented Jun 19, 2021

/test connector=connectors/destination-snowflake

🕑 connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/951655271
❌ connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/951655271

@davinchia
Copy link
Contributor Author

davinchia commented Jun 19, 2021

/test connector=connectors/destination-s3

🕑 connectors/destination-s3 https://github.com/airbytehq/airbyte/actions/runs/951655452
✅ connectors/destination-s3 https://github.com/airbytehq/airbyte/actions/runs/951655452

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants