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

Integration Tests fail due to Ubuntu 16.04 tests being decommissioned. #1729

Closed
DataBeardAdmin opened this issue Oct 12, 2021 · 9 comments · Fixed by #1730 or dsccommunity/DscResource.DocGenerator#103
Labels
blocking release The issue or pull request is blocking the next release. Higher priority than label 'High priority'. enhancement The issue is an enhancement request.

Comments

@DataBeardAdmin
Copy link
Contributor

The integration tests as currently defined fail due to the Ubuntu 16.04 environment being phased out. When I looked through the logs, I found the following reference suggesting that this version is out of support: Ubuntu 16.04 environment will be removed on September 20, 2021.

@johlju johlju added blocking release The issue or pull request is blocking the next release. Higher priority than label 'High priority'. enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community. labels Oct 13, 2021
@johlju
Copy link
Member

johlju commented Oct 13, 2021

Yes, they are running brownouts now. They moved up the schedule but will be removed in a few days. There is an issue with just changing image - something broke (think it was GitVersion that failed). But needs to be resolved.

@johlju
Copy link
Member

johlju commented Oct 13, 2021

When using Ubuntu 18.04 as the build worker the task Generate_Conceptual_Help fails with error:

Line |
2991 |  … exampleContent = Get-ResourceExampleAsText -Path $resourceExamplePath
     |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot bind argument to parameter 'Message' because it is null.

https://dev.azure.com/dsccommunity/SqlServerDsc/_build/results?buildId=5146&view=logs&j=bce26a94-9049-50eb-6c1c-385ccbec51f9&t=512e4b73-7a3e-57af-0534-ae809c1351da&l=204

Should probably b e easy to find if debugging in a WSL Ubuntu 18.04.

@nabrond
Copy link
Contributor

nabrond commented Oct 17, 2021

I dug into this issue a bit today. The issue, at least in my Ubuntu 18.04 WSL deployment, is that the locale is not configured for a specific language.

PS ~> $host

Name             : ConsoleHost
Version          : 7.1.5
InstanceId       : 5069a095-5fcb-4b29-b5f0-1d0800e37568
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   :
CurrentUICulture :
PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled  : True
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace

NOTICE: The value for property "CurrentCulture" is blank. This is what PowerShell returns when calling Get-UICulture.

This is causing the call for Get-LocalizedData to not return the proper localized strings, but rather a module manifest. When the call to Get-ResourceExampleAsText attempts to use these localized strings to report missing examples, it fails to get a localized string and thus raises this error.

To fix this in my lab, I was required to run the following commands before restarting the shell:

$ sudo update-locale en_US.utf8
$ sudo locale-gen

I need to keep tinkering to see whether I can reproduce and resolve this in the actual build environment.

@johlju
Copy link
Member

johlju commented Oct 18, 2021

Great investigation @nabrond. Seems the bug is in Get-LocalizedData, it should fallback to English if not UICulture is found.

@johlju
Copy link
Member

johlju commented Oct 18, 2021

@nabrond
Copy link
Contributor

nabrond commented Oct 18, 2021

Thanks @johlju, that line of code is actually the fix for this issue. I think the problem is actually that the DscResource.DocGenerator module requires DscResource.Common v0.2.0. If I copy the latest version into the "DscResource.DocGenerator/Modules/DscResource.Common" directory and re-run the build, the process moves beyond this error. I believe to resolve this, the version needs to be updated here and a new version of the module published.

@johlju
Copy link
Member

johlju commented Oct 18, 2021

I have added a PR for it.

johlju added a commit that referenced this issue Oct 18, 2021
- SqlServerDsc
  - Switched to a new Linux build worker for the pipeline (issue #1729).
@johlju
Copy link
Member

johlju commented Oct 18, 2021

It seems that when removing the deprecated resources that had no examples the build passed. But I have also merged the suggested fix in the DocGenerator repo. I will release a full version of DocGenerator tomorrow so this does not happen in another repo.

@nabrond thank you for the work you put in finding this! Much appreciated! 😄 🙇

@johlju johlju removed the help wanted The issue is up for grabs for anyone in the community. label Oct 18, 2021
@johlju
Copy link
Member

johlju commented Oct 19, 2021

The module DscResource.DocGenerator have now been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocking release The issue or pull request is blocking the next release. Higher priority than label 'High priority'. enhancement The issue is an enhancement request.
Projects
None yet
3 participants