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

Fixed missing PS resources #355

Merged
merged 2 commits into from
Mar 7, 2024
Merged

Conversation

anmenaga
Copy link
Collaborator

@anmenaga anmenaga commented Mar 7, 2024

PR Summary

Fixed regression where PS resources were not shown in the default table view.
There was a 'continue' to the next resource (without displaying) if a resource did not have a manifest attached to it (which is the case for PS resources).
The fix is basically to remove that 'continue;' so that such resources are displayed.

Before fix:

PS C:\DSCv3> dsc resource list
  [00:00:14] Discovery complete
  [00:00:05] Done with microsoft.dsc/powershell
  [00:00:02] Done with test/testgroup
  [00:00:05] Done with microsoft.dsc/powershell
  [00:00:00] Done with test/testgroup
Type                                        Kind      Version  Methods  Requires        Description
-----------------------------------------------------------------------------------------------------------------------------------------------------------
DSC.PackageManagement/Brew                  Resource  0.1.0    gs-e                     DSC resource to manage Homebrew packages
Microsoft.DSC.Transitional/RunCommandOnSet  Resource  0.1.0    gs--                     Takes a single-command line to execute on DSC set operation        
Microsoft.DSC/Assertion                     Group     0.1.0    gst-                     `test` will be invoked for all resources in the supplied configura…
Microsoft.DSC/Group                         Group     0.1.0    gst-                     All resources in the supplied configuration is treated as a group. 
Microsoft.DSC/Parallel                      Group     0.1.0    gst-                     All resources in the supplied configuration run concurrently.      
Microsoft.DSC/PowerShell                    Adapter   0.1.0    gste                     Resource adapter to classic DSC Powershell resources.
Microsoft.Windows/RebootPending             Resource  0.1.0    g---                     Returns info about pending reboot.
Microsoft.Windows/Registry                  Resource  0.1.0    gst-                     Manage Windows Registry keys and values
Microsoft/OSInfo                            Resource  0.1.0    g--e                     Returns information about the operating system.
Microsoft/Process                           Resource  0.1.0    gste                     Returns information about running processes.
Test/Echo                                   Resource  0.1.0    gst-
Test/Sleep                                  Resource  0.1.0    gst-
Test/TestGroup                              Adapter   0.1.0    g---
Test/TestResource1                          Resource  1.0.0    g---     Test/TestGroup  This is a test resource.
Test/TestResource2                          Resource  1.0.1    g---     Test/TestGroup  This is a test resource.

After fix:

PS C:\DSCv3> dsc resource list
  [00:00:11] Discovery complete
  [00:00:05] Done with microsoft.dsc/powershell
  [00:00:00] Done with test/testgroup
  [00:00:05] Done with microsoft.dsc/powershell
  [00:00:00] Done with test/testgroup
Type                                              Kind      Version   Methods  Requires                  Description
-----------------------------------------------------------------------------------------------------------------------------------------------------------
DSC.PackageManagement/Brew                        Resource  0.1.0     gs-e                               DSC resource to manage Homebrew packages
Microsoft.DSC.Transitional/RunCommandOnSet        Resource  0.1.0     gs--                               Takes a single-command line to execute on DSC set 
Microsoft.DSC/Assertion                           Group     0.1.0     gst-                               `test` will be invoked for all resources in the s…
Microsoft.DSC/Group                               Group     0.1.0     gst-                               All resources in the supplied configuration is tr…
Microsoft.DSC/Parallel                            Group     0.1.0     gst-                               All resources in the supplied configuration run c…
Microsoft.DSC/PowerShell                          Adapter   0.1.0     gste                               Resource adapter to classic DSC Powershell resour…
Microsoft.Windows/RebootPending                   Resource  0.1.0     g---                               Returns info about pending reboot.
Microsoft.Windows/Registry                        Resource  0.1.0     gst-                               Manage Windows Registry keys and values
Microsoft/OSInfo                                  Resource  0.1.0     g--e                               Returns information about the operating system.   
Microsoft/Process                                 Resource  0.1.0     gste                               Returns information about running processes.      
PackageManagement/MSFT_PackageManagement          Resource  1.0.0.1   g---     Microsoft.DSC/PowerShell
PackageManagement/MSFT_PackageManagementSource    Resource  1.0.0.1   g---     Microsoft.DSC/PowerShell
PowerShellGet/MSFT_PSModule                       Resource  2.2.5     g---     Microsoft.DSC/PowerShell
PowerShellGet/MSFT_PSRepository                   Resource  2.2.5     g---     Microsoft.DSC/PowerShell
PsDesiredStateConfiguration/MSFT_ArchiveResource  Resource            g---     Microsoft.DSC/PowerShell
PsDesiredStateConfiguration/MSFT_PackageResource  Resource            g---     Microsoft.DSC/PowerShell
PsDesiredStateConfiguration/MSFT_ProcessResource  Resource            g---     Microsoft.DSC/PowerShell
PsDesiredStateConfiguration/MSFT_RoleResource     Resource            g---     Microsoft.DSC/PowerShell
PsDesiredStateConfiguration/MSFT_WaitForAll       Resource            g---     Microsoft.DSC/PowerShell
PsDesiredStateConfiguration/MSFT_WaitForAny       Resource            g---     Microsoft.DSC/PowerShell
PsDesiredStateConfiguration/MSFT_WaitForSome      Resource            g---     Microsoft.DSC/PowerShell
PSDscResources/GroupSet                           Resource  2.12.0.0  g---     Microsoft.DSC/PowerShell
PSDscResources/MSFT_Archive                       Resource  2.12.0.0  g---     Microsoft.DSC/PowerShell
PSDscResources/MSFT_EnvironmentResource           Resource  2.12.0.0  g---     Microsoft.DSC/PowerShell
PSDscResources/MSFT_GroupResource                 Resource  2.12.0.0  g---     Microsoft.DSC/PowerShell
PSDscResources/MSFT_MsiPackage                    Resource  2.12.0.0  g---     Microsoft.DSC/PowerShell
PSDscResources/MSFT_RegistryResource              Resource  2.12.0.0  g---     Microsoft.DSC/PowerShell
PSDscResources/MSFT_ScriptResource                Resource  2.12.0.0  g---     Microsoft.DSC/PowerShell
PSDscResources/MSFT_ServiceResource               Resource  2.12.0.0  g---     Microsoft.DSC/PowerShell
PSDscResources/MSFT_UserResource                  Resource  2.12.0.0  g---     Microsoft.DSC/PowerShell
PSDscResources/MSFT_WindowsFeature                Resource  2.12.0.0  g---     Microsoft.DSC/PowerShell
PSDscResources/MSFT_WindowsOptionalFeature        Resource  2.12.0.0  g---     Microsoft.DSC/PowerShell
PSDscResources/MSFT_WindowsPackageCab             Resource  2.12.0.0  g---     Microsoft.DSC/PowerShell
PSDscResources/MSFT_WindowsProcess                Resource  2.12.0.0  g---     Microsoft.DSC/PowerShell
PSDscResources/ProcessSet                         Resource  2.12.0.0  g---     Microsoft.DSC/PowerShell
PSDscResources/ServiceSet                         Resource  2.12.0.0  g---     Microsoft.DSC/PowerShell
PSDscResources/WindowsFeatureSet                  Resource  2.12.0.0  g---     Microsoft.DSC/PowerShell
PSDscResources/WindowsOptionalFeatureSet          Resource  2.12.0.0  g---     Microsoft.DSC/PowerShell
PSTestModule/TestClassResource                    Resource  1.0.0     g---     Microsoft.DSC/PowerShell
PSTestModule/TestPSRepository                     Resource  1.0.0     g---     Microsoft.DSC/PowerShell
Test/Echo                                         Resource  0.1.0     gst-
Test/Sleep                                        Resource  0.1.0     gst-
Test/TestGroup                                    Adapter   0.1.0     g---
Test/TestResource1                                Resource  1.0.0     g---     Test/TestGroup            This is a test resource.
Test/TestResource2                                Resource  1.0.1     g---     Test/TestGroup            This is a test resource.
PS C:\DSCv3>

Copy link
Member

@SteveL-MSFT SteveL-MSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anmenaga this change seems fine to unblock, but created #356 so that PS resources can show version and method information

@SteveL-MSFT SteveL-MSFT added this pull request to the merge queue Mar 7, 2024
Merged via the queue into PowerShell:main with commit 569f2ea Mar 7, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants