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

Upgrade dependency versions to fix audit scanning #210

Merged
merged 4 commits into from
May 20, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: fix typing error for greengrass2 provisioning after version upgrade
BenjiTheC committed May 14, 2024
commit 7328b88057ddda1d1c113cf69a608cfdb2d7f232
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { IoTJobAbortAction, IoTJobExecutionFailureType } from '@aws-sdk/client-greengrassv2';

/*********************************************************************************************************************
* Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. *
* *
@@ -91,11 +93,11 @@ export interface JobConfig {
abortConfig?: {
criteriaList: [
{
failureType: string;
action: AbortConfigFailureType;
failureType: IoTJobExecutionFailureType;
action: IoTJobAbortAction;
thresholdPercentage: number;
minNumberOfExecutedThings: number;
},
}
];
};
timeoutConfig?: {
@@ -114,6 +116,5 @@ export interface DeploymentPolicy {
};
}

export type AbortConfigFailureType = 'FAILED' | 'REJECTED' | 'TIMED_OUT' | 'ALL';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am I reading this right that we're now getting this type from their library instead of defining it ourselves? Does the same not apply to the other exported types below? If so, can you open an issue to update them to use the library values instead of defining them in our code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the newer version of the dependent AWS SDK package updated their typing from a general string to more strict enum, which results in this incompatibility. And you are right, this can apply to other types defined in the code base. I have created #211 to track this

export type FailureHandlingPolicy = 'ROLLBACK' | 'DO_NOTHING';
export type DeploymentPolicyAction = 'NOTIFY_COMPONENTS' | 'SKIP_NOTIFY_COMPONENTS';