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

Errors in machine function can get swallowed and ignored #449

Closed
cdupuis opened this Issue Jan 9, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@cdupuis
Copy link
Contributor

commented Jan 9, 2019

Issue originated from atomist/sdm#654

Created by @cdupuis at 2019-01-09T14:16:30Z:

The following SDM will startup its underlying client without any of the SDM functionality.

The error raised on goals.ts by the invalid displayName is swallowed and not presented to the user; additionally the SDM starts up and tries to register with no indication that creating the machine failed.

index.ts

import { Configuration } from "@atomist/automation-client";
import { configureSdm } from "@atomist/sdm-core";
import { machine } from "./test/machine";

export const configuration: Configuration = {
    postProcessors: [
        configureSdm(machine),
    ],
};

machine.ts

import {
    AnyPush,
    SoftwareDeliveryMachine,
    SoftwareDeliveryMachineConfiguration,
    whenPushSatisfies,
} from "@atomist/sdm";
import { createSoftwareDeliveryMachine } from "@atomist/sdm-core";
import { goal } from "./goals";

export function machine(config: SoftwareDeliveryMachineConfiguration): SoftwareDeliveryMachine {
    const sdm = createSoftwareDeliveryMachine({
            name: "Atomist Software Delivery Machine",
            configuration: config,
        },
        whenPushSatisfies(AnyPush).setGoals(goal));

    return sdm;
}

goals.ts

import { createGoal } from "@atomist/sdm";

export const goal = createGoal({ displayName: "bla, bla, bla"}, async gi => { });

This was reported in the community by @olvesh. Thanks for taking the time to debug this with me today.

@olvesh

This comment has been minimized.

Copy link

commented Jan 9, 2019

Glad to help!

@cdupuis cdupuis closed this in 9ce9de8 Jan 9, 2019

atomist-bot added a commit that referenced this issue Jan 9, 2019

Changelog: #449 to fixed
[atomist:generated]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.