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 #654

Closed
cdupuis opened this Issue Jan 9, 2019 · 3 comments

Comments

Projects
None yet
2 participants
@cdupuis
Copy link
Contributor

commented Jan 9, 2019

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.

@cdupuis

This comment has been minimized.

Copy link
Contributor Author

commented Jan 9, 2019

Related issue atomist/automation-client#449 created

@atomist-bot

This comment has been minimized.

Copy link
Contributor

commented Jan 9, 2019

Related issue atomist/automation-client#449 closed by @cdupuis

[atomist:generated] [atomist:related-issue]

@cdupuis

This comment has been minimized.

Copy link
Contributor Author

commented Jan 9, 2019

Fixed in automation-client.

@cdupuis cdupuis closed this Jan 9, 2019

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

Changelog: #654 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.