Skip to content
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

Made changes to analyze execution with an external analyzer like Dr. Elephant #657

Merged
merged 1 commit into from Jun 4, 2016

Conversation

rajagopr
Copy link
Contributor

When configured a button will appear in the execution details page which will query the
the external analyzer with the execution flow url.

@akshayrai
Copy link

@rajagopr, can you post a snapshot of the UI where this button/link appears?

@rajagopr
Copy link
Contributor Author

Attaching a snapshot for reference

dr_elephant

@@ -25,6 +25,10 @@ executor.flow.threads=30
jetty.connector.stats=true
executor.connector.stats=true

# External analyzer settings
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add more comment? e.g. how the %s works?
Comment out these configs. Users can uncomment and customize.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@HappyRay
Copy link
Contributor

Could you add your recent changes to this pull request to facilitate a faster review?

@rajagopr
Copy link
Contributor Author

Ok, I have pushed my recent changes. Please review.

* last line, it will appear as the first button on the right.
*
* Tab focus is disabled on 'analyzerButton' by setting tabindex to -1
* for the following reason. Whenever two buttons are displayed on the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will completely disable the ability to focus on the analyzer button, right?

Would it be a better trade off to have the button show up next to the Stabs tab? This way the code reflects the same order as the order of the UI elements and tab order is more natural.

Given that I don't expect keyboard based navigation to be widely used, I am more concerned about the code readability.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will look like the following. Not too bad IMO.
I will go ahead with this.

image

@HappyRay
Copy link
Contributor

Thanks for making the suggested changes!

It looks much better now. I like the comments you added.

I have a pull request pending #659 which added some unit testing facilities that can be used to test UI elements. You may consider taking advantage of that if you would like to go extra miles in testing.

@rajagopr
Copy link
Contributor Author

Please review. I have made the required changes.

Pending: The UI tests. I will try to add this tomorrow.

case "%url":
return buildExternalAnalyzerURL(req, url, pattern);
default:
logger.debug("Pattern configured is not supported. "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice log.

Consider making it logger.error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@HappyRay
Copy link
Contributor

The test code looks more comprehensive and easier to understand now. I like the comments you added to the tests. Thanks!

@HappyRay
Copy link
Contributor

You may want to wait until I merge my pull request I mentioned earlier to take advantage of the UI test capabilities if you would like to give it a try.

@rajagopr
Copy link
Contributor Author

rajagopr commented Jun 1, 2016

Sure, I will wait until the UI test framework is merged in.

@HappyRay
Copy link
Contributor

HappyRay commented Jun 1, 2016

My pull request was merged yesterday.

@rajagopr
Copy link
Contributor Author

rajagopr commented Jun 1, 2016

Thanks! I will add the test.

@rajagopr
Copy link
Contributor Author

rajagopr commented Jun 2, 2016

Please review, I have added the UI test.

try {
encodedFlowExecUrl = URLEncoder.encode(flowExecutionURL, "UTF-8");
} catch(UnsupportedEncodingException e) {
e.printStackTrace();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this error be printed to a log?
This exception shouldn't happen though. It should have been caught by the unit test you wrote.

@HappyRay
Copy link
Contributor

HappyRay commented Jun 3, 2016

LGTM. Thanks!

I have added only one small suggestion.

Could you please debase and collapse the commits into one?

The feature is turned off by default and can be enabled by configuring properties
in 'azkaban.properties'. When turned on a button will appear in the flow execution
details page which can query the external analyzer with the flow execution id.

Please refer to 'azkaban.properties' to know more about the configuration details.
@rajagopr
Copy link
Contributor Author

rajagopr commented Jun 3, 2016

Ok done. Please merge.

Note: An unrelated test has failed on the CI build. Did not see an option to re-trigger the build without a push.

:azkaban-execserver:test
azkaban.execapp.event.BlockingStatusTest > testMultipleWatchers FAILED
java.lang.AssertionError at BlockingStatusTest.java:127
71 tests completed, 1 failed, 40 skipped
:azkaban-execserver:test FAILED

@HappyRay
Copy link
Contributor

HappyRay commented Jun 4, 2016

You can login using your github account to try the test again. I am not sure if you need to be a project admin to do that though. I restarted the test.
Did you take a look at the failed test? Is it a flaky test?

@HappyRay HappyRay merged commit fed34ca into azkaban:master Jun 4, 2016
@rajagopr rajagopr deleted the analyze_execution branch June 4, 2016 02:23
KyleFung added a commit to KyleFung/azkaban that referenced this pull request Dec 14, 2016
)

URLs, which are referenced by names known as a "topic" are specified in
azkaban.properties
For example if you want an external URL under the topic of
"arbitraryName", you would put the following line into
azkaban.properties:
azkaban.server.external.arbitraryName.url=http://someURL.com

Additionally, an external log viewer can then be specified using the
parameter azkaban.server.external.logviewer.topic=arbitraryName
This line would reference the URL specified earlier in this description
(http://someURL.com) as an external log viewer.

A similar behavior has been added for specifying external analyzers, ie.
azkaban.server.external.analyzer.topic=arbitraryName

Note that this commit is NOT backwards compatible and deprecates the
mechanism created in (azkaban#657). That commit specifies external analyzers
with the config
execution.external.link.url=http://someURL.com/?%url

This must now be specified as
azkaban.server.external.arbitraryName.url=http://someURL.com/?${url}
azkaban.server.external.analyzer.topic=arbitraryName
KyleFung added a commit that referenced this pull request Dec 15, 2016
)

URLs, which are referenced by names known as a "topic" are specified in
azkaban.properties
For example if you want an external URL under the topic of
"arbitraryName", you would put the following line into
azkaban.properties:
azkaban.server.external.arbitraryName.url=http://someURL.com

Additionally, an external log viewer can then be specified using the
parameter azkaban.server.external.logviewer.topic=arbitraryName
This line would reference the URL specified earlier in this description
(http://someURL.com) as an external log viewer.

A similar behavior has been added for specifying external analyzers, ie.
azkaban.server.external.analyzer.topic=arbitraryName

Note that this commit is NOT backwards compatible and deprecates the
mechanism created in (#657). That commit specifies external analyzers
with the config
execution.external.link.url=http://someURL.com/?%url

This must now be specified as
azkaban.server.external.arbitraryName.url=http://someURL.com/?${url}
azkaban.server.external.analyzer.topic=arbitraryName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants