Skip to content

Microsoft.Graph ill-formatted dependencies breaks Update-Module #165

Closed

Description

In the RequiredModules node of the module manifest of your wrapper module, you only list the module names, but not the version they are required at.
Consequence: When running:

Update-Module Microsoft.Graph

It will successfully update the wrapper module but not the modules it depends upon.
All the user will see is "success", when actually not a single module needed was updated.
The overall install time is quite lengthy, leading to a high chance of updating them piecemeal, which leads to compatibility issues, as they need different versions of the authentication libraries, which cannot coexist.

This could be fixed by including the minimum or exact version required.
In an abbreviated form:

RequiredModules = @(
    'Microsoft.Graph.Authentication', 
    'Microsoft.Graph.Users.Extensions'
)

would become either:

# At LEAST version 0.2.1
RequiredModules = @(
    @{ ModuleName = 'Microsoft.Graph.Authentication'; ModuleVersion = '0.2.1' }, 
    @{ ModuleName = 'Microsoft.Graph.Users.Extensions'; ModuleVersion = '0.2.1' }
)

or:

# EXACTLY version 0.2.1
RequiredModules = @(
    @{ ModuleName = 'Microsoft.Graph.Authentication'; RequiredVersion = '0.2.1' }, 
    @{ ModuleName = 'Microsoft.Graph.Users.Extensions'; RequiredVersion = '0.2.1' }
)

In general, I try to avoid using RequiredVersion, as this increases the risk of multiple modules conflicting, but in this special case it may be more useful, as the various modules are locked at the dll version level.

To be honest, not sure whether it's actually a good idea to directly lock them into the specific dll version of the authentication dll, given how even minor changes require you to do a full rollout of a new version, even if those changes wouldn't have affected the other modules in any way (e.g.: Adding new authentication options).

Activity

  1. peombwa commented on Nov 12, 2020

    @peombwa
    Member

    Closing since this has already been resolved in V1+.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions