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

store env-var response #21327

Merged
merged 8 commits into from
Jan 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class DefaultAirbyteSource implements AirbyteSource {
private Process sourceProcess = null;
private Iterator<AirbyteMessage> messageIterator = null;
private Integer exitValue = null;
private final FeatureFlags featureFlags;
private final boolean featureFlagLogConnectorMsgs;

public DefaultAirbyteSource(final IntegrationLauncher integrationLauncher, final FeatureFlags featureFlags) {
this(integrationLauncher, new DefaultAirbyteStreamFactory(CONTAINER_LOG_MDC_BUILDER), featureFlags);
Expand All @@ -76,7 +76,7 @@ public DefaultAirbyteSource(final IntegrationLauncher integrationLauncher,
this.integrationLauncher = integrationLauncher;
this.streamFactory = streamFactory;
this.heartbeatMonitor = heartbeatMonitor;
this.featureFlags = featureFlags;
this.featureFlagLogConnectorMsgs = featureFlags.logConnectorMessages();
}

@Trace(operationName = WORKER_OPERATION_NAME)
Expand Down Expand Up @@ -171,7 +171,7 @@ public void cancel() throws Exception {
}

private void logInitialStateAsJSON(final WorkerSourceConfig sourceConfig) {
if (!featureFlags.logConnectorMessages()) {
if (!featureFlagLogConnectorMsgs) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public class AirbyteMessageTracker implements MessageTracker {
private final List<AirbyteTraceMessage> sourceErrorTraceMessages;
private final StateAggregator stateAggregator;
private final FeatureFlags featureFlags;
private final boolean featureFlagLogConnectorMsgs;

// These variables support SYNC level estimates and are meant for sources where stream level
// estimates are not possible e.g. CDC sources.
Expand Down Expand Up @@ -118,6 +119,7 @@ protected AirbyteMessageTracker(final StateDeltaTracker stateDeltaTracker,
this.sourceErrorTraceMessages = new ArrayList<>();
this.stateAggregator = stateAggregator;
this.featureFlags = featureFlags;
this.featureFlagLogConnectorMsgs = featureFlags.logConnectorMessages();
}

@Trace(operationName = WORKER_OPERATION_NAME)
Expand Down Expand Up @@ -545,7 +547,7 @@ public Boolean getUnreliableStateTimingMetrics() {
}

private void logMessageAsJSON(final String caller, final AirbyteMessage message) {
if (!featureFlags.logConnectorMessages()) {
if (!featureFlagLogConnectorMsgs) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public <T> T getEnvOrDefault(final String key, final T defaultValue, final Funct
if (value != null && !value.isEmpty()) {
return parser.apply(value);
} else {
log.info("Using default value for environment variable {}: '{}'", key, defaultValue);
log.debug("Using default value for environment variable {}: '{}'", key, defaultValue);
return defaultValue;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,4 +441,4 @@
dockerRepository: airbyte/destination-weaviate
dockerImageTag: 0.1.0
documentationUrl: https://docs.airbyte.com/integrations/destinations/weaviate
releaseStage: alpha
releaseStage: alpha