-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
WIP: completely rework the way imports work for the native types #385
WIP: completely rework the way imports work for the native types #385
Conversation
When running under Puppet Server, attempting to load files from puppet_x results in an autoload failure due to some stricter `$LOAD_PATH` rules. Whilst certainly a bug upstream reworking the native types like this allows the module to work under Puppet Server.
Actually this still doesn't solve the problems when running on an agent¸ only when running via |
OK, found out my error is happening due to |
Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests |
Hi @damoxc - this looks reasonable but I want contemplate it for a bit. By any chance are you at puppetconf this week? |
@@ -1,2 +0,0 @@ | |||
module PuppetX; end | |||
module PuppetX::Jenkins; end |
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.
Is the forward declaration causing an import problem?
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.
Not entirely, however it just cuts out the required number of bodged imports and number of files they need to be made in.
Hi @jhoblitt, sadly I'm not at PuppetConf. But contemplate away, I think I'll be doing the same this evening and probably hacking around a bit more tomorrow. I think also, the changes in the groovy script need some rethinking too, I was getting errors due to the explicit inclusion of checking for the github-oauth providers. |
@damoxc Aww, I'm guessing you don't have |
@jhoblitt I don't no, been working on sorting out getting Active Directory (:cry:) auth working. I think this is probably the simplest solution to allow for more providers to be added that come in plugins that may or may not be present, what do you think? Lose a bit of performance but the flexibility is worth it IMO. |
@damoxc I suspect you are right; mental bandwidth is still a bit limited by puppetconf. What are the comments for #14073 and #7788 referring to? They don't seem to be [public] PL PUP-XXXX or SERVER-XXXX ticket ids. |
@damoxc I think you missed a class name in I'm going to try to meet up with some of the puppet-server folks that are at puppetconf to discuss the loading issue. |
This is based off of some of @damoxc's work References voxpupuli#385
This is based off of some of @damoxc's work References voxpupuli#385
@jhoblitt Sorry, missed this over the weekend. Thanks for merging that 😄 I lifted the code directly from Given this method seems to be broken if the module isn't present in the environment that the master is in, a better method will have to be thought of. Would using relative imports be an option? |
@damoxc What version of puppetserver are you using? I'm testing with 1.1.1. |
@jhoblitt I was using puppetserver 2.1.1 (I'm currently using a snapshot of 2.1.2) along with puppet-agent 1.2.6 from PC1. |
Thanks. I'm currently trying to get beaker to play nice with the new aio paths. I've also opened a new Jira ticket for the path loading issue since I couldn't identify an existing on: https://tickets.puppetlabs.com/browse/SERVER-973 |
@damoxc Thus far is looks like the problem isn't triggered unless the new types are in the manifest. That's good news as it means it won't blow-up for anyone not using them. I also may have come across a short term fix until this is fixed in puppetserver. Could you try to modify your puppetserver.conf like this:
|
@damoxc I've decided to document the workaround in my last comment and ship |
@jhoblitt sounds good to me, although I would also document that if you are in a situation where your machine running puppetserver is using an environment that doesn't contain the |
I used this workaround here to work with directory environments:
|
When running under Puppet Server, attempting to load files from puppet_x
results in an autoload failure due to some stricter
$LOAD_PATH
rules. Whilstcertainly a bug upstream reworking the native types like this allows the module
to work under Puppet Server.
I haven't been able to test this when not running under Puppet Server as I don't have that available I'm afraid. The loading logic was shamelessly lifted from the
archive
module.