Skip to content

OICD authentication on azCliUtility.ts emits errors with too high severity #511

@jikuja

Description

@jikuja

azCliUtility emits errors for transient failures:

if (error.name === 'AggregateError' && error['errors'] !== undefined) {
for (const err of error.errors) {
tl.error(`Error while trying to get OIDC token: ${err}`);
}
} else {
tl.error(`Error while trying to get OIDC token: ${error}`);
}

In my opinion above-mentioned tl.errors should be warnings

Emitting single error on failure should be enough:

        if (retryCount >= MAX_CREATE_OIDC_TOKEN_RETRIES) {
            throw Error(tl.loc('CouldNotFetchAccessTokenForAADRetryLimitExceeded'));
        }

Examples:

transient failure but authentication worked:

Image

real failure:

Image

Metadata

Metadata

Assignees

No one assigned

    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