ActiveDirectoryDsc icon indicating copy to clipboard operation
ActiveDirectoryDsc copied to clipboard

Add PlatyPS to required modules

Open Borgquite opened this issue 1 year ago β€’ 8 comments

Pull Request (PR) description

As discussed in #714, adding PlatyPS to required modules in an attempt to resolve build errors

This Pull Request (PR) fixes the following issues

  • Fixes #714

Task list

  • [x] Added an entry to the change log under the Unreleased section of the file CHANGELOG.md. Entry should say what was changed and how that affects users (if applicable), and reference the issue being resolved (if applicable).
  • [ ] Resource documentation added/updated in README.md.
  • [ ] Resource parameter descriptions added/updated in README.md, schema.mof and comment-based help.
  • [ ] Comment-based help added/updated.
  • [ ] Localization strings added/updated in all localization files as appropriate.
  • [ ] Examples appropriately added/updated.
  • [ ] Unit tests added/updated. See DSC Community Testing Guidelines.
  • [ ] Integration tests added/updated (where possible). See DSC Community Testing Guidelines.
  • [x] New/changed code adheres to DSC Community Style Guidelines.

This change is Reviewable

Borgquite avatar Jul 30 '24 12:07 Borgquite

@johlju Sorry - not sure why this is failing?

Borgquite avatar Jul 30 '24 12:07 Borgquite

/azp run

johlju avatar Jul 30 '24 14:07 johlju

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jul 30 '24 14:07 azure-pipelines[bot]

Very strange - not sure either, kicked off the pipeline again. It got GitVersion 6 event if it says it should install v5. πŸ€”

johlju avatar Jul 30 '24 14:07 johlju

Seems to work now, I can't see any errors in the build phase. Seems to work with adding PlatyPS.

This should also update the conceptual help so we should no longer need to have the individual .help.txt for the resources. They are generated automatically in the top en-US folder under ./output. πŸ€” Should be less to maintain hopefully?

johlju avatar Jul 30 '24 14:07 johlju

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98%. Comparing base (bdde66f) to head (0afcf32). Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@         Coverage Diff         @@
##           main   #715   +/-   ##
===================================
  Coverage    98%    98%           
===================================
  Files        25     25           
  Lines      3475   3512   +37     
===================================
+ Hits       3406   3443   +37     
  Misses       69     69           

codecov[bot] avatar Jul 30 '24 14:07 codecov[bot]

But there seems to a problem with this module, maybe because there is a docs folder in the helper module the auto-doc creates this file?

WARNING: Each file must end with a new line.
WARNING: D:\a\2\s\output\ActiveDirectoryDsc\6.6.0\en-US\ActiveDirectoryDsc.Common.psm1-help.xml does not end with a new
 line.

Solution 1. Moving the docs folder to source/WikiSource -each file add YAML Front Matter (markdown metadata) property Category and set it to Helper command. I think that will make the sidebar be generated with a section Helper command with the .md files that has the Category set to the same. Not tested though.

Solution 2. If the all common command can be made public we can just add a source/Public folder (command not called by resources can be in source/Private) then add each command with its comment-based help to individual script files. This will make the auto-doc automatically generate the docs on each build and automatically deploy it. This will remove the helper module and the resources must import ActiveDrectoryDsc instead. The unit tests must also be changed for the move commands to test the command in the built module.

Solution 3. Move the helper module to it's own repository similar to how DscResource.Common is seperated. Then add it the same way as DscResource.Common is used. Moving relevant commands to DscResource.Common is also an option. πŸ€”

Guessing solution 1 is easiest - at least moving away the 'docs' folder so it is not part of the generated module. πŸ™‚

johlju avatar Jul 30 '24 14:07 johlju

@johlju OK - probably not something I can spend any more time on, sorry (doing this on company time). I'll leave this here in case someone else can pick it up!

Borgquite avatar Jul 30 '24 15:07 Borgquite