Skip to content
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

Outdated docs links in deprecation warnings #9378

Open
justinstoller opened this issue Jun 4, 2024 · 3 comments
Open

Outdated docs links in deprecation warnings #9378

justinstoller opened this issue Jun 4, 2024 · 3 comments
Labels
accepted Valid issue that we intend to work on when we have the bandwidth bug Something isn't working

Comments

@justinstoller
Copy link
Member

Describe the Bug

puppetserver 7.16 logs a deprecation warning with a broken URL:

2024-03-11T17:43:29.958-05:00 WARN [qtp1601237113-43] [puppetserver] Puppet The function 'hiera' is deprecated in favor of using 'lookup'. See https://puppet.com/docs/puppet/7.29/deprecated_language.html (file & line not available)

This convention of using Puppet's minor version (see https://github.com/puppetlabs/puppet/blob/main/lib/hiera/puppet_function.rb#L67) in a url doesn't seem to redirect properly (or maybe the language deprecation page has moved? I couldn't get any variant of the url to work or find the page I assumed it was linking to)

Expected Behavior

Deprecations with valid links

Steps to Reproduce

See linked ticket below

Environment

See linked ticket below

Additional Context

This was originally opened as a Puppet Server ticket here:
puppetlabs/puppetserver#2835

I'm happy to open a PR but I can't figured out what the links should be.
I searched the Puppet 7.x codebase and found a couple other similarly constructed urls which are also broken:

➜  rg 'puppet\.com.*deprec' ruby/puppet/lib/
ruby/puppet/lib/hiera/puppet_function.rb
65:      message += ' '+ _("See https://puppet.com/docs/puppet/%{minor_version}/deprecated_language.html") %

ruby/puppet/lib/puppet/network/http/request.rb
68:    # YAML in network requests is not supported. See http://links.puppet.com/deprecate_yaml_on_network

ruby/puppet/lib/puppet/pops/issues.rb
599:    _("Use of 'import' has been discontinued in favor of a manifest directory. See http://links.puppet.com/puppet-import-deprecation")
631:    _("Node inheritance is not supported in Puppet >= 4.0.0. See http://links.puppet.com/puppet-node-inheritance-deprecation")

ruby/puppet/lib/puppet/type/file/ensure.rb
50:      [deprecated](https://docs.puppet.com/puppet/4.3/deprecated_language.html)

ruby/puppet/lib/puppet/parser/functions/hiera_array.rb
69:See https://puppet.com/docs/puppet/#{Puppet.minor_version}/deprecated_language.html.

ruby/puppet/lib/puppet/parser/functions/hiera_hash.rb
79:See  https://puppet.com/docs/puppet/#{Puppet.minor_version}/deprecated_language.html.

ruby/puppet/lib/puppet/parser/functions/hiera.rb
81:See https://puppet.com/docs/puppet/#{Puppet.minor_version}/deprecated_language.html.

ruby/puppet/lib/puppet/parser/ast/node.rb
7:      raise Puppet::DevError, _("Node inheritance is removed in Puppet 4.0.0. See http://links.puppet.com/puppet-node-inheritance-deprecation")
@IngridaCazers
Copy link

@justinstoller I've been investigating this issue. The Puppet 5.5 documentation had a topic named "Deprecated language features," which described the replacement of hiera functions with the lookup function:

https://www.puppet.com/docs/puppet/5.5/deprecated_language

The topic was not maintained in the documentation set in subsequent releases. Would it be helpful to update the software to point to this link?

@AriaXLi AriaXLi added the accepted Valid issue that we intend to work on when we have the bandwidth label Oct 29, 2024
@AriaXLi
Copy link
Contributor

AriaXLi commented Oct 29, 2024

@justinstoller @IngridaCazers We think it would be most helpful to have the software point to this page: https://www.puppet.com/docs/puppet/8/hiera_migrate since it talks about upgrading to Hiera 5

@IngridaCazers
Copy link

@AriaXLi @justinstoller Thanks, Aria, for this input. Justin, if you agree that this link would be appropriate, the software could be updated to use that link. My only comment is that we could use the "latest" string in the link instead of mentioning Puppet 8 to help ensure that the link will still work in future releases. If we add "latest," the link will look like this:
https://www.puppet.com/docs/puppet/latest/hiera_migrate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Valid issue that we intend to work on when we have the bandwidth bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants