-
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
Bmoric/extract connection api #18409
Merged
Merged
Changes from 8 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
4ebf4ec
Tmp
benmoriceau 6d8e907
Merge branch 'master' of github.com:airbytehq/airbyte into bmoric/con…
benmoriceau d930c98
Extract the Attempt API from the V1 API
benmoriceau 2dba567
Add comments
benmoriceau 7c36975
Move Connection API out of configuration API
benmoriceau 0d87509
format
benmoriceau cf61847
Merge branch 'bmoric/convert-server-to-micronaut' of github.com:airby…
benmoriceau 04e9bb2
format
benmoriceau c74db48
Rename to Controller
benmoriceau 433dfe5
Merge branch 'bmoric/convert-server-to-micronaut' of github.com:airby…
benmoriceau 415e0c7
Rename to Controller
benmoriceau 7211da6
Add values to the factory
benmoriceau f503b4c
Change the constructor to use hadler instead of objects needed by the…
benmoriceau 70ce157
Merge branch 'master' of github.com:airbytehq/airbyte into bmoric/ext…
benmoriceau 688f812
Merge branch 'master' of github.com:airbytehq/airbyte into bmoric/ext…
benmoriceau 2103e7d
Update with new tags.
benmoriceau c5aee8f
Fix PMD errors
benmoriceau 3877dcd
Add explicit path to the controller
benmoriceau File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
airbyte-server/src/main/java/io/airbyte/server/apis/AttemptApiImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright (c) 2022 Airbyte, Inc., all rights reserved. | ||
*/ | ||
|
||
package io.airbyte.server.apis; | ||
|
||
import io.airbyte.api.generated.AttemptApi; | ||
import io.airbyte.api.model.generated.InternalOperationResult; | ||
import io.airbyte.api.model.generated.SetWorkflowInAttemptRequestBody; | ||
import io.airbyte.persistence.job.JobPersistence; | ||
import io.airbyte.server.handlers.AttemptHandler; | ||
import javax.ws.rs.Path; | ||
|
||
@Path("/v1/attempt/set_workflow_in_attempt") | ||
public class AttemptApiImpl implements AttemptApi { | ||
|
||
private final AttemptHandler attemptHandler; | ||
|
||
public AttemptApiImpl(final JobPersistence jobPersistence) { | ||
attemptHandler = new AttemptHandler(jobPersistence); | ||
} | ||
|
||
@Override | ||
public InternalOperationResult setWorkflowInAttempt(final SetWorkflowInAttemptRequestBody requestBody) { | ||
return ConfigurationApi.execute(() -> attemptHandler.setWorkflowInAttempt(requestBody)); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We should discuss naming conventions on these classes, we (outside of this pr) seem to have a mix of
DefaultInterface
andInterfaceImpl
. Personally I lean towards theDefault
prefix, but more I want consistency.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 forget to change the base, sorry about that. @jdpgrailsdev had a similar comment and I renamed it to
Controller