-
Notifications
You must be signed in to change notification settings - Fork 104
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
Error in pdk release publish #1210
Comments
@coreone interesting find. I'm surprised this hasn't popped up before now. We will investigate and get back to you shortly. |
I edited the # bundle exec pdk release publish --skip-changelog --skip-dependency --skip-documentation
pdk (INFO): Releasing module-name - from version 4.0.0
pdk (INFO): Uploading tarball to puppet forge...
pdk (INFO): Publish to Forge was successful |
What I find interesting here is that URI should be available by default. I'm triaging this right now and cannot replicate. Just to confirm, are you running PDK as a gem via a modules Gemfile? |
I have had an issue in a Debian-based container doing https://github.com/broadinstitute/puppet-certificates |
Interesting thanks for the additional info. I'm actually working on removing the code causing you issues at the moment so hopefully this will be resolved in the next release.. however I'd like to get to the bottom of what is happening in your scenario and see if we can find a workaround. |
As reported in #1210, in some situations pdk will fail to publish a module due to a missing require for URI. For this specific occurance we will eventually move to the forge SDK which will elimiate the issue. However, due to some dependency constraints we cannot to that yet. This change simply adds a new require for uri, which will solve the issue described above until we are able to migrate to the Forge SDK.
Fixed in #1220 |
Describe the bug
When running
pdk release publish
, a Ruby error occurs when trying to call theURI
method:To Reproduce
pdk
pdk release publish --skip-changelog --skip-dependency --skip-documentation --force --forge-token='abc123'
Expected behavior
This particular example should return an access denied error due to the use of a fake forge token. Using a real token should publish the module to the forge.
Additional context
bundle exec
)ruby -v
):ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-linux-gnu]
pdk --version
):2.6.1
** To fix the error **
It looks like the only thing needed to fix this issue is to include a
require 'uri'
at the top of thelib/pdk/module/release.rb
file. When I do that locally in a test instance, running thepdk release publish --skip-changelog --skip-dependency --skip-documentation --force --forge-token='abc123'
command returns as I would expect:The text was updated successfully, but these errors were encountered: