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

fix(custom-resources): log group name for waiter state machine does not start with /aws/vendedlogs/states/ (under feature flag) #28587

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
import * as cdk from 'aws-cdk-lib';
import * as dynamodb from 'aws-cdk-lib/aws-dynamodb';
import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api';

const app = new cdk.App();
app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false);
const stack = new cdk.Stack(app, 'aws-cdk-dynamodb-global-replicas-provisioned');

const table = new dynamodb.Table(stack, 'Table', {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { App, RemovalPolicy, Stack, StackProps } from 'aws-cdk-lib';
import { Construct } from 'constructs';
import * as dynamodb from 'aws-cdk-lib/aws-dynamodb';
import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api';
import { IntegTest } from '@aws-cdk/integ-tests-alpha';

class TestStack extends Stack {
Expand Down Expand Up @@ -30,6 +31,7 @@ class TestStack extends Stack {
}

const app = new App();
app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false);
const stack = new TestStack(app, 'cdk-dynamodb-global-20191121', { env: { region: 'eu-west-1' } });

new IntegTest(app, 'cdk-dynamodb-global-20191121-test', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import * as kplus from 'cdk8s-plus-27';
import { getClusterVersionConfig } from './integ-tests-kubernetes-version';
import { Pinger } from './pinger/pinger';
import * as eks from 'aws-cdk-lib/aws-eks';
import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api';

class EksClusterAlbControllerStack extends Stack {

Expand Down Expand Up @@ -69,6 +70,8 @@ class EksClusterAlbControllerStack extends Stack {
}

const app = new App();
app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false);

const stack = new EksClusterAlbControllerStack(app, 'aws-cdk-eks-cluster-alb-controller');
new integ.IntegTest(app, 'aws-cdk-cluster-alb-controller-integ', {
testCases: [stack],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import * as integ from '@aws-cdk/integ-tests-alpha';
import { getClusterVersionConfig } from './integ-tests-kubernetes-version';
import * as eks from 'aws-cdk-lib/aws-eks';
import { NodegroupAmiType } from 'aws-cdk-lib/aws-eks';
import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api';

class EksClusterStack extends Stack {

Expand Down Expand Up @@ -41,6 +42,7 @@ class EksClusterStack extends Stack {
}

const app = new App();
app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false);

const stack = new EksClusterStack(app, 'aws-cdk-eks-cluster-bottlerocket-ng-test');
new integ.IntegTest(app, 'aws-cdk-eks-cluster-bottlerocket-ng', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ import { App, Stack } from 'aws-cdk-lib';
import * as integ from '@aws-cdk/integ-tests-alpha';
import { getClusterVersionConfig } from './integ-tests-kubernetes-version';
import * as eks from 'aws-cdk-lib/aws-eks';
import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP } from 'aws-cdk-lib/cx-api';
import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP, WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api';

class EksAllHandlersInVpcStack extends Stack {

constructor(scope: App, id: string) {
super(scope, id);

this.node.setContext(EC2_RESTRICT_DEFAULT_SECURITY_GROUP, false);
this.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false);
new eks.Cluster(this, 'EksAllHandlersInVpcStack', {
...getClusterVersionConfig(this),
placeClusterHandlerInVpc: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import * as hello from './hello-k8s';
import * as integ from '@aws-cdk/integ-tests-alpha';
import { getClusterVersionConfig } from './integ-tests-kubernetes-version';
import * as eks from 'aws-cdk-lib/aws-eks';
import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api';
import * as cdk8s from 'cdk8s';
import * as kplus from 'cdk8s-plus-27';
import * as constructs from 'constructs';
Expand Down Expand Up @@ -207,6 +208,8 @@ class EksClusterStack extends Stack {
}

const app = new App();
app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false);

const stack = new EksClusterStack(app, 'aws-cdk-eks-import-cluster-test');

new integ.IntegTest(app, 'aws-cdk-eks-import-cluster', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import * as constructs from 'constructs';
import * as hello from './hello-k8s';
import { getClusterVersionConfig } from './integ-tests-kubernetes-version';
import * as eks from 'aws-cdk-lib/aws-eks';
import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api';

class EksClusterStack extends Stack {

Expand Down Expand Up @@ -358,6 +359,7 @@ const supportedRegions = [
];

const app = new App();
app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false);

// since the EKS optimized AMI is hard-coded here based on the region,
// we need to actually pass in a specific region.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { App, Stack } from 'aws-cdk-lib';
import * as integ from '@aws-cdk/integ-tests-alpha';
import { getClusterVersionConfig } from './integ-tests-kubernetes-version';
import * as eks from 'aws-cdk-lib/aws-eks';
import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api';

class EksClusterStack extends Stack {
constructor(scope: App, id: string) {
Expand Down Expand Up @@ -43,6 +44,7 @@ class EksClusterStack extends Stack {
}

const app = new App();
app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false);

const stack = new EksClusterStack(app, 'aws-cdk-eks-cluster-private-endpoint-test');
new integ.IntegTest(app, 'aws-cdk-eks-cluster-private-endpoint', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import * as constructs from 'constructs';
import * as hello from './hello-k8s';
import { getClusterVersionConfig } from './integ-tests-kubernetes-version';
import * as eks from 'aws-cdk-lib/aws-eks';
import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api';

class EksClusterStack extends Stack {

Expand Down Expand Up @@ -334,6 +335,7 @@ const supportedRegions = [
];

const app = new App();
app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false);

// since the EKS optimized AMI is hard-coded here based on the region,
// we need to actually pass in a specific region.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { App, Stack } from 'aws-cdk-lib';
import * as integ from '@aws-cdk/integ-tests-alpha';
import { getClusterVersionConfig } from './integ-tests-kubernetes-version';
import * as eks from 'aws-cdk-lib/aws-eks';
import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api';

class EksClusterStack extends Stack {
private cluster: eks.Cluster;
Expand Down Expand Up @@ -100,6 +101,7 @@ class EksClusterStack extends Stack {
}

const app = new App();
app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false);

const stack = new EksClusterStack(app, 'aws-cdk-eks-helm-test');
new integ.IntegTest(app, 'aws-cdk-eks-helm', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { App, Stack } from 'aws-cdk-lib';
import * as integ from '@aws-cdk/integ-tests-alpha';
import { getClusterVersionConfig } from './integ-tests-kubernetes-version';
import * as eks from 'aws-cdk-lib/aws-eks';
import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api';

class EksClusterInferenceStack extends Stack {

Expand Down Expand Up @@ -32,6 +33,7 @@ class EksClusterInferenceStack extends Stack {
}

const app = new App();
app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false);
const stack = new EksClusterInferenceStack(app, 'aws-cdk-eks-cluster-inference-nodegroup');
new integ.IntegTest(app, 'aws-cdk-eks-cluster-interence-nodegroup-integ', {
testCases: [stack],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { App, Stack } from 'aws-cdk-lib';
import * as integ from '@aws-cdk/integ-tests-alpha';
import { getClusterVersionConfig } from './integ-tests-kubernetes-version';
import * as eks from 'aws-cdk-lib/aws-eks';
import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api';

class EksClusterInferenceStack extends Stack {

Expand Down Expand Up @@ -34,6 +35,7 @@ class EksClusterInferenceStack extends Stack {
}

const app = new App();
app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false);
const stack = new EksClusterInferenceStack(app, 'aws-cdk-eks-cluster-inference');
new integ.IntegTest(app, 'aws-cdk-eks-cluster-interence-integ', {
testCases: [stack],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ import * as cdk8s from 'cdk8s';
import * as kplus from 'cdk8s-plus-27';
import { BucketPinger } from './bucket-pinger/bucket-pinger';
import * as eks from 'aws-cdk-lib/aws-eks';
import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api';
import { getClusterVersionConfig } from './integ-tests-kubernetes-version';

const app = new App();
app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false);
const stack = new Stack(app, 'aws-eks-service-account-sdk-calls-test');

// this bucket gets created by a kubernetes pod.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as integ from '@aws-cdk/integ-tests-alpha';
import { getClusterVersionConfig } from './integ-tests-kubernetes-version';
import * as eks from 'aws-cdk-lib/aws-eks';
import { NodegroupAmiType, TaintEffect } from 'aws-cdk-lib/aws-eks';
import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP } from 'aws-cdk-lib/cx-api';
import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP, WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api';

class EksClusterStack extends Stack {

Expand Down Expand Up @@ -50,6 +50,7 @@ class EksClusterStack extends Stack {
}

const app = new App();
app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false);

const stack = new EksClusterStack(app, 'aws-cdk-eks-cluster-windows-ng-test');
new integ.IntegTest(app, 'aws-cdk-eks-cluster-windows-ng', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { App, Stack } from 'aws-cdk-lib';
import * as integ from '@aws-cdk/integ-tests-alpha';
import { getClusterVersionConfig } from './integ-tests-kubernetes-version';
import * as eks from 'aws-cdk-lib/aws-eks';
import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP } from 'aws-cdk-lib/cx-api';
import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP, WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api';

class EksFargateClusterStack extends Stack {

Expand All @@ -19,6 +19,7 @@ class EksFargateClusterStack extends Stack {
}

const app = new App();
app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false);

const stack = new EksFargateClusterStack(app, 'aws-cdk-eks-fargate-cluster-test');
new integ.IntegTest(app, 'aws-cdk-eks-fargate-cluster', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import * as cr from 'aws-cdk-lib/custom-resources';
import { Construct } from 'constructs';
import * as rds from 'aws-cdk-lib/aws-rds';
import { ClusterInstance } from 'aws-cdk-lib/aws-rds';
import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api';
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
import { STANDARD_NODEJS_RUNTIME } from '../../config';
import { LogLevel } from 'aws-cdk-lib/aws-stepfunctions';
Expand Down Expand Up @@ -128,6 +129,8 @@ class Snapshoter extends Construct {
}

const app = new App();
app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false);

const stack = new TestStack(app, 'cdk-integ-cluster-snapshot');

new IntegTest(app, 'ClusterSnapshotInteg', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as sfn from 'aws-cdk-lib/aws-stepfunctions';
import * as cdk from 'aws-cdk-lib';
import * as integ from '@aws-cdk/integ-tests-alpha';
import { EksCall, HttpMethods } from 'aws-cdk-lib/aws-stepfunctions-tasks';
import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP } from 'aws-cdk-lib/cx-api';
import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP, WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api';

/*
* Create a state machine with a task state to use the Kubernetes API to read Kubernetes resource objects
Expand All @@ -20,6 +20,7 @@ import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP } from 'aws-cdk-lib/cx-api';

const app = new cdk.App();
const stack = new cdk.Stack(app, 'aws-stepfunctions-tasks-eks-call-integ-test');
stack.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false);
stack.node.setContext(EC2_RESTRICT_DEFAULT_SECURITY_GROUP, false);

const cluster = new eks.Cluster(stack, 'EksCluster', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
Classification, VirtualClusterInput, EksClusterInput, EmrContainersDeleteVirtualCluster,
EmrContainersCreateVirtualCluster, EmrContainersStartJobRun, ReleaseLabel,
} from 'aws-cdk-lib/aws-stepfunctions-tasks';
import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP } from 'aws-cdk-lib/cx-api';
import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP, WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api';

/**
* Stack verification steps:
Expand All @@ -24,6 +24,7 @@ import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP } from 'aws-cdk-lib/cx-api';
const app = new cdk.App();
const stack = new cdk.Stack(app, 'aws-stepfunctions-tasks-emr-containers-all-services-test');
stack.node.setContext(EC2_RESTRICT_DEFAULT_SECURITY_GROUP, false);
stack.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false);

const eksCluster = new eks.Cluster(stack, 'integration-test-eks-cluster', {
version: eks.KubernetesVersion.V1_22,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as cdk from 'aws-cdk-lib';
import { Aws } from 'aws-cdk-lib';
import * as integ from '@aws-cdk/integ-tests-alpha';
import { EmrContainersStartJobRun, ReleaseLabel, VirtualClusterInput } from 'aws-cdk-lib/aws-stepfunctions-tasks';
import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP } from 'aws-cdk-lib/cx-api';
import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP, WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api';

/**
* Stack verification steps:
Expand All @@ -20,6 +20,7 @@ import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP } from 'aws-cdk-lib/cx-api';
const app = new cdk.App();
const stack = new cdk.Stack(app, 'aws-stepfunctions-tasks-emr-containers-start-job-run');
stack.node.setContext(EC2_RESTRICT_DEFAULT_SECURITY_GROUP, false);
stack.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false);

const eksCluster = new eks.Cluster(stack, 'integration-test-eks-cluster', {
version: eks.KubernetesVersion.V1_22,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading