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

legacy_facts_and_language_server_start_issue #831

Closed
HimTiw31822 opened this issue Apr 11, 2023 · 5 comments
Closed

legacy_facts_and_language_server_start_issue #831

HimTiw31822 opened this issue Apr 11, 2023 · 5 comments
Labels

Comments

@HimTiw31822
Copy link

What Versions are you running?

OS Version:Windows 11
VSCode Version:1.77.1
Puppet Extension Version:1.40.0
PDK Version:2.7.1

What You Are Seeing?

Well am facing 2 issue with vscode concurrently.

  1. Unable to see legacy facts present in the module, need to update them in anticipation for enterprise puppet upgrade.
  2. Lanuguage server doesn't start for any other version(Connection to server got closed. Server will restart) apart from Puppet version 7.23.0

What is Expected?

Language server should work for older puppet versions as well and Legacy facts should be highlighted as part of Lint if present in module.(I am Aware that Legacy_fact_check if now part of Puppet-Lint)

How Did You Get This To Happen? (Steps to Reproduce)

  • Currently working puppet version parceled with pdk 2.7.1
    image
  • Select any othe version from the list, the window will reload , in my case i have selected version 7.20.0
    Following Error will occur while starting the language server.
    vscode_puppetversion_error.docx

Output Log

I have attached the log file for rerference , here is the jist for the same.

Info - 1:56:59 PM] Connection to server got closed. Server will restart.
C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.7.0/gems/puppet-7.23.0-x64-mingw32/lib/puppet/file_system/uniquefile.rb:17:in <top (required)>': Could not autoload puppet/indirector/file_metadata/selector: superclass mismatch for class Uniquefile (Puppet::Error) from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.7.0/gems/puppet-7.23.0-x64-mingw32/lib/puppet/util.rb:12:in require_relative'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.7.0/gems/puppet-7.23.0-x64-mingw32/lib/puppet/util.rb:12:in <top (required)>' from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.7.0/gems/puppet-7.23.0-x64-mingw32/lib/puppet.rb:16:in require_relative'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.7.0/gems/puppet-7.23.0-x64-mingw32/lib/puppet.rb:16:in <top (required)>' from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.7.0/gems/puppet-7.23.0-x64-mingw32/lib/puppet/file_serving/metadata.rb:1:in require_relative'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.7.0/gems/puppet-7.23.0-x64-mingw32/lib/puppet/file_serving/metadata.rb:1:in <top (required)>' from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.7.0/gems/puppet-7.23.0-x64-mingw32/lib/puppet/indirector/file_metadata/selector.rb:1:in require_relative'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.7.0/gems/puppet-7.23.0-x64-mingw32/lib/puppet/indirector/file_metadata/selector.rb:1:in <top (required)>' from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.7.0/gems/puppet-7.20.0-x64-mingw32/lib/puppet/util/autoload.rb:78:in load'
vscode_puppetversion_error.docx

@helge000
Copy link

Same here; I tried several different PDK versions to check: same result

@stefanschulte
Copy link

+1
The extension crashes at start when any other puppet agent version other than "latest" is selected/pinned.

OS Version:macOS 13.3.1
VSCode Version:1.78.0
Puppet Extension Version:1.4.0
PDK Version:2.7.1

@jordanbreen28
Copy link
Contributor

Hi @HimTiw31822 - I'm going to start digging into this now. Just a quick question - does this still occur with v1.4.2 of puppet vscode extension?

@jordanbreen28
Copy link
Contributor

jordanbreen28 commented Nov 16, 2023

@HimTiw31822 re the legacy facts check, the current release of vscode language server does not consume the puppet-lint release which introduced these checks which explains why they are not firing. This will be rectified in the next release of puppet-vscode, thanks for bringing this to our attention.
Will update on the start issue as soon as I can.

@jordanbreen28
Copy link
Contributor

@HimTiw31822 Just a quick update.
The error superclass mismatch for class Uniquefile (Puppet::Error) was a known bug with the puppet 7.x versions bundled in pdk 2.x, and unrelated to the puppet-vscode extension.
Fortunately, an upgrade to pdk 3.x will resolve these issues for you.
You can find details about upgrading here. I have verified that the extension works on both puppet versions bundled into pdk 3.x.

I will work on getting a release out shortly which will include the puppet-lint legacy fact check.
So for now, I'll go ahead and close this issue. Thanks again for raising this with us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants