-
Notifications
You must be signed in to change notification settings - Fork 900
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
Stop using deprecated names of hawkular-client gem #14543
Merged
chessbyte
merged 1 commit into
ManageIQ:master
from
israel-hdez:remove_usage_of_deprecated_constants
Mar 30, 2017
Merged
Changes from all commits
Commits
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
Stop using deprecated names of hawkular-client gem.
Version 2.9.0 of hawkular-client has deprecated some names. This is replacing the deprecated names with the current ones.
- Loading branch information
commit 71a7d668b9b5a88aec3e460efa46949d2d450197
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
2 changes: 1 addition & 1 deletion
2
app/models/manageiq/providers/hawkular/middleware_manager/refresh_parser.rb
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.
Can you have a problem in middleware since you are not setting the tenant explicitly?
I'm referring to:
https://github.com/hawkular/hawkular-client-ruby/blob/master/api_breaking_changes.rdoc#200
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.
good point, @Jiri-Kremser and @lucasponce can you please reply?
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.
If the code worked before, this change shouldn't break it. Nor the version bump to
2.9.0
@lucasponce it works because alerts don't enforce the hawkular tenant header, right?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.
@Jiri-Kremser yes, the Alerts client expects the tenant from the options, the default 'hawkular' tenant used by Middleware is set in the upper raw_client as far as I remember. Inside the Alerts rb there is not tenant manipulation.
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.
@lucasponce I'm not sure I'm seeing it set:
manageiq/app/models/manageiq/providers/hawkular/middleware_manager.rb
Line 275 in b7933dc
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.
ok, so the alerts server side does require the header being set:
So now I don't understand how this could have worked before.
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 think that the AlertsClient is generated from the with_provider_connection which should invoke the connect()
https://github.com/israel-hdez/manageiq/blob/71a7d668b9b5a88aec3e460efa46949d2d450197/app/models/manageiq/providers/hawkular/middleware_manager.rb#L197
and invoke the raw_connect with the default tenant.
I did a grep and I can't see where raw_alerts_connect is invoked, perhaps it is on a separate PR just for the Datawarehouse use cases ?
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 also grep'ed managui-ui-classic repo and found no references to it.
Anyway... The code using
raw_alerts_connect
will fail with an exception because we have this: https://github.com/hawkular/hawkular-client-ruby/blob/master/lib/hawkular/base_client.rb#L32I think it's dead code and I can safely remove it.