-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Reorganise Worker Module. #12950
Reorganise Worker Module. #12950
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.
Huge +1 on the rename from
protocol
to internal
to represent interfaces not used outside of the worker module. I hope that we will do more of this to help convey better which code is used outside of a given module.
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.
LGTM overall. I just have a concern about the naming of the general
packages and its content. Shouldn't the interface and their implementation be in the same package? For the naming I think that runners
would be better than general
Also should we move the interface within the module that implements them?
Not entirely related to this review but we can extract the custom exception in their own module as well.
I made #12959 that contains those changes if you want to see what it would looks like.
thanks for the feedback @benmoriceau !
Sounds good.
I did think about this. 'runners' felt more confusing to me since there is a 'normalisation' package. It felt more natural to have a package representing 'normal operations' i.e.
It's pretty common to see interfaces be separate from the implementation in a |
I did think about this. 'runners' felt more confusing to me since there is a 'normalisation' package. It felt more natural to have a package representing 'normal operations' i.e. general and the normalisation as a special case. Can we keep it as is and rename to runner when we get rid of normalisation? Yes it sounds good. It's pretty common to see interfaces be separate from the implementation in a I would prefer having it in our root rather than in a dedicated package. I was think about moving to the same package because at the moment we on use those interface in the |
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.
Avoid blocking
Edit: didn't remove the change requested
…ions into the exception package.
@benmoriceau I moved it the exceptions into it's own package. I decided to moving all the specific interfaces into the |
I was reading this code when I realised this module is gradually developing into a sprawl. Reorganise to make this more readable and clarify certain operations. A less-urgent follow up step here is to pull all process related code out of this module and combine it with the container-orchestrator module to achieve a clear split between 'job execution code' and 'process abstraction code'. - Move all the worker implementations from top-level into the io.airbyte.workers.general package. Leave normalization related code in the normalization package as this is actually a special case of the dbt worker and should be deprecated once we implement general DBT support. - Move all exceptions into an exceptions package. - With this change, top level code in the airbyte workers module is now all interfaces + worker app set up code. - Rename io.airbyte.workers.protocols.airbyte to io.airbyte.workers.internal to better represent this subpackage contains interfaces/implementations internal to the workers. Protocol is confusing since it implies some relation to the general airbyte protocol. - Rename io.airbyte.workers.worker_run to io.airbyte.workers.run for conciseness. - Merge io.airbyte.workers.test_helper to io.airbyte.workers.helper. Only a single class was present here.
What
I was reading this code when I realised this module is gradually developing into a sprawl. Reorganise to make this more readable and clarify certain operations.
A less-urgent follow up step here is to pull all process related code out of this module and combine it with the container-orchestrator module to achieve a clear split between 'job execution code' and 'process abstraction code'.
How
io.airbyte.workers.general
package. Leave normalization related code in thenormalization
package as this is actually a special case of the dbt worker and should be deprecated once we implement general DBT support.io.airbyte.workers.protocols.airbyte
toio.airbyte.workers.internal
to better represent this subpackage contains interfaces/implementations internal to the workers. Protocol is confusing since it implies some relation to the general airbyte protocol.io.airbyte.workers.worker_run
toio.airbyte.workers.run
for conciseness.io.airbyte.workers.test_helper
toio.airbyte.workers.helper
. Only a single class was present here.Recommended reading order
The Github UI is somewhat useless for review due to the number of moved files. I recommend reviewing by browsing the airbyte-workers module in the IDE.
🚨 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/SUMMARY.md
docs/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.