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

Question: How does Sampler relate to Stucco and will it be promoted to the Microsoft organization #119

Open
tmeckel opened this issue Jan 25, 2020 · 6 comments
Labels
discussion The issue is a discussion. on hold The issue or pull request has been put on hold by a maintainer.

Comments

@tmeckel
Copy link
Contributor

tmeckel commented Jan 25, 2020

@gaelcolas the Stucco module maintained by @devblackops provides a Plaster template to create PowerShell modules including support for mkdocs, pipelines etc. Are there any plans to merge the efforts here?

Secondly: are there any plans to promote Sampler to a first class citizen under the Microsoft organization on GitHub?

@tmeckel tmeckel changed the title Question: How does Sampler relate to Stucco and will it promoted to the Microsoft organisation Question: How does Sampler relate to Stucco and will it be promoted to the Microsoft organization Jan 25, 2020
@gaelcolas
Copy link
Owner

Hi @tmeckel, good question, and the answer is not that simple.

TL,DR: In short, what @devblackops has done is great too, and people could use either templates. There's no plan to merge for now, and it won't be "promoted" to the Microsoft organization per se. If it works, and solves problems, it should promote itself.

Now for the long answer...

I don't think either approach is the ultimate solution, so it's good to have both so we can innovate, experiment in parallel while improving the PowerShell ecosystem.
Currently, there's no plan to merge the efforts, and I don't see the necessity.
Both projects rely on solid principles which is what matter most.

Both projects come from slightly different experience: Brandon with PSake after he became the maintainer, myself when I chose InvokeBuild to experiment in SampleModule when PSake had no maintainers.
There's also a third approach worth mentioning: not using any task runner (not using PSake or InvokeBuild, just PS functions), with @Jaykul as its main advocate (but also used by the PS Team).

Microsoft seems to be using more and more Travis' PSPackageProject internally, from what I gather.
Michael Greene said he'd want the Guest Config team to get to practices closer to what Sampler does.

Oh and I forgot what Fred is doing with his PSFramework (and probably many more).

All those approaches are valid and have pros and cons.
There's also things that could be said around the use of Plaster for templating: it's not ideal and not actively maintained, but it's readily available in PS ecosystem (install-module Plaster), and we can "just" make it a requiredModules to Sampler and Stucco to abstract even further.

Sampler really tries to re-align what the DSC Community was doing in isolation with what the PowerShell community is doing. The DSC Resources were created a while ago by the then PS Team (some moved to DSC team and the teams split a bit later), and the practices did not evolve much from the original code base. As a visible example, the DSC team and the PS team have a different code style, such as brackets position.

Sampler tries (unsuccessfully to some extent) to not re-invent some functions and rely on other modules to provide functionalities.
For compiling the function files for instance, Sampler relies on @Jaykul's ModuleBuilder.
Sampler is really built to cater for DSC Resource development as per the DSC Community Guidelines, but with a common approach that works for pure PowerShell Module (without DSC Resource).

To get that working in a timely fashion, some corners have been cut, and we're still iterating over it. But now we have a foundation solid enough that it should not impact the projects relying on it when we release new versions.

To get those projects merged together would require a substantial effort from all parties, which is not something we are getting paid for. We do discuss every now and then, and we keep an eye on what's happening, so hopefully we won't grow further apart.
We do try to either align to someone else's approach, or to convince the other project to align with the others, but only when it makes sense.
In that regard I think the collaboration is healthy (but we could certainly do more) and there's no competition between projects, they're all here to help.

To be more specific about the question you asked:

Secondly: are there any plans to promote Sampler to a first class citizen under the Microsoft organization on GitHub?

No, for a few reasons.

  1. It's a bad idea to stuff projects under the Microsoft or PowerShell organisation, they have plenty of responsibilities and shouldn't be expected to maintain everything. PowerShell ecosystem is only as strong as its community, so companies only relying on Microsoft for module/feature are making it weaker.
  2. I don't work for Microsoft.
  3. I don't even know what a first class Citizen under Microsoft would look like... ;)

Hope that answers the questions.

Ideally the Sampler project would be transferred from my GH account to an organisation, although I'd rather it not going to the DSC community one, to avoid repeating the mistake of isolating the DSC community from the rest of the PS Module community (DSC is just an interface to other imperative commands).

I'll leave this issue open for a bit so that others can see it.

@gaelcolas gaelcolas added discussion The issue is a discussion. on hold The issue or pull request has been put on hold by a maintainer. labels Jan 26, 2020
@tmeckel
Copy link
Contributor Author

tmeckel commented Jan 26, 2020

@gaelcolas Many thanks for the very detailed answer to my question! Highly appreciated.

@gaelcolas
Copy link
Owner

Quick update on that, when #134 will be done and the meaty parts of the Invoke-Build tasks will mainly call Sampler's functions, it should be trivial to create similar tasks for PSake, and re-use with Stucco.
Probably not something we plan on doing, but we do want to make it possible, eventually. And we'd support the community to make it happen.

@gaelcolas gaelcolas pinned this issue Mar 15, 2021
@FLeven
Copy link

FLeven commented May 29, 2023

I tried to move to sampler for a simple PowerShell module, test, build, publish to gallery pipeline and gave up a second time.
As Stucco is less maintained lately, I would be ready to change to a project that is more active.

  • Stucco is easy to use in multiple build environments from Github actions to Gitlab, Jenkins or build on local system.
  • Pester and CodeCov also seem to be a lot easier to implement and maintain, in stucco.
  • Also you have many options for the format of your docs, mkdocs might not be as hip as it was was once, but it offers an alternative.

@gaelcolas
Copy link
Owner

@FLeven , while I appreciate the feedback, it's hard to translate into actionable tasks. How can we make it easier, or put differently, what is hard?

  1. "Easy to use in different build systems" the basics work without issue in different build systems, but the integration in some is hard (generate PR, create releases...)
  2. Interested to learn more how. We only prescribe the folder names
  3. Docs is definitely something we're interested in improving. So far, whether platyps or other tools did not give us satisfaction, so we've implemented the minimum we needed for DSC community.

I'm keen to hear more about your troubles...

@FLeven
Copy link

FLeven commented May 30, 2023

  1. I will open an Issue, this time I was not able to produce any working module, empty Project name error
  2. Easy, already implemented in Stucco, put tests in a test folder, done. Default tests are already implemented.
    Activate code Coverage in/for PowerShellBuild https://github.com/psake/PowerShellBuild#task-customization, set file name and path, done.
  3. I don't understand that, any (markdown based) help is better then the Microsoft standard.

I personalty hope this project is not transferred to an org, many GitHub Repos from Redmond are already archived or will be soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion The issue is a discussion. on hold The issue or pull request has been put on hold by a maintainer.
Projects
None yet
Development

No branches or pull requests

3 participants