Skip to content

Commit

Permalink
fix(deprecation): announce deprecation of some constructs (#794)
Browse files Browse the repository at this point in the history
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
krokoko and mergify[bot] authored Nov 12, 2024
1 parent 0ab6ee8 commit 951b8aa
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
5 changes: 5 additions & 0 deletions apidocs/classes/WebCrawler.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ user provided props for the construct.

0.0.0

#### Deprecated

This construct is deprecated and will be removed in a future major version.
It will not receive security updates.

#### Overrides

[`BaseClass`](BaseClass.md).[`constructor`](BaseClass.md#constructors)
Expand Down
7 changes: 6 additions & 1 deletion src/patterns/gen-ai/aws-rag-appsync-stepfn-kendra/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
import * as path from 'path';
import * as cdk from 'aws-cdk-lib';
import { Duration, RemovalPolicy } from 'aws-cdk-lib';
import { Duration, RemovalPolicy, Annotations } from 'aws-cdk-lib';
import * as appsync from 'aws-cdk-lib/aws-appsync';
import * as cognito from 'aws-cdk-lib/aws-cognito';
import { Table } from 'aws-cdk-lib/aws-dynamodb';
Expand Down Expand Up @@ -176,10 +176,15 @@ export class RagAppsyncStepfnKendra extends BaseClass {
* @param {RagAppsyncStepfnKendraProps} props - user provided props for the construct.
* @since 0.0.0
* @access public
* @deprecated This construct is deprecated and will be removed in a future major version.
* It will not receive security updates.
*/
constructor(scope: Construct, id: string, props: RagAppsyncStepfnKendraProps) {
super(scope, id);

Annotations.of(scope).addWarningV2('@cdklabs/generative-ai-cdk-constructs:RagAppsyncStepfnKendra.deprecation',
'This construct is deprecated and will not receive further support. It will be removed in the next release of the library.');

const baseProps: BaseClassProps = {
stage: props.stage,
constructName: ConstructName.AWSRAGAPPSYNCSTEPFNKENDRA,
Expand Down
6 changes: 6 additions & 0 deletions src/patterns/gen-ai/aws-web-crawler/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import * as crypto from 'crypto';
import * as path from 'path';
import * as url from 'url';
import * as cdk from 'aws-cdk-lib';
import { Annotations } from 'aws-cdk-lib';
import * as batch from 'aws-cdk-lib/aws-batch';
import * as dynamodb from 'aws-cdk-lib/aws-dynamodb';
import * as ec2 from 'aws-cdk-lib/aws-ec2';
Expand Down Expand Up @@ -183,10 +184,15 @@ export class WebCrawler extends BaseClass {
* @param {WebCrawlerProps} props - user provided props for the construct.
* @since 0.0.0
* @public
* @deprecated This construct is deprecated and will be removed in a future major version.
* It will not receive security updates.
*/
constructor(scope: Construct, id: string, props: WebCrawlerProps) {
super(scope, id);

Annotations.of(scope).addWarningV2('@cdklabs/generative-ai-cdk-constructs:WebCrawler.deprecation',
'This construct is deprecated and will not receive further support. It will be removed in the next release of the library.');

vpc_helper.CheckVpcProps(props);
s3_bucket_helper.CheckS3Props({
existingBucketObj: props.existingOutputBucketObj,
Expand Down

0 comments on commit 951b8aa

Please sign in to comment.