You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2022/09/07 01:50:50 UTC
[GitHub] [gobblin] AndyJiang99 opened a new pull request, #3551: [GOBBLIN-1695] Fix: Failure to add spec executors doesn't block deployment
AndyJiang99 opened a new pull request, #3551:
URL: https://github.com/apache/gobblin/pull/3551
Dear Gobblin maintainers,
Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
### JIRA
- [ ] My PR addresses the following [Gobblin JIRA](https://issues.apache.org/jira/browse/GOBBLIN/) issues and references them in the PR title. For example, "[GOBBLIN-XXX] My Gobblin PR"
- https://issues.apache.org/jira/browse/GOBBLIN-1695
### Description
- [ ] Here are some details about my PR, including screenshots (if applicable):
### Tests
- [ ] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
### Commits
- [ ] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
1. Subject is separated from body by a blank line
2. Subject is limited to 50 characters
3. Subject does not end with a period
4. Subject uses the imperative mood ("add", not "adding")
5. Body wraps at 72 characters
6. Body explains "what" and "why", not "how"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [gobblin] Will-Lo commented on a diff in pull request #3551: [GOBBLIN-1695] Fix: Failure to add spec executors doesn't block deployment
Posted by GitBox <gi...@apache.org>.
Will-Lo commented on code in PR #3551:
URL: https://github.com/apache/gobblin/pull/3551#discussion_r966181310
##########
gobblin-modules/gobblin-azkaban/src/main/java/org/apache/gobblin/service/modules/orchestration/AzkabanClient.java:
##########
@@ -130,10 +138,12 @@ private void initializeClient() throws AzkabanClientException {
private void initializeSessionManager() throws AzkabanClientException {
if (sessionManager == null) {
- this.sessionManager = new AzkabanSessionManager(this.httpClient,
- this.url,
- this.username,
- this.password);
+ try {
+ this.sessionManager = new AzkabanSessionManager(this.httpClient, this.url, this.username, this.password);
+ }
+ catch(Exception e) {
+ log.error("Failed to initialize session manager due to: ", e);
Review Comment:
I don't see the SessionManager actually throwing anything in the constructor so the try/catch is redundant
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [gobblin] codecov-commenter commented on pull request #3551: [GOBBLIN-1695] Fix: Failure to add spec executors doesn't block deployment
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #3551:
URL: https://github.com/apache/gobblin/pull/3551#issuecomment-1238824880
# [Codecov](https://codecov.io/gh/apache/gobblin/pull/3551?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#3551](https://codecov.io/gh/apache/gobblin/pull/3551?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c24a7d1) into [master](https://codecov.io/gh/apache/gobblin/commit/e0d3c78d8d29435a7f68c4c086f605d6e0c9072c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e0d3c78) will **increase** coverage by `3.81%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #3551 +/- ##
============================================
+ Coverage 46.62% 50.44% +3.81%
+ Complexity 10456 5693 -4763
============================================
Files 2084 1043 -1041
Lines 81620 39797 -41823
Branches 9103 4471 -4632
============================================
- Hits 38058 20076 -17982
+ Misses 40043 17968 -22075
+ Partials 3519 1753 -1766
```
| [Impacted Files](https://codecov.io/gh/apache/gobblin/pull/3551?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...t/version/TimestampedDatasetStateStoreVersion.java](https://codecov.io/gh/apache/gobblin/pull/3551/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1kYXRhLW1hbmFnZW1lbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dvYmJsaW4vZGF0YS9tYW5hZ2VtZW50L3ZlcnNpb24vVGltZXN0YW1wZWREYXRhc2V0U3RhdGVTdG9yZVZlcnNpb24uamF2YQ==) | `27.77% <0.00%> (-5.56%)` | :arrow_down: |
| [.../apache/gobblin/runtime/api/JobExecutionState.java](https://codecov.io/gh/apache/gobblin/pull/3551/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1ydW50aW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3J1bnRpbWUvYXBpL0pvYkV4ZWN1dGlvblN0YXRlLmphdmE=) | `79.43% <0.00%> (-0.94%)` | :arrow_down: |
| [.../java/org/apache/gobblin/runtime/api/FlowSpec.java](https://codecov.io/gh/apache/gobblin/pull/3551/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1ydW50aW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3J1bnRpbWUvYXBpL0Zsb3dTcGVjLmphdmE=) | `40.10% <0.00%> (-0.84%)` | :arrow_down: |
| [...apache/gobblin/hive/writer/HiveMetadataWriter.java](https://codecov.io/gh/apache/gobblin/pull/3551/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1oaXZlLXJlZ2lzdHJhdGlvbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ29iYmxpbi9oaXZlL3dyaXRlci9IaXZlTWV0YWRhdGFXcml0ZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...anagement/copy/replication/ConfigBasedDataset.java](https://codecov.io/gh/apache/gobblin/pull/3551/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1kYXRhLW1hbmFnZW1lbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dvYmJsaW4vZGF0YS9tYW5hZ2VtZW50L2NvcHkvcmVwbGljYXRpb24vQ29uZmlnQmFzZWREYXRhc2V0LmphdmE=) | `68.87% <0.00%> (ø)` | |
| [...n/service/modules/orchestration/AzkabanClient.java](https://codecov.io/gh/apache/gobblin/pull/3551/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1tb2R1bGVzL2dvYmJsaW4tYXprYWJhbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ29iYmxpbi9zZXJ2aWNlL21vZHVsZXMvb3JjaGVzdHJhdGlvbi9BemthYmFuQ2xpZW50LmphdmE=) | | |
| [...ice/modules/orchestration/AzkabanSpecProducer.java](https://codecov.io/gh/apache/gobblin/pull/3551/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1tb2R1bGVzL2dvYmJsaW4tYXprYWJhbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ29iYmxpbi9zZXJ2aWNlL21vZHVsZXMvb3JjaGVzdHJhdGlvbi9BemthYmFuU3BlY1Byb2R1Y2VyLmphdmE=) | | |
| [...vice/modules/core/GobblinServiceConfiguration.java](https://codecov.io/gh/apache/gobblin/pull/3551/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1zZXJ2aWNlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3NlcnZpY2UvbW9kdWxlcy9jb3JlL0dvYmJsaW5TZXJ2aWNlQ29uZmlndXJhdGlvbi5qYXZh) | | |
| [...oogle/webmaster/GoogleWebmasterDayPartitioner.java](https://codecov.io/gh/apache/gobblin/pull/3551/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1tb2R1bGVzL2dvb2dsZS1pbmdlc3Rpb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dvYmJsaW4vaW5nZXN0aW9uL2dvb2dsZS93ZWJtYXN0ZXIvR29vZ2xlV2VibWFzdGVyRGF5UGFydGl0aW9uZXIuamF2YQ==) | | |
| [.../apache/gobblin/config/client/ConfigClientCLI.java](https://codecov.io/gh/apache/gobblin/pull/3551/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1jb25maWctbWFuYWdlbWVudC9nb2JibGluLWNvbmZpZy1jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dvYmJsaW4vY29uZmlnL2NsaWVudC9Db25maWdDbGllbnRDTEkuamF2YQ==) | | |
| ... and [1039 more](https://codecov.io/gh/apache/gobblin/pull/3551/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [gobblin] Will-Lo commented on a diff in pull request #3551: [GOBBLIN-1695] Fix: Failure to add spec executors doesn't block deployment
Posted by GitBox <gi...@apache.org>.
Will-Lo commented on code in PR #3551:
URL: https://github.com/apache/gobblin/pull/3551#discussion_r965118960
##########
gobblin-modules/gobblin-azkaban/src/main/java/org/apache/gobblin/service/modules/orchestration/AzkabanClient.java:
##########
@@ -130,10 +137,12 @@ private void initializeClient() throws AzkabanClientException {
private void initializeSessionManager() throws AzkabanClientException {
if (sessionManager == null) {
- this.sessionManager = new AzkabanSessionManager(this.httpClient,
- this.url,
- this.username,
- this.password);
+ try {
+ this.sessionManager = new AzkabanSessionManager(this.httpClient, this.url, this.username, this.password);
+ }
+ catch(Exception e) {
+ log.error("Failed to initialize session manager due to: " + e);
Review Comment:
Same thing here, use the log.error throwable argument like I mentioned above.
https://logging.apache.org/log4j/2.x/log4j-api/apidocs/org/apache/logging/log4j/Logger.html#error-java.lang.CharSequence-java.lang.Throwable-
##########
gobblin-modules/gobblin-azkaban/src/main/java/org/apache/gobblin/service/modules/orchestration/AzkabanClient.java:
##########
@@ -117,7 +117,14 @@ protected AzkabanClient(String username,
.withWaitStrategy(WaitStrategies.exponentialWait(60, TimeUnit.SECONDS))
.withStopStrategy(StopStrategies.stopAfterAttempt(3))
.build();
- this.sessionId = this.sessionManager.fetchSession();
+ try {
+ this.sessionId = this.sessionManager.fetchSession();
+ }
+ catch (Exception e) {
+ this.sessionCreationTime = -1;
+ log.error("Failed to fetch session in constructor due to " + e);
Review Comment:
Can you rewrite this to, `log.error("Failed to fetch session during initialization due to ", e)`
If you concat the exception with the log like this, it won't print out the stack trace, and under the hood it just transforms the exception itself to the object reference.
##########
gobblin-modules/gobblin-azkaban/src/main/java/org/apache/gobblin/service/modules/orchestration/AzkabanSpecProducer.java:
##########
@@ -84,6 +83,18 @@ public void close() throws IOException {
public Future<?> addSpec(Spec addedSpec) {
// If project already exists, execute it
try {
+ // If encountered Azkaban authentication issue on start up, attempt authentication again.
+ // If still fails, only fail this specific flow
+ if (_sessionId == null) {
+ try {
+ attemptAzkabanAuthentication();
+ }
+ catch (RuntimeException e) {
Review Comment:
Usually we don't need to catch and rethrow the same type of exception, we can try leaving this code as-is for now and letting the Azkaban client handle this.
##########
gobblin-modules/gobblin-azkaban/src/main/java/org/apache/gobblin/service/modules/orchestration/AzkabanSpecProducer.java:
##########
@@ -47,14 +46,14 @@ public class AzkabanSpecProducer implements SpecProducer<Spec>, Closeable {
public AzkabanSpecProducer(Config config, Optional<Logger> log) {
this._config = config;
try {
- // Initialize Azkaban client / producer and cache credentials
- String azkabanUsername = _config.getString(ServiceAzkabanConfigKeys.AZKABAN_USERNAME_KEY);
- String azkabanPassword = getAzkabanPassword(_config);
- String azkabanServerUrl = _config.getString(ServiceAzkabanConfigKeys.AZKABAN_SERVER_URL_KEY);
-
- _sessionId = AzkabanAjaxAPIClient.authenticateAndGetSessionId(azkabanUsername, azkabanPassword, azkabanServerUrl);
- } catch (IOException | EncoderException e) {
- throw new RuntimeException("Could not authenticate with Azkaban", e);
+ attemptAzkabanAuthentication();
+ }
+ catch (RuntimeException e) {
+ // Allow Azkaban authentication errors on start up, but just log the error so GaaS can still start
+ _sessionId = null;
+ if (log.isPresent()) {
+ log.get().error("Could not authenticate with Azkaban due to: {}".format(e.toString()));
Review Comment:
Same thing here
##########
gobblin-modules/gobblin-azkaban/src/main/java/org/apache/gobblin/service/modules/orchestration/AzkabanSpecProducer.java:
##########
@@ -84,6 +83,18 @@ public void close() throws IOException {
public Future<?> addSpec(Spec addedSpec) {
// If project already exists, execute it
try {
+ // If encountered Azkaban authentication issue on start up, attempt authentication again.
Review Comment:
What happens if we didn't modify this code at all? I thought it should auto attempt the authentication again because the sessionId is null, and the sessionCreationTime is `-1` which will fulfill the renew requirements before making a API request.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [gobblin] Will-Lo merged pull request #3551: [GOBBLIN-1695] Fix: Failure to add spec executors doesn't block deployment
Posted by GitBox <gi...@apache.org>.
Will-Lo merged PR #3551:
URL: https://github.com/apache/gobblin/pull/3551
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [gobblin] Will-Lo commented on a diff in pull request #3551: [GOBBLIN-1695] Fix: Failure to add spec executors doesn't block deployment
Posted by GitBox <gi...@apache.org>.
Will-Lo commented on code in PR #3551:
URL: https://github.com/apache/gobblin/pull/3551#discussion_r966179462
##########
gobblin-modules/gobblin-azkaban/src/main/java/org/apache/gobblin/service/modules/orchestration/AzkabanClient.java:
##########
@@ -130,10 +138,12 @@ private void initializeClient() throws AzkabanClientException {
private void initializeSessionManager() throws AzkabanClientException {
if (sessionManager == null) {
- this.sessionManager = new AzkabanSessionManager(this.httpClient,
Review Comment:
If we follow the code here I don't think this is needed, it's just constructing the object so it should never throw.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org