-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Progress Bar API Changes. #18953
Progress Bar API Changes. #18953
Conversation
import io.airbyte.api.model.generated.SetWorkflowInAttemptRequestBody; | ||
import io.airbyte.server.handlers.AttemptHandler; | ||
import javax.ws.rs.Path; | ||
|
||
@Path("/v1/attempt/set_workflow_in_attempt") | ||
@Path("/v1/attempt/") |
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.
I've made this a less restrictive path so this will continue to override 2 different routes.
This works since the path, while less restrictive, is still more restrictive than the general V1 path in the ConfigurationApi class.
PTAL @jdpgrailsdev @benmoriceau @mfsiega-airbyte
Please look at https://github.com/airbytehq/airbyte/pull/18630/files#diff-8d2a55215b7d1dbfdb14f80e5fb444c9b940be967bdfb8cfbf1e24703579095e for a taste on how the routes here will be used! |
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.
API update looks reasonable to me! Don't have context on what's going on with the AttemptApiController so left it alone.
@davinchia This is fine for now. We (mostly @benmoriceau ) are working on the pre-step of creating separate classes for each endpoint domain, but without the changes needed to work with Micronaut/dependency injection. That will come in a later step, so what you have is fine for now. |
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.
@@ -362,6 +363,11 @@ public void revokeSourceDefinitionFromWorkspace(final SourceDefinitionIdWithWork | |||
}); | |||
} | |||
|
|||
@Override |
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.
Nit: could you add a comment about where the implementation lives?
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.
oh yes! will do that real quick in a follow up
Follow up to #18953. Implement all the DB migrations required for a progress bar. The main change here is to support saving: the estimated records/bytes at the sync level the estimated records/bytes and emitted records/bytes at the stream level After this, I'll put up a PR for the persistence layer changes, which will writing to and reading from these columns. Finally, I'll wire this into the API changes, which are currently stubs. - add the estimated_records and estimated_bytes columns to the SyncStats table. - create a stream_stats table - estimated and emitted records/bytes column - contains attempt_id and stream_name columns. Unique constraints on these two columns. - foreign key to the attempt_id table. - this table hopefully sets us up for the parallel sync work.
Follow up to #18953. Implement all the DB migrations required for a progress bar. The main change here is to support saving: the estimated records/bytes at the sync level the estimated records/bytes and emitted records/bytes at the stream level After this, I'll put up a PR for the persistence layer changes, which will writing to and reading from these columns. Finally, I'll wire this into the API changes, which are currently stubs. - add the estimated_records and estimated_bytes columns to the SyncStats table. - create a stream_stats table - estimated and emitted records/bytes column - contains attempt_id and stream_name columns. Unique constraints on these two columns. - foreign key to the attempt_id table. - this table hopefully sets us up for the parallel sync work.
What
API changes to support the progress bar.
We need both estimated metadata, as well as running states to calculate progress bar and throughput.
How
save_stats
route. This is the route that will be called by workers. I've done my best to reuse existing openapi bodies to reduce duplication.estimatedRecords
andestimatedBytes
fields to theAttemptStats
body. This is part of theAttemptRead
and theAttemptStreamStats
objects. This eventually filters up to thejobs/list
andjobs/get_debug_info
objects. This also adds these to all the endpoints that were previously returning stats information. I think the duplicated data is a small issue and don't think it's worth splitting out a new api objects, though I will gladly do so if folks feel strongly.Recommended reading order
config.yaml
for the main changes.AttemptApiController.java
for the override changes.🚨 User Impact 🚨
Are there any breaking changes? What is the end result perceived by the user? If yes, please merge this PR with the 🚨🚨 emoji so changelog authors can further highlight this if needed.
Pre-merge Checklist
Expand the relevant checklist and delete the others.
New Connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampledocs/integrations/README.md
airbyte-integrations/builds.md
Airbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing/publish
command described hereUpdating a connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampleAirbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing/publish
command described hereConnector Generator
-scaffold
in their name) have been updated with the latest scaffold by running./gradlew :airbyte-integrations:connector-templates:generator:testScaffoldTemplates
then checking in your changesTests
Unit
Put your unit tests output here.
Integration
Put your integration tests output here.
Acceptance
Put your acceptance tests output here.