-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add scheduler client that pulls from bucket cache #5605
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick work!
I'm assuming you tested the GCS storage calls separately.
airbyte-config/models/src/main/java/io/airbyte/config/EnvConfigs.java
Outdated
Show resolved
Hide resolved
implementation project(':airbyte-protocol:models') | ||
implementation project(':airbyte-scheduler:models') | ||
implementation project(':airbyte-scheduler:persistence') | ||
// todo (cgardens) - remove this dep. just needs temporal client. | ||
implementation project(':airbyte-workers') | ||
|
||
implementation platform('com.google.cloud:libraries-bom:21.0.0') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems more suited for the top-level build.gradle
. Can we skip this for now and specify the version in the dependency itself? We can do a sweep later on to consolidate all this at one go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed.
if (cachedSpecOptional.isPresent()) { | ||
final long now = Instant.now().toEpochMilli(); | ||
final SynchronousJobMetadata mockMetadata = new SynchronousJobMetadata( | ||
UUID.randomUUID(), | ||
ConfigType.GET_SPEC, | ||
null, | ||
now, | ||
now, | ||
true, | ||
Path.of("")); | ||
return new SynchronousResponse<>(cachedSpecOptional.get(), mockMetadata); | ||
} else { | ||
return client.createGetSpecJob(dockerImage); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (cachedSpecOptional.isPresent()) { | |
final long now = Instant.now().toEpochMilli(); | |
final SynchronousJobMetadata mockMetadata = new SynchronousJobMetadata( | |
UUID.randomUUID(), | |
ConfigType.GET_SPEC, | |
null, | |
now, | |
now, | |
true, | |
Path.of("")); | |
return new SynchronousResponse<>(cachedSpecOptional.get(), mockMetadata); | |
} else { | |
return client.createGetSpecJob(dockerImage); | |
} | |
if (cachedSpecOptional.isPresent()) { | |
final long now = Instant.now().toEpochMilli(); | |
final SynchronousJobMetadata mockMetadata = new SynchronousJobMetadata( | |
UUID.randomUUID(), | |
ConfigType.GET_SPEC, | |
null, | |
now, | |
now, | |
true, | |
Path.of("")); | |
return new SynchronousResponse<>(cachedSpecOptional.get(), mockMetadata); | |
} | |
return client.createGetSpecJob(dockerImage); |
d1f91dd
to
a04808c
Compare
84bd155
to
9d97662
Compare
Do you mean the reads or the writes? The writes I'm going to do in a separate PR now. The nice thing about this client is that even if the bucket doesn't exist it is safe to merge. It'll just fall back on actually running the spec. The read is tested in the unit tests. It's a bit awkward because it is more akin to an integration test. |
What