-
Notifications
You must be signed in to change notification settings - Fork 28
Erb templating #56
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
Erb templating #56
Conversation
LGTM - @abonas can you please have a look as well? |
I will review this on Sunday |
CHANGES.rdoc
Outdated
This document describes the relevant changes between releases of the | ||
_hawkular-client_ project. | ||
|
||
=== V 0.3.0 (not released yet) |
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.
this section looks irrelevant for this PR?
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.
It's easier to keep the track of the changes this way, but if we want to be super correct, it hasn't been released yet, so it should not be in the CHANGES.rdoc
.
If you are asking about the 'All the clients have been unified into one', that is a left over from previous work and isn't logically related to this PR.
It's gone.
I was trying to review this, but this PR is very big and also not separated to commits that might explain the changes separately. I left couple of comments, but I am definitely having difficulties understanding the code and the intention here. It might needs to be broken into smaller pieces. Or explain better in description what exactly is being done here. |
Sorry for that, the PR isn't actually so big, most of the code is the VCR cassette templates. We can have a call if you want and I can describe the changes. The main intention here is not to have PRs like this in the future ;) It's quite annoying to overwrite the VCR cassettes in the git repo. On the other hand, having the stale data isn't good too. Heiko started to using the ERB templating in the VCR. This way, you can 'parametrize' some data (this feature https://relishapp.com/vcr/vcr/v/3-0-1/docs/cassettes/dynamic-erb-cassettes). This partially works. Issue with the dynamic cassettes is that there is no easy to keep them up to date with the real implementation. That's why I raised this PR, it still uses the ERB dynamic cassettes when running with no special evn vars, but at the same time, if running as For WebSocketVCR it's a built in feature in the gem, that can be turned on by Side note1: in Hawkular the feed id (basically the ID of the agent that collect the data from WildFly server) is a random UUID, so if you run the rspec against a live server, it'll be different all the time. Hence, the need for some parametrization of the data. |
why is "Removing the 'not yet released' changes in CHANGES.rdoc" a separate commit? |
yes, the feature itself and its benefits are quite clear :) |
It's an option for the |
Right, it doesn't make sense to introduce the change and then remove it withing the 1 PR, agreed. Can we just use the squash&merge thing on GitHub at the end? It's less work. (https://github.com/blog/2141-squash-your-commits) |
I never used it this way, I'd typically squash or git amend manually. does it make sense to do it for a change that shouldn't have entered in the first place? |
…ecord the templates against the currently running Hawkular instance.
… not compatible with us, so let's use the 1.2.x
Well, if you squash together
and
there will be no |
ok looking good :) |
@pilhuhn could you please merge? If you rebase your pr on this, it'll fix the travis failures |
This is basically the same PR as the #49 but now targeting directly the master branch (not the
0.3.0
integration branch)VCR_UPDATE=1
will now re-record the templates against the currently running Hawkular instance. By template I mean the recorded communication in yaml with<%= foobar =>
in it. This works for bothVCR
(done manually here https://git.io/vV5PM) andWebSocketVCR
(it's a feature that is turned on byreverse_substitution: true
)VCR_OFF=1
is still working and can be used for running the tests against the live Hawkular instance, w/o recording itPoint of the whole PR is not to over write the VCR tapes over and over again, because the feed_id is randomly generated, or for those UUIDs in tests.