Skip to content

Commit

Permalink
chore(appconfig): fix some awslint errors, explicitly exempt others (#…
Browse files Browse the repository at this point in the history
…28671)

Auditing awslint errors.

Reasons for keeping current list of exemptions:


* "no-unused-type:@aws-cdk/aws-appconfig-alpha.PredefinedDeploymentStrategyId" - will be fixed in a separate PR.
* "props-physical-name:@aws-cdk/aws-appconfig-alpha.ApplicationProps" 
 "props-physical-name:@aws-cdk/aws-appconfig-alpha.DeploymentStrategyProps"
 "props-physical-name:@aws-cdk/aws-appconfig-alpha.EnvironmentProps"
"props-physical-name:@aws-cdk/aws-appconfig-alpha.ExtensionProps" - will be fixed in a separate PR.
* "events-method-signature" - exempting because appconfig handles their events without cloudwatch events
* "events-generic" - exempting because appconfig handles their events without cloudwatch events

Closes #27894 alongside #28742 and #28743

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
chenjane-dev authored Jan 18, 2024
1 parent 03c08b0 commit aeeb0ef
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 6 deletions.
34 changes: 29 additions & 5 deletions packages/@aws-cdk/aws-appconfig-alpha/awslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,34 @@
"docs-public-apis:@aws-cdk/aws-appconfig-alpha.IConfiguration",
"docs-public-apis:@aws-cdk/aws-appconfig-alpha.IApplication",

"ref-via-interface:@aws-cdk/aws-appconfig-alpha.Application.addAgentToEcs.taskDef",
"events-in-interface",
"events-method-signature",
"events-generic",
"from-signature:@aws-cdk/aws-appconfig-alpha.DeploymentStrategy.fromDeploymentStrategyId.params[2]"
"from-signature:@aws-cdk/aws-appconfig-alpha.DeploymentStrategy.fromDeploymentStrategyId.params[2]",
"events-method-signature:@aws-cdk/aws-appconfig-alpha.Application.on",
"events-method-signature:@aws-cdk/aws-appconfig-alpha.Application.onDeploymentBaking*",
"events-method-signature:@aws-cdk/aws-appconfig-alpha.Application.onDeploymentComplete*",
"events-method-signature:@aws-cdk/aws-appconfig-alpha.Application.onDeploymentRolledBack*",
"events-method-signature:@aws-cdk/aws-appconfig-alpha.Application.onDeploymentStart*",
"events-method-signature:@aws-cdk/aws-appconfig-alpha.Application.onDeploymentStep*",
"events-method-signature:@aws-cdk/aws-appconfig-alpha.Environment.on",
"events-method-signature:@aws-cdk/aws-appconfig-alpha.Environment.onDeploymentBaking*",
"events-method-signature:@aws-cdk/aws-appconfig-alpha.Environment.onDeploymentComplete*",
"events-method-signature:@aws-cdk/aws-appconfig-alpha.Environment.onDeploymentRolledBack*",
"events-method-signature:@aws-cdk/aws-appconfig-alpha.Environment.onDeploymentStart*",
"events-method-signature:@aws-cdk/aws-appconfig-alpha.Environment.onDeploymentStep*",
"events-method-signature:@aws-cdk/aws-appconfig-alpha.HostedConfiguration.on",
"events-method-signature:@aws-cdk/aws-appconfig-alpha.HostedConfiguration.onDeploymentBaking*",
"events-method-signature:@aws-cdk/aws-appconfig-alpha.HostedConfiguration.onDeploymentComplete*",
"events-method-signature:@aws-cdk/aws-appconfig-alpha.HostedConfiguration.onDeploymentRolledBack*",
"events-method-signature:@aws-cdk/aws-appconfig-alpha.HostedConfiguration.onDeploymentStart*",
"events-method-signature:@aws-cdk/aws-appconfig-alpha.HostedConfiguration.onDeploymentStep*",
"events-method-signature:@aws-cdk/aws-appconfig-alpha.SourcedConfiguration.on",
"events-method-signature:@aws-cdk/aws-appconfig-alpha.SourcedConfiguration.onDeploymentBaking*",
"events-method-signature:@aws-cdk/aws-appconfig-alpha.SourcedConfiguration.onDeploymentComplete*",
"events-method-signature:@aws-cdk/aws-appconfig-alpha.SourcedConfiguration.onDeploymentRolledBack*",
"events-method-signature:@aws-cdk/aws-appconfig-alpha.SourcedConfiguration.onDeploymentStart*",
"events-method-signature:@aws-cdk/aws-appconfig-alpha.SourcedConfiguration.onDeploymentStep*",
"events-generic:@aws-cdk/aws-appconfig-alpha.Application",
"events-generic:@aws-cdk/aws-appconfig-alpha.Environment",
"events-generic:@aws-cdk/aws-appconfig-alpha.HostedConfiguration",
"events-generic:@aws-cdk/aws-appconfig-alpha.SourcedConfiguration"
]
}
81 changes: 80 additions & 1 deletion packages/@aws-cdk/aws-appconfig-alpha/lib/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,85 @@ export interface IApplication extends cdk.IResource {
* Returns the list of associated environments.
*/
get environments(): IEnvironment[];

/**
* Adds an extension defined by the action point and event destination
* and also creates an extension association to an application.
*
* @param actionPoint The action point which triggers the event
* @param eventDestination The event that occurs during the extension
* @param options Options for the extension
*/
on(actionPoint: ActionPoint, eventDestination: IEventDestination, options?: ExtensionOptions): void;

/**
* Adds a PRE_CREATE_HOSTED_CONFIGURATION_VERSION extension with the
* provided event destination and also creates an extension association to an application.
*
* @param eventDestination The event that occurs during the extension
* @param options Options for the extension
*/
preCreateHostedConfigurationVersion(eventDestination: IEventDestination, options?: ExtensionOptions): void;

/**
* Adds a PRE_START_DEPLOYMENT extension with the provided event destination and
* also creates an extension association to an application.
*
* @param eventDestination The event that occurs during the extension
* @param options Options for the extension
*/
preStartDeployment(eventDestination: IEventDestination, options?: ExtensionOptions): void;
/**
* Adds an ON_DEPLOYMENT_START extension with the provided event destination and
* also creates an extension association to an application.
*
* @param eventDestination The event that occurs during the extension
* @param options Options for the extension
*/
onDeploymentStart(eventDestination: IEventDestination, options?: ExtensionOptions): void;

/**
* Adds an ON_DEPLOYMENT_STEP extension with the provided event destination and
* also creates an extension association to an application.
*
* @param eventDestination The event that occurs during the extension
* @param options Options for the extension
*/
onDeploymentStep(eventDestination: IEventDestination, options?: ExtensionOptions): void;

/**
* Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and
* also creates an extension association to an application.
*
* @param eventDestination The event that occurs during the extension
* @param options Options for the extension
*/
onDeploymentBaking(eventDestination: IEventDestination, options?: ExtensionOptions): void;

/**
* Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination and
* also creates an extension association to an application.
*
* @param eventDestination The event that occurs during the extension
* @param options Options for the extension
*/
onDeploymentComplete(eventDestination: IEventDestination, options?: ExtensionOptions): void;

/**
* Adds an ON_DEPLOYMENT_ROLLED_BACK extension with the provided event destination and
* also creates an extension association to an application.
*
* @param eventDestination The event that occurs during the extension
* @param options Options for the extension
*/
onDeploymentRolledBack(eventDestination: IEventDestination, options?: ExtensionOptions): void;

/**
* Adds an extension association to the application.
*
* @param extension The extension to create an association for
*/
addExtension(extension: IExtension): void;
}

/**
Expand Down Expand Up @@ -296,7 +375,7 @@ export class Application extends ApplicationBase {
/**
* Adds the AWS AppConfig Agent as a container to the provided ECS task definition.
*
* @param taskDef The ECS task definition
* @param taskDef The ECS task definition [disable-awslint:ref-via-interface]
*/
public static addAgentToEcs(taskDef: ecs.TaskDefinition) {
taskDef.addContainer('AppConfigAgentContainer', {
Expand Down

0 comments on commit aeeb0ef

Please sign in to comment.