-
Notifications
You must be signed in to change notification settings - Fork 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 logs api #18621
Merged
Merged
Bmoric/extract logs api #18621
Changes from all commits
Commits
Show all changes
50 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 a5c8522
tmp
benmoriceau c5aee8f
Fix PMD errors
benmoriceau 50fc3ae
Extract DB migrator
benmoriceau 6b11154
Merge branch 'bmoric/extract-connection-api' of github.com:airbytehq/…
benmoriceau 4e8051e
Add something that I forgot
benmoriceau 99d9d4b
Merge branch 'master' of github.com:airbytehq/airbyte into bmoric/ext…
benmoriceau aca18c9
Merge branch 'master' of github.com:airbytehq/airbyte into bmoric/ext…
benmoriceau 7254ebb
extract destination definition api
benmoriceau 4d748af
restore destination factory initialization
benmoriceau e6a56a2
extract destination definition specification api
benmoriceau 709cdc4
format
benmoriceau aa06c20
Merge branch 'bmoric/extract-db-migration-api' of github.com:airbyteh…
benmoriceau 82360dc
format
benmoriceau 82ccd82
Merge branch 'bmoric/extract-destination-definition-api' of github.co…
benmoriceau 6ecdb17
format
benmoriceau 187c9ea
extract health check api
benmoriceau f6a5e9b
extract jobs api
benmoriceau 8023bc9
fix test
benmoriceau bd206a9
Merge branch 'master' of github.com:airbytehq/airbyte into bmoric/ext…
benmoriceau 293c187
format
benmoriceau 89308f5
Merge branch 'master' into bmoric/extract-healt-api
benmoriceau 60fa570
Merge branch 'bmoric/extract-healt-api' of github.com:airbytehq/airby…
benmoriceau 7accc25
Extract logs api
benmoriceau 5151909
Add missing declaration
benmoriceau 0eb77e1
Merge branch 'bmoric/extract-jobs-api' of github.com:airbytehq/airbyt…
benmoriceau ffb770b
Fix build
benmoriceau c3cd08e
Merge branch 'master' into bmoric/extract-healt-api
benmoriceau c65a79b
Merge branch 'bmoric/extract-healt-api' into bmoric/extract-jobs-api
benmoriceau 3ed2fee
format and PR comments
benmoriceau cef5c58
Merge branch 'bmoric/extract-jobs-api' of github.com:airbytehq/airbyt…
benmoriceau bfaf6b5
Merge branch 'master' of github.com:airbytehq/airbyte into bmoric/ext…
benmoriceau 8d07282
Merge branch 'bmoric/extract-jobs-api' of github.com:airbytehq/airbyt…
benmoriceau fa4761d
Fix PMD
benmoriceau 7e32024
Merge branch 'master' of github.com:airbytehq/airbyte into bmoric/ext…
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
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
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
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
25 changes: 25 additions & 0 deletions
25
airbyte-server/src/main/java/io/airbyte/server/apis/LogsApiController.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,25 @@ | ||
/* | ||
* Copyright (c) 2022 Airbyte, Inc., all rights reserved. | ||
*/ | ||
|
||
package io.airbyte.server.apis; | ||
|
||
import io.airbyte.api.generated.LogsApi; | ||
import io.airbyte.api.model.generated.LogsRequestBody; | ||
import io.airbyte.server.handlers.LogsHandler; | ||
import java.io.File; | ||
import javax.ws.rs.Path; | ||
import lombok.AllArgsConstructor; | ||
|
||
@Path("/v1/logs/get") | ||
@AllArgsConstructor | ||
public class LogsApiController implements LogsApi { | ||
|
||
private final LogsHandler logsHandler; | ||
|
||
@Override | ||
public File getLogs(final LogsRequestBody logsRequestBody) { | ||
return ConfigurationApi.execute(() -> logsHandler.getLogs(logsRequestBody)); | ||
} | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
airbyte-server/src/main/java/io/airbyte/server/apis/binders/LogsApiBinder.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,21 @@ | ||
/* | ||
* Copyright (c) 2022 Airbyte, Inc., all rights reserved. | ||
*/ | ||
|
||
package io.airbyte.server.apis.binders; | ||
|
||
import io.airbyte.server.apis.LogsApiController; | ||
import io.airbyte.server.apis.factories.LogsApiFactory; | ||
import org.glassfish.hk2.utilities.binding.AbstractBinder; | ||
import org.glassfish.jersey.process.internal.RequestScoped; | ||
|
||
public class LogsApiBinder extends AbstractBinder { | ||
|
||
@Override | ||
protected void configure() { | ||
bindFactory(LogsApiFactory.class) | ||
.to(LogsApiController.class) | ||
.in(RequestScoped.class); | ||
} | ||
|
||
} |
29 changes: 29 additions & 0 deletions
29
airbyte-server/src/main/java/io/airbyte/server/apis/factories/LogsApiFactory.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,29 @@ | ||
/* | ||
* Copyright (c) 2022 Airbyte, Inc., all rights reserved. | ||
*/ | ||
|
||
package io.airbyte.server.apis.factories; | ||
|
||
import io.airbyte.server.apis.LogsApiController; | ||
import io.airbyte.server.handlers.LogsHandler; | ||
import org.glassfish.hk2.api.Factory; | ||
|
||
public class LogsApiFactory implements Factory<LogsApiController> { | ||
|
||
private static LogsHandler logsHandler; | ||
|
||
public static void setValues(final LogsHandler logsHandler) { | ||
LogsApiFactory.logsHandler = logsHandler; | ||
} | ||
|
||
@Override | ||
public LogsApiController provide() { | ||
return new LogsApiController(logsHandler); | ||
} | ||
|
||
@Override | ||
public void dispose(final LogsApiController instance) { | ||
/* no op */ | ||
} | ||
|
||
} |
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
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
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.
Is this missing a path?
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.
Yes and no. Adding the path is not needed because it is inherited from the interface but I prefer to add it in order to avoid to have to look at the interface know the path when you are debugging. I have added it now.