Giter VIP home page Giter VIP logo

Comments (5)

ricmestre avatar ricmestre commented on June 19, 2024 1

Yes, that will also work, please go ahead with the PR since I'm currently busy adding other workarounds to my DevOps pipelines, which by the way is taking around 1h to install the modules and dependencies, last year I had to change Install-Module to Save-Module and it took about 5min, now it's also taking 1h for Save-Module...

from microsoft365dsc.

FabienTschanz avatar FabienTschanz commented on June 19, 2024

@ricmestre I don't have a setup for GitHub pipelines, but the issue with the configuration being reported as a complete drift because the naming is a simple GUID should be adressable by prefixing the name with e.g. Export-<GUID>. Visual Studio Code gives me an error when the configuration name does not start with a letter: The configuration name '757e980d-07a0-4393-9ed0-8efd06b772e0' is not valid. Standard names may only contain letters (a-z, A-Z), numbers (0-9), period (.), hyphen (-) and underscore (_). The name may not be null or empty, and should start with a letter.

image

The second issue you mentioned with the missing types could be related to missing administrative privileges on the target machine. I debugged the ConvertTo-DscObject which calls ConvertFrom-CIMInstanceToHashtable, and that function requires administrative privileges to call Invoke-DscResource to register the CIM type if it does not exist. No idea why it didn't work but suddenly started working again...

And the third one with the Az and Graph modules should be resolved with Az 2.12.0 if I'm not mistaken. Nevertheless, I will have a look at the creation of the Blueprint and check if we can change that to something better, matching the criteria for the parser to have a configuration starting with a letter instead of a number.

from microsoft365dsc.

ricmestre avatar ricmestre commented on June 19, 2024

I'm using Azure DevOps pipelines and they always run with administrative rights and it always worked before, in fact the only way to keep it working with latest M365DSC version is to have a manifest with M365DSC dependencies with a downgraded DSCParser to v1 with which I have no problems with.

The configurations are generated automatically by M365DSC via Assert-M365DSCBlueprint so basically you don't have control over what name to use for the configuration, but even if using GUIDs for the exports it was working with DSCParser v1 without issues, with v2 I get that problem.

I'm aware that the issue between Az and Graph should be resolved with Az 12.0.0, that will be released this week if I'm not mistaken, but their teams don't seem to collaborate when to release and so this problem keeps happening over and over because the modules then use different dlls. Usually I'm able to go around the problem by either instructing the pipeline to either run on a lower or higher Az version, in this case the only workaround I found was to, along with downgrading DSCParser in the manifest, to also downgrade Graph to v2.17.0.

from microsoft365dsc.

ricmestre avatar ricmestre commented on June 19, 2024

The problem selecting a GUID for the configuration name starts here, you might get lucky and the filename of the export is a GUID that starts with a letter and so it's fine, but might start with a number and you're in trouble. Maybe we need to add a check if the filename starts with a number to append a prefix like "M365TenantConfig" which happens a few lines afterwards on L359.

from microsoft365dsc.

FabienTschanz avatar FabienTschanz commented on June 19, 2024

@ricmestre Don't think we have to go that far. Simply calling Export-M365DSCConfiguration -FileName XYZ inside Assert-M365DSCBlueprint with a name that does not start with a number should be enough, as it should be known that a configuration must start with a letter.

Export-M365DSCConfiguration -Components $ResourcesInBluePrint `

Updating the references for $TempExportName and $TempBluePrintName should be enough. If you want, I can provide a pull request in a couple of minutes that addresses that, as I've already verified that it does what it's supposed to do.

from microsoft365dsc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.