-
Notifications
You must be signed in to change notification settings - Fork 105
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
Rebase plugin from zip patch #235
Rebase plugin from zip patch #235
Conversation
@bastelfreak, may we ask you for assistance? I've tried to fix the problem with the 'create plugin resource with url' unit test (spec/acceptance/grafana_plugin_spec.rb) by installing a proper plugin. As far as my local tests with Grafana have shown, the minimal manifest achieves the right thing and the plugin should be installed (confirmed by actions report). However, the shell command listing all installed Grafana plugins does not include it. Instead, only 'grafana-simple-json-datasource' is shown, which is probably installed by previous unit tests. Before this PR I've never had to look into Ruby unit tests, so I'm clueless what could have gone wrong where. In case the problem roots with the Docker images and neither the Puppet code or Ruby unit tests, then I possibly ask for too much of your time analyzing it for us - my appoligies. Best regards, /cc @apetzo |
hey @XMol . can you rebase against our current master branch? The history in the PR currently contains many commits that are already merged, that makes it hard to read/debug. If you need any help please join our IRC channel #voxpupuli on freenode or #voxpupuli on http://slack.puppet.com/ |
I thought I did that, but I'll try again... |
Now I see what I've done wrong. Instead of rebasing the patch branch onto master I rebased master onto it. Now I'll redo that without setting myself as committer, which should hopefully reduce the comparison overview to just the actual new commits. Sorry for all the noise. |
And lastly, I should rebase onto the master branch for the repository we set up the pull request for (instead of bfraser/grafana). Now the history/comparison looks sensible. |
thanks for the rebase! Can you take a look at the failing tests? |
Hi @bastelfreak, that's the thing we asked you for help on previously. The error is still the same: Even though the Grafana plugin was successfully installed according to the output of the applied temporary Puppet manifest, |
I've tried to increase the verbosity of the whole procedure to possibly identify what went wrong, but failed to find an explanation for why the installed plugin is not listed. Snippet from latest CentOS 6 actions log lines 7301..7305:
So "grafana-simple-json-datasource" is found to be installed already (by previous tests) and "grafana-worldmap-panel" is supposedly installed successfully this time. However, the verification for that fails...
I've double-checked in local tests that...
At this point, I'm out of ideas on how I could debug this any further or what could be the underlying issue, so I again formally ask you, @bastelfreak, for assistance. |
I've no idea why it fails :( Maybe one of the others @voxpupuli/collaborators has some more knowledge about Grafana |
Is there a path Grafana plugins get installed to you could check? I'm not sure if the plugin is installed and the grafana-cli just isn't seeing it (I see the message it needs a refresh after installing plugins), or if it isn't getting downloaded at all. |
Hi Lucy, thanks for the idea, there is indeed a path we could just look into. The notice about the failed reload is not critical. The Docker image has no Grafana service prepared and for the installation of the plugin a reload of the service is not strictly necessary (but, as is evident, Puppet would reload the service under normal circumstances). I'll add an |
So, |
@XMol My only suggestion is get the integration test running locally. Running it with |
Hi Will, I'm sorry, I don't know how to do that. I've never worked with Beaker before and neither do I have any experience with Git actions. So installing the plugin by shell command works as expected. Then I have one more idea: Maybe puppet isn't run with |
Hmm, no, my idea must be wrong. |
With the last two commits, it seems clear that there is a difference between running I say "same shell command", but that strictly isn't true. Puppet calls Does someone else have any more ideas? I'd pick up on Will's suggestion, if I knew how to do that - if you can point me to a tutorial for such situations, then I could follow it up once I've learned the ropes. But still, that would only speed up the debugging, while I'm lost on what to debug next... |
@XMol I'm coming into this blind with just a debugging idea. Usually, when there is a difference between running a command on the CLI and Puppet running the command, it turns out to be related to environment variables. Puppet exec resources strip ALL environment variables out, including some that are important to some CLI utilities, such as HOME and USER. You might be able to check for this by trying to see if running the command in a sanitized environment results in the same thing Puppet sees when it runs it. E.g.
|
Following Reid's hint:
Looks like the |
To keep everyone posted, thanks to the very kind help of @crazymind1337, I now have a functional setup to reproduce the same errors as during the GitHub actions cycle locally. Indeed, installing the plugin with the |
We found out: The problem of the failing test is not the puppet code. It is the way the tests are applied. I didn't know that every test is applied to the same docker container, but it is happening. Within |
hey all. thanks for the awesome work! Is this still WIP or can we review and merge it? |
Alright, I'm sorry that I could not continue this work earlier, but here it finally is. Thanks to the extensive assisstance by @crazymind1337, the issue was found to not be with the additional Puppet code, but with the acceptance tests. In particular, that test which downgraded from the latest stable Grafana version onto 6.0.0-beta3 (specifically). As it turns out, installing a plugin by HTTP-url is broken for this Grafana version. So what I now have done with this pull request:
Hopefully this will met the expectations voxpupuli has towards PRs, while the work previously invested by @jwbraucher is honored. If so, yes @bastelfreak, you may accept it now. 🙂 Best regards, /cc @apetzo |
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.
looks perfect to me. I will keep this open for a few days in case someone else want's to review it as well.
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.
Overall 👍
If there a no further objections I will merge this. |
Pull Request (PR) description
This Pull Request is a continuation of #217, which was in need of a rebase onto master since Aug 2020.
This Pull Request (PR) fixes the following issues
Fixes #173
Closes #217