diff --git a/.github/workflows/license-checker.yml b/.github/workflows/license-checker.yml new file mode 100644 index 0000000..2891563 --- /dev/null +++ b/.github/workflows/license-checker.yml @@ -0,0 +1,12 @@ +--- + name: License Header Checker + + on: [push, pull_request] + + jobs: + license-header-checker: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Check License Header + run: npx @kt3k/license-checker diff --git a/.licenserc.json b/.licenserc.json new file mode 100644 index 0000000..74762fe --- /dev/null +++ b/.licenserc.json @@ -0,0 +1,34 @@ +{ + "**/*.*": [ + " Copyright OpenSearch Contributors", + " SPDX-License-Identifier: Apache-2.0" + ], + "ignore": [ + ".md", + ".d.ts", + ".js", + "cdk.out", + ".svg", + ".yml", + ".yaml", + ".npmignore", + ".bat", + ".json", + ".txt", + ".config", + "settings.gradle", + ".git", + ".whitesource", + ".shellcheckrc", + ".lock", + ".gradle", + ".cert", + ".key", + ".jar", + ".gz", + ".toml", + ".ini", + "gradle/wrapper", + "node_modules" + ] +} \ No newline at end of file diff --git a/infrastructure/bin/infrastructure.ts b/infrastructure/bin/infrastructure.ts index 045c034..ca6f7c6 100644 --- a/infrastructure/bin/infrastructure.ts +++ b/infrastructure/bin/infrastructure.ts @@ -1,6 +1,16 @@ #!/usr/bin/env node -import 'source-map-support/register'; + +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + import * as cdk from 'aws-cdk-lib'; +import 'source-map-support/register'; import { InfrastructureStack } from '../lib/infrastructure-stack'; const app = new cdk.App(); diff --git a/infrastructure/lib/constructs/canarySns.ts b/infrastructure/lib/constructs/canarySns.ts index e523bcc..bd64f3b 100644 --- a/infrastructure/lib/constructs/canarySns.ts +++ b/infrastructure/lib/constructs/canarySns.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to @@ -6,12 +7,11 @@ * compatible open source license. */ -import { SnsMonitors } from "./snsMonitor"; -import { SnsMonitorsProps } from "./snsMonitor"; -import { Construct } from "constructs"; +import { Duration } from "aws-cdk-lib"; import { Alarm, ComparisonOperator, TreatMissingData } from "aws-cdk-lib/aws-cloudwatch"; import { Canary } from 'aws-cdk-lib/aws-synthetics'; -import { Duration } from "aws-cdk-lib"; +import { Construct } from "constructs"; +import { SnsMonitors, SnsMonitorsProps } from "./snsMonitor"; interface canarySnsProps extends SnsMonitorsProps { readonly canaryAlarms: Array<{ alertName: string, canary: Canary }>; diff --git a/infrastructure/lib/constructs/lambda.ts b/infrastructure/lib/constructs/lambda.ts index 8ca016d..23deca1 100644 --- a/infrastructure/lib/constructs/lambda.ts +++ b/infrastructure/lib/constructs/lambda.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to diff --git a/infrastructure/lib/constructs/opensearchCognito.ts b/infrastructure/lib/constructs/opensearchCognito.ts index ae3cd6c..12eccd5 100644 --- a/infrastructure/lib/constructs/opensearchCognito.ts +++ b/infrastructure/lib/constructs/opensearchCognito.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to @@ -7,9 +8,9 @@ */ import { RemovalPolicy } from 'aws-cdk-lib'; -import { Construct } from 'constructs'; -import { Effect, FederatedPrincipal, ManagedPolicy, PolicyStatement, Role, ServicePrincipal } from "aws-cdk-lib/aws-iam"; import { CfnIdentityPool, CfnIdentityPoolRoleAttachment, CfnUserPool, CfnUserPoolClient, CfnUserPoolDomain, CfnUserPoolGroup } from 'aws-cdk-lib/aws-cognito'; +import { Effect, FederatedPrincipal, ManagedPolicy, PolicyStatement, Role, ServicePrincipal } from "aws-cdk-lib/aws-iam"; +import { Construct } from 'constructs'; export interface OpenSearchMetricsCognitoProps { readonly openSearchDomainArn: string; diff --git a/infrastructure/lib/constructs/opensearchNginxProxyCognito.ts b/infrastructure/lib/constructs/opensearchNginxProxyCognito.ts index c84f870..df9209d 100644 --- a/infrastructure/lib/constructs/opensearchNginxProxyCognito.ts +++ b/infrastructure/lib/constructs/opensearchNginxProxyCognito.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to diff --git a/infrastructure/lib/constructs/snsMonitor.ts b/infrastructure/lib/constructs/snsMonitor.ts index 3de738e..5b03954 100644 --- a/infrastructure/lib/constructs/snsMonitor.ts +++ b/infrastructure/lib/constructs/snsMonitor.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to diff --git a/infrastructure/lib/constructs/stepFunctionSns.ts b/infrastructure/lib/constructs/stepFunctionSns.ts index 3f57265..b5c60e5 100644 --- a/infrastructure/lib/constructs/stepFunctionSns.ts +++ b/infrastructure/lib/constructs/stepFunctionSns.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to diff --git a/infrastructure/lib/enums/project.ts b/infrastructure/lib/enums/project.ts index bb33275..468f1aa 100644 --- a/infrastructure/lib/enums/project.ts +++ b/infrastructure/lib/enums/project.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to diff --git a/infrastructure/lib/infrastructure-stack.ts b/infrastructure/lib/infrastructure-stack.ts index c081e91..428d8f1 100644 --- a/infrastructure/lib/infrastructure-stack.ts +++ b/infrastructure/lib/infrastructure-stack.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to @@ -7,22 +8,22 @@ */ import { App, Fn, Stack, StackProps } from 'aws-cdk-lib'; +import { ArnPrincipal } from "aws-cdk-lib/aws-iam"; import { Construct } from 'constructs'; -import { VpcStack } from "./stacks/vpc"; -import { OpenSearchDomainStack } from "./stacks/opensearch"; +import { OpenSearchMetricsNginxCognito } from "./constructs/opensearchNginxProxyCognito"; import Project from './enums/project'; -import { OpenSearchHealthRoute53 } from "./stacks/route53"; +import { GitHubAutomationApp } from "./stacks/gitHubAutomationApp"; +import { GitHubWorkflowMonitorAlarms } from "./stacks/gitHubWorkflowMonitorAlarms"; import { OpenSearchMetricsWorkflowStack } from "./stacks/metricsWorkflow"; -import { OpenSearchMetricsNginxReadonly } from "./stacks/opensearchNginxProxyReadonly"; -import { ArnPrincipal } from "aws-cdk-lib/aws-iam"; -import { OpenSearchWAF } from "./stacks/waf"; -import { OpenSearchMetricsNginxCognito } from "./constructs/opensearchNginxProxyCognito"; import { OpenSearchMetricsMonitoringStack } from "./stacks/monitoringDashboard"; -import { OpenSearchMetricsSecretsStack } from "./stacks/secrets"; -import { GitHubAutomationApp } from "./stacks/gitHubAutomationApp"; +import { OpenSearchDomainStack } from "./stacks/opensearch"; +import { OpenSearchMetricsNginxReadonly } from "./stacks/opensearchNginxProxyReadonly"; +import { OpenSearchHealthRoute53 } from "./stacks/route53"; import { OpenSearchS3 } from "./stacks/s3"; -import { GitHubWorkflowMonitorAlarms } from "./stacks/gitHubWorkflowMonitorAlarms"; -import {OpenSearchS3EventIndexWorkflowStack} from "./stacks/s3EventIndexWorkflow"; +import { OpenSearchS3EventIndexWorkflowStack } from "./stacks/s3EventIndexWorkflow"; +import { OpenSearchMetricsSecretsStack } from "./stacks/secrets"; +import { VpcStack } from "./stacks/vpc"; +import { OpenSearchWAF } from "./stacks/waf"; export class InfrastructureStack extends Stack { constructor(scope: Construct, id: string, props?: StackProps) { @@ -39,7 +40,7 @@ export class InfrastructureStack extends Stack { }); - // Alarms to Monitor the Critical GitHub CI workflows by the GitHub Automation App + // Alarms to Monitor the Critical GitHub CI workflows by the GitHub Automation App const gitHubWorkflowMonitorAlarms = new GitHubWorkflowMonitorAlarms(app, "OpenSearchMetrics-GitHubWorkflowMonitor-Alarms", { namespace: 'GitHubActions', metricName: 'WorkflowRunFailures', diff --git a/infrastructure/lib/stacks/gitHubAutomationApp.ts b/infrastructure/lib/stacks/gitHubAutomationApp.ts index 75f57bf..b89ac8f 100644 --- a/infrastructure/lib/stacks/gitHubAutomationApp.ts +++ b/infrastructure/lib/stacks/gitHubAutomationApp.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to @@ -31,8 +32,8 @@ import { Role, ServicePrincipal } from 'aws-cdk-lib/aws-iam'; -import { Construct } from 'constructs'; import { Secret } from "aws-cdk-lib/aws-secretsmanager"; +import { Construct } from 'constructs'; export interface GitHubAppProps { @@ -59,8 +60,8 @@ export class GitHubAutomationApp extends Stack { this.asg = new AutoScalingGroup(this, 'OpenSearchMetrics-GitHubAutomationApp-Asg', { instanceType: InstanceType.of(InstanceClass.M5, InstanceSize.XLARGE), - blockDevices: [{deviceName: '/dev/xvda', volume: BlockDeviceVolume.ebs(20)}], - healthCheck: HealthCheck.ec2({grace: Duration.seconds(90)}), + blockDevices: [{ deviceName: '/dev/xvda', volume: BlockDeviceVolume.ebs(20) }], + healthCheck: HealthCheck.ec2({ grace: Duration.seconds(90) }), machineImage: props && props.ami ? MachineImage.fromSsmParameter(props.ami) : MachineImage.latestAmazonLinux2(), diff --git a/infrastructure/lib/stacks/gitHubWorkflowMonitorAlarms.ts b/infrastructure/lib/stacks/gitHubWorkflowMonitorAlarms.ts index 06eab2e..80ab43b 100644 --- a/infrastructure/lib/stacks/gitHubWorkflowMonitorAlarms.ts +++ b/infrastructure/lib/stacks/gitHubWorkflowMonitorAlarms.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to @@ -6,9 +7,9 @@ * compatible open source license. */ -import {Duration, Stack} from "aws-cdk-lib"; -import {Construct} from "constructs"; -import {Alarm, ComparisonOperator, Metric, TreatMissingData} from "aws-cdk-lib/aws-cloudwatch"; +import { Duration, Stack } from "aws-cdk-lib"; +import { Alarm, ComparisonOperator, Metric } from "aws-cdk-lib/aws-cloudwatch"; +import { Construct } from "constructs"; export interface AlarmProps { readonly namespace: string; @@ -33,7 +34,7 @@ export class GitHubWorkflowMonitorAlarms extends Stack { statistic: 'Sum', }); - const alarm = new Alarm (this, `OpenSearchMetrics-GitHubApp-${dimensionValue.replace(/\s+/g, '')}-FailuresAlarm`, { + const alarm = new Alarm(this, `OpenSearchMetrics-GitHubApp-${dimensionValue.replace(/\s+/g, '')}-FailuresAlarm`, { alarmName: `OpenSearchMetrics-GitHubApp-${dimensionValue.replace(/\s+/g, '')}-FailuresAlarm`, metric: workflowMetric, threshold: 2, diff --git a/infrastructure/lib/stacks/metricsWorkflow.ts b/infrastructure/lib/stacks/metricsWorkflow.ts index 2c8e349..8729537 100644 --- a/infrastructure/lib/stacks/metricsWorkflow.ts +++ b/infrastructure/lib/stacks/metricsWorkflow.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to @@ -53,7 +54,7 @@ export class OpenSearchMetricsWorkflowStack extends Stack { } private createMetricsTask(scope: Construct, opensearchDomainStack: OpenSearchDomainStack, - vpcStack: VpcStack, lambdaPackage: string) { + vpcStack: VpcStack, lambdaPackage: string) { const openSearchDomain = opensearchDomainStack.domain; const metricsLambda = new OpenSearchLambda(scope, "OpenSearchMetricsLambdaFunction", { lambdaNameBase: "OpenSearchMetricsDashboards", diff --git a/infrastructure/lib/stacks/monitoringDashboard.ts b/infrastructure/lib/stacks/monitoringDashboard.ts index 1f72356..0c6795b 100644 --- a/infrastructure/lib/stacks/monitoringDashboard.ts +++ b/infrastructure/lib/stacks/monitoringDashboard.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to @@ -22,7 +23,7 @@ import { VpcStack } from "./vpc"; interface OpenSearchMetricsMonitoringStackProps extends StackProps { readonly region: string; readonly account: string; - readonly workflowComponent: {[component: string]: string}; + readonly workflowComponent: { [component: string]: string }; readonly lambdaPackage: string; readonly secrets: Secret; readonly vpcStack: VpcStack; diff --git a/infrastructure/lib/stacks/opensearch.ts b/infrastructure/lib/stacks/opensearch.ts index 6fe140e..7b21c0f 100644 --- a/infrastructure/lib/stacks/opensearch.ts +++ b/infrastructure/lib/stacks/opensearch.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to @@ -9,13 +10,13 @@ import { RemovalPolicy, Stack } from "aws-cdk-lib"; import { ArnPrincipal, CfnServiceLinkedRole, CompositePrincipal, Effect, IPrincipal, IRole, ManagedPolicy, PolicyDocument, PolicyStatement, Role, ServicePrincipal } from "aws-cdk-lib/aws-iam"; import { Domain, EngineVersion } from "aws-cdk-lib/aws-opensearchservice"; +import { Bucket } from "aws-cdk-lib/aws-s3"; import { Construct } from "constructs"; import { OpenSearchMetricsCognito } from "../constructs/opensearchCognito"; import { OpenSearchMetricsNginxCognito } from "../constructs/opensearchNginxProxyCognito"; import Project from "../enums/project"; import { OpenSearchHealthRoute53 } from "./route53"; import { VpcStack } from "./vpc"; -import {Bucket} from "aws-cdk-lib/aws-s3"; export interface OpenSearchStackProps { @@ -103,7 +104,7 @@ export class OpenSearchDomainStack extends Stack { actions: ["s3:GetObject", "s3:ListBucket"], resources: [props.githubEventsBucket.bucketArn, - `${props.githubEventsBucket.bucketArn}/*`], + `${props.githubEventsBucket.bucketArn}/*`], }) ] }) diff --git a/infrastructure/lib/stacks/opensearchNginxProxyReadonly.ts b/infrastructure/lib/stacks/opensearchNginxProxyReadonly.ts index 3456edd..561f643 100644 --- a/infrastructure/lib/stacks/opensearchNginxProxyReadonly.ts +++ b/infrastructure/lib/stacks/opensearchNginxProxyReadonly.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to diff --git a/infrastructure/lib/stacks/route53.ts b/infrastructure/lib/stacks/route53.ts index da9bf42..6860ba4 100644 --- a/infrastructure/lib/stacks/route53.ts +++ b/infrastructure/lib/stacks/route53.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to @@ -7,9 +8,9 @@ */ import { Stack } from "aws-cdk-lib"; -import { Construct } from "constructs"; -import { HostedZone } from "aws-cdk-lib/aws-route53"; import { Certificate, CertificateValidation } from "aws-cdk-lib/aws-certificatemanager"; +import { HostedZone } from "aws-cdk-lib/aws-route53"; +import { Construct } from "constructs"; export interface Route53Props { readonly hostedZone: string, diff --git a/infrastructure/lib/stacks/s3.ts b/infrastructure/lib/stacks/s3.ts index cfae047..5a49c1f 100644 --- a/infrastructure/lib/stacks/s3.ts +++ b/infrastructure/lib/stacks/s3.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to @@ -6,8 +7,8 @@ * compatible open source license. */ -import {Stack, RemovalPolicy, StackProps} from "aws-cdk-lib"; -import { Bucket, BlockPublicAccess, BucketEncryption } from 'aws-cdk-lib/aws-s3'; +import { RemovalPolicy, Stack, StackProps } from "aws-cdk-lib"; +import { BlockPublicAccess, Bucket, BucketEncryption } from 'aws-cdk-lib/aws-s3'; import { Construct } from "constructs"; export class OpenSearchS3 extends Stack { diff --git a/infrastructure/lib/stacks/s3EventIndexWorkflow.ts b/infrastructure/lib/stacks/s3EventIndexWorkflow.ts index 4f717d1..41e7a58 100644 --- a/infrastructure/lib/stacks/s3EventIndexWorkflow.ts +++ b/infrastructure/lib/stacks/s3EventIndexWorkflow.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to @@ -7,15 +8,15 @@ */ import { Duration, Stack, StackProps } from "aws-cdk-lib"; -import {Rule, RuleTargetInput, Schedule} from "aws-cdk-lib/aws-events"; +import { Rule, RuleTargetInput, Schedule } from "aws-cdk-lib/aws-events"; import { SfnStateMachine } from "aws-cdk-lib/aws-events-targets"; -import {JsonPath, StateMachine, TaskInput} from "aws-cdk-lib/aws-stepfunctions"; +import { Bucket } from "aws-cdk-lib/aws-s3"; +import { JsonPath, StateMachine, TaskInput } from "aws-cdk-lib/aws-stepfunctions"; import { LambdaInvoke } from "aws-cdk-lib/aws-stepfunctions-tasks"; import { Construct } from 'constructs'; import { OpenSearchLambda } from "../constructs/lambda"; import { OpenSearchDomainStack } from "./opensearch"; import { VpcStack } from "./vpc"; -import {Bucket} from "aws-cdk-lib/aws-s3"; export interface OpenSearchS3EventIndexWorkflowStackProps extends StackProps { readonly region: string; diff --git a/infrastructure/lib/stacks/secrets.ts b/infrastructure/lib/stacks/secrets.ts index 7a9683b..d1fe49d 100644 --- a/infrastructure/lib/stacks/secrets.ts +++ b/infrastructure/lib/stacks/secrets.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to diff --git a/infrastructure/lib/stacks/vpc.ts b/infrastructure/lib/stacks/vpc.ts index 290413d..8a3e497 100644 --- a/infrastructure/lib/stacks/vpc.ts +++ b/infrastructure/lib/stacks/vpc.ts @@ -1,5 +1,6 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to diff --git a/infrastructure/lib/stacks/waf.ts b/infrastructure/lib/stacks/waf.ts index f246bf0..b0175d1 100644 --- a/infrastructure/lib/stacks/waf.ts +++ b/infrastructure/lib/stacks/waf.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to diff --git a/infrastructure/test/gitHubAutomationApp-stack.test.ts b/infrastructure/test/gitHubAutomationApp-stack.test.ts index 5c8c867..86f7731 100644 --- a/infrastructure/test/gitHubAutomationApp-stack.test.ts +++ b/infrastructure/test/gitHubAutomationApp-stack.test.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to @@ -9,11 +10,11 @@ import { App } from "aws-cdk-lib"; import { Match, Template } from "aws-cdk-lib/assertions"; import Project from "../lib/enums/project"; -import { VpcStack } from "../lib/stacks/vpc"; import { GitHubAutomationApp } from "../lib/stacks/gitHubAutomationApp"; +import { GitHubWorkflowMonitorAlarms } from "../lib/stacks/gitHubWorkflowMonitorAlarms"; +import { OpenSearchS3 } from "../lib/stacks/s3"; import { OpenSearchMetricsSecretsStack } from "../lib/stacks/secrets"; -import {GitHubWorkflowMonitorAlarms} from "../lib/stacks/gitHubWorkflowMonitorAlarms"; -import {OpenSearchS3} from "../lib/stacks/s3"; +import { VpcStack } from "../lib/stacks/vpc"; test('OpenSearch GitHub App Stack test ', () => { diff --git a/infrastructure/test/githubWorkflowMonitorAlarms-stack.test.ts b/infrastructure/test/githubWorkflowMonitorAlarms-stack.test.ts index 562569b..00aeacc 100644 --- a/infrastructure/test/githubWorkflowMonitorAlarms-stack.test.ts +++ b/infrastructure/test/githubWorkflowMonitorAlarms-stack.test.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to @@ -6,9 +7,9 @@ * compatible open source license. */ -import {App} from "aws-cdk-lib"; -import {GitHubWorkflowMonitorAlarms} from "../lib/stacks/gitHubWorkflowMonitorAlarms"; -import {Match, Template} from "aws-cdk-lib/assertions"; +import { App } from "aws-cdk-lib"; +import { Match, Template } from "aws-cdk-lib/assertions"; +import { GitHubWorkflowMonitorAlarms } from "../lib/stacks/gitHubWorkflowMonitorAlarms"; test('OpenSearch Workflow Monitor Alarms test ', () => { const app = new App(); @@ -24,7 +25,7 @@ test('OpenSearch Workflow Monitor Alarms test ', () => { }); const template = Template.fromStack(gitHubWorkflowMonitorAlarms); - + template.hasResourceProperties('AWS::CloudWatch::Alarm', { AlarmName: 'OpenSearchMetrics-GitHubApp-Publishsnapshotstomaven-FailuresAlarm', diff --git a/infrastructure/test/hostedzone-stack.test.ts b/infrastructure/test/hostedzone-stack.test.ts index 1b62a8a..cd61cc5 100644 --- a/infrastructure/test/hostedzone-stack.test.ts +++ b/infrastructure/test/hostedzone-stack.test.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to diff --git a/infrastructure/test/metrics-workflow-stack.test.ts b/infrastructure/test/metrics-workflow-stack.test.ts index 9f8f378..4b0f4f8 100644 --- a/infrastructure/test/metrics-workflow-stack.test.ts +++ b/infrastructure/test/metrics-workflow-stack.test.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to @@ -8,12 +9,12 @@ import { App } from "aws-cdk-lib"; import { Template } from "aws-cdk-lib/assertions"; -import { OpenSearchMetricsWorkflowStack } from "../lib/stacks/metricsWorkflow"; +import { ArnPrincipal } from "aws-cdk-lib/aws-iam"; import Project from "../lib/enums/project"; +import { OpenSearchMetricsWorkflowStack } from "../lib/stacks/metricsWorkflow"; import { OpenSearchDomainStack } from "../lib/stacks/opensearch"; +import { OpenSearchS3 } from "../lib/stacks/s3"; import { VpcStack } from "../lib/stacks/vpc"; -import { ArnPrincipal } from "aws-cdk-lib/aws-iam"; -import {OpenSearchS3} from "../lib/stacks/s3"; test('Metrics Workflow Stack Test', () => { const app = new App(); diff --git a/infrastructure/test/monitoring-stack.test.ts b/infrastructure/test/monitoring-stack.test.ts index ed770a0..6be188d 100644 --- a/infrastructure/test/monitoring-stack.test.ts +++ b/infrastructure/test/monitoring-stack.test.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to @@ -8,20 +9,20 @@ import { App } from "aws-cdk-lib"; import { Template } from "aws-cdk-lib/assertions"; -import { OpenSearchMetricsWorkflowStack } from "../lib/stacks/metricsWorkflow"; -import Project from "../lib/enums/project"; -import { OpenSearchDomainStack } from "../lib/stacks/opensearch"; -import { VpcStack } from "../lib/stacks/vpc"; import { ArnPrincipal } from "aws-cdk-lib/aws-iam"; +import Project from "../lib/enums/project"; +import { OpenSearchMetricsWorkflowStack } from "../lib/stacks/metricsWorkflow"; import { OpenSearchMetricsMonitoringStack } from "../lib/stacks/monitoringDashboard"; +import { OpenSearchDomainStack } from "../lib/stacks/opensearch"; +import { OpenSearchS3 } from "../lib/stacks/s3"; +import { OpenSearchS3EventIndexWorkflowStack } from "../lib/stacks/s3EventIndexWorkflow"; import { OpenSearchMetricsSecretsStack } from "../lib/stacks/secrets"; -import {OpenSearchS3} from "../lib/stacks/s3"; -import {OpenSearchS3EventIndexWorkflowStack} from "../lib/stacks/s3EventIndexWorkflow"; +import { VpcStack } from "../lib/stacks/vpc"; test('Monitoring Stack Test', () => { const app = new App(); const vpcStack = new VpcStack(app, 'OpenSearchHealth-VPC', {}); - const s3Stack = new OpenSearchS3(app, "Test-OpenSearchMetrics-GitHubAutomationAppEvents-S3"); + const s3Stack = new OpenSearchS3(app, "Test-OpenSearchMetrics-GitHubAutomationAppEvents-S3"); const opensearchDomainStack = new OpenSearchDomainStack(app, 'Test-OpenSearchHealth-OpenSearch', { region: "us-east-1", account: "test-account", diff --git a/infrastructure/test/nginx.test.ts b/infrastructure/test/nginx.test.ts index 3283248..ce1e17a 100644 --- a/infrastructure/test/nginx.test.ts +++ b/infrastructure/test/nginx.test.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to @@ -7,14 +8,14 @@ */ import { App } from "aws-cdk-lib"; -import { VpcStack } from "../lib/stacks/vpc"; import { Template } from "aws-cdk-lib/assertions"; -import { OpenSearchMetricsNginxReadonly } from "../lib/stacks/opensearchNginxProxyReadonly"; +import { ArnPrincipal } from "aws-cdk-lib/aws-iam"; import Project from "../lib/enums/project"; import { OpenSearchDomainStack } from "../lib/stacks/opensearch"; -import { ArnPrincipal } from "aws-cdk-lib/aws-iam"; +import { OpenSearchMetricsNginxReadonly } from "../lib/stacks/opensearchNginxProxyReadonly"; import { OpenSearchHealthRoute53 } from "../lib/stacks/route53"; -import {OpenSearchS3} from "../lib/stacks/s3"; +import { OpenSearchS3 } from "../lib/stacks/s3"; +import { VpcStack } from "../lib/stacks/vpc"; test('OpenSearchMetricsNginxReadonly Stack Test', () => { const app = new App(); diff --git a/infrastructure/test/opensearch-stack.test.ts b/infrastructure/test/opensearch-stack.test.ts index 16e6c9d..280ca8f 100644 --- a/infrastructure/test/opensearch-stack.test.ts +++ b/infrastructure/test/opensearch-stack.test.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to @@ -8,11 +9,11 @@ import { App } from "aws-cdk-lib"; import { Template } from "aws-cdk-lib/assertions"; -import { OpenSearchDomainStack } from "../lib/stacks/opensearch"; import { ArnPrincipal } from "aws-cdk-lib/aws-iam"; import Project from "../lib/enums/project"; +import { OpenSearchDomainStack } from "../lib/stacks/opensearch"; +import { OpenSearchS3 } from "../lib/stacks/s3"; import { VpcStack } from "../lib/stacks/vpc"; -import {OpenSearchS3} from "../lib/stacks/s3"; test('OpenSearchDomain Stack Test', () => { const app = new App(); diff --git a/infrastructure/test/s3-event-index-workflow-stack.test.ts b/infrastructure/test/s3-event-index-workflow-stack.test.ts index eebe1d8..831203d 100644 --- a/infrastructure/test/s3-event-index-workflow-stack.test.ts +++ b/infrastructure/test/s3-event-index-workflow-stack.test.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to @@ -8,12 +9,12 @@ import { App } from "aws-cdk-lib"; import { Template } from "aws-cdk-lib/assertions"; +import { ArnPrincipal } from "aws-cdk-lib/aws-iam"; import Project from "../lib/enums/project"; import { OpenSearchDomainStack } from "../lib/stacks/opensearch"; +import { OpenSearchS3 } from "../lib/stacks/s3"; +import { OpenSearchS3EventIndexWorkflowStack } from "../lib/stacks/s3EventIndexWorkflow"; import { VpcStack } from "../lib/stacks/vpc"; -import { ArnPrincipal } from "aws-cdk-lib/aws-iam"; -import {OpenSearchS3} from "../lib/stacks/s3"; -import {OpenSearchS3EventIndexWorkflowStack} from "../lib/stacks/s3EventIndexWorkflow"; test('S3 Event Index Workflow Stack Test', () => { const app = new App(); diff --git a/infrastructure/test/s3-stack.test.ts b/infrastructure/test/s3-stack.test.ts index 91fb0e5..5326b36 100644 --- a/infrastructure/test/s3-stack.test.ts +++ b/infrastructure/test/s3-stack.test.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to @@ -8,7 +9,7 @@ import { App } from "aws-cdk-lib"; import { Template } from "aws-cdk-lib/assertions"; -import {OpenSearchS3} from "../lib/stacks/s3"; +import { OpenSearchS3 } from "../lib/stacks/s3"; test('S3 Stack Test', () => { const app = new App(); diff --git a/infrastructure/test/secrets-stack.test.ts b/infrastructure/test/secrets-stack.test.ts index d09194a..d325e2c 100644 --- a/infrastructure/test/secrets-stack.test.ts +++ b/infrastructure/test/secrets-stack.test.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to @@ -6,9 +7,9 @@ * compatible open source license. */ -import {App} from "aws-cdk-lib"; -import {Template} from "aws-cdk-lib/assertions"; -import {OpenSearchMetricsSecretsStack} from "../lib/stacks/secrets"; +import { App } from "aws-cdk-lib"; +import { Template } from "aws-cdk-lib/assertions"; +import { OpenSearchMetricsSecretsStack } from "../lib/stacks/secrets"; test('Secrets Stack Test', () => { const app = new App(); diff --git a/infrastructure/test/vpc-stack.test.ts b/infrastructure/test/vpc-stack.test.ts index f36c854..4683f73 100644 --- a/infrastructure/test/vpc-stack.test.ts +++ b/infrastructure/test/vpc-stack.test.ts @@ -1,4 +1,5 @@ -/** +/* + * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to diff --git a/src/main/java/org/opensearchmetrics/dagger/CommonModule.java b/src/main/java/org/opensearchmetrics/dagger/CommonModule.java index 0929b17..319464b 100644 --- a/src/main/java/org/opensearchmetrics/dagger/CommonModule.java +++ b/src/main/java/org/opensearchmetrics/dagger/CommonModule.java @@ -1,3 +1,12 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + package org.opensearchmetrics.dagger; import org.opensearchmetrics.util.S3Util; diff --git a/src/main/java/org/opensearchmetrics/dagger/MetricsModule.java b/src/main/java/org/opensearchmetrics/dagger/MetricsModule.java index 7e20fd7..5dac83d 100644 --- a/src/main/java/org/opensearchmetrics/dagger/MetricsModule.java +++ b/src/main/java/org/opensearchmetrics/dagger/MetricsModule.java @@ -6,7 +6,6 @@ * this file be licensed under the Apache-2.0 license or a * compatible open source license. */ - package org.opensearchmetrics.dagger; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/src/main/java/org/opensearchmetrics/dagger/ServiceComponent.java b/src/main/java/org/opensearchmetrics/dagger/ServiceComponent.java index c685ad3..eea4ca8 100644 --- a/src/main/java/org/opensearchmetrics/dagger/ServiceComponent.java +++ b/src/main/java/org/opensearchmetrics/dagger/ServiceComponent.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.dagger; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/src/main/java/org/opensearchmetrics/datasource/DataSourceType.java b/src/main/java/org/opensearchmetrics/datasource/DataSourceType.java index b64ab73..21f6129 100644 --- a/src/main/java/org/opensearchmetrics/datasource/DataSourceType.java +++ b/src/main/java/org/opensearchmetrics/datasource/DataSourceType.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.datasource; public enum DataSourceType { diff --git a/src/main/java/org/opensearchmetrics/lambda/AbstractBaseLambda.java b/src/main/java/org/opensearchmetrics/lambda/AbstractBaseLambda.java index 40c176e..da5ba56 100644 --- a/src/main/java/org/opensearchmetrics/lambda/AbstractBaseLambda.java +++ b/src/main/java/org/opensearchmetrics/lambda/AbstractBaseLambda.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.lambda; import com.amazonaws.services.lambda.runtime.Context; diff --git a/src/main/java/org/opensearchmetrics/lambda/GithubEventsLambda.java b/src/main/java/org/opensearchmetrics/lambda/GithubEventsLambda.java index 3879c50..033ad9d 100644 --- a/src/main/java/org/opensearchmetrics/lambda/GithubEventsLambda.java +++ b/src/main/java/org/opensearchmetrics/lambda/GithubEventsLambda.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.lambda; import com.amazonaws.services.lambda.runtime.Context; diff --git a/src/main/java/org/opensearchmetrics/lambda/MetricsLambda.java b/src/main/java/org/opensearchmetrics/lambda/MetricsLambda.java index ad9e1a6..9473261 100644 --- a/src/main/java/org/opensearchmetrics/lambda/MetricsLambda.java +++ b/src/main/java/org/opensearchmetrics/lambda/MetricsLambda.java @@ -6,7 +6,6 @@ * this file be licensed under the Apache-2.0 license or a * compatible open source license. */ - package org.opensearchmetrics.lambda; import com.amazonaws.services.lambda.runtime.Context; diff --git a/src/main/java/org/opensearchmetrics/lambda/SlackLambda.java b/src/main/java/org/opensearchmetrics/lambda/SlackLambda.java index e0909eb..67596f5 100644 --- a/src/main/java/org/opensearchmetrics/lambda/SlackLambda.java +++ b/src/main/java/org/opensearchmetrics/lambda/SlackLambda.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.lambda; import org.opensearchmetrics.model.alarm.AlarmData; diff --git a/src/main/java/org/opensearchmetrics/metrics/MetricsCalculation.java b/src/main/java/org/opensearchmetrics/metrics/MetricsCalculation.java index b713adb..186eb86 100644 --- a/src/main/java/org/opensearchmetrics/metrics/MetricsCalculation.java +++ b/src/main/java/org/opensearchmetrics/metrics/MetricsCalculation.java @@ -6,7 +6,6 @@ * this file be licensed under the Apache-2.0 license or a * compatible open source license. */ - package org.opensearchmetrics.metrics; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/src/main/java/org/opensearchmetrics/metrics/events/GithubEvents.java b/src/main/java/org/opensearchmetrics/metrics/events/GithubEvents.java index 02d919e..4ca4b07 100644 --- a/src/main/java/org/opensearchmetrics/metrics/events/GithubEvents.java +++ b/src/main/java/org/opensearchmetrics/metrics/events/GithubEvents.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.events; import lombok.Getter; diff --git a/src/main/java/org/opensearchmetrics/metrics/general/ClosedIssues.java b/src/main/java/org/opensearchmetrics/metrics/general/ClosedIssues.java index 23f776e..b438b54 100644 --- a/src/main/java/org/opensearchmetrics/metrics/general/ClosedIssues.java +++ b/src/main/java/org/opensearchmetrics/metrics/general/ClosedIssues.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.opensearch.index.query.BoolQueryBuilder; diff --git a/src/main/java/org/opensearchmetrics/metrics/general/CreatedIssues.java b/src/main/java/org/opensearchmetrics/metrics/general/CreatedIssues.java index 052971b..91c12d6 100644 --- a/src/main/java/org/opensearchmetrics/metrics/general/CreatedIssues.java +++ b/src/main/java/org/opensearchmetrics/metrics/general/CreatedIssues.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.opensearch.index.query.BoolQueryBuilder; diff --git a/src/main/java/org/opensearchmetrics/metrics/general/IssueComments.java b/src/main/java/org/opensearchmetrics/metrics/general/IssueComments.java index e06557c..e3f1f1d 100644 --- a/src/main/java/org/opensearchmetrics/metrics/general/IssueComments.java +++ b/src/main/java/org/opensearchmetrics/metrics/general/IssueComments.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.opensearch.action.search.SearchRequest; diff --git a/src/main/java/org/opensearchmetrics/metrics/general/IssueNegativeReactions.java b/src/main/java/org/opensearchmetrics/metrics/general/IssueNegativeReactions.java index 6a923a7..a62791c 100644 --- a/src/main/java/org/opensearchmetrics/metrics/general/IssueNegativeReactions.java +++ b/src/main/java/org/opensearchmetrics/metrics/general/IssueNegativeReactions.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.opensearch.action.search.SearchRequest; diff --git a/src/main/java/org/opensearchmetrics/metrics/general/IssuePositiveReactions.java b/src/main/java/org/opensearchmetrics/metrics/general/IssuePositiveReactions.java index 4d970b1..2b6f3c7 100644 --- a/src/main/java/org/opensearchmetrics/metrics/general/IssuePositiveReactions.java +++ b/src/main/java/org/opensearchmetrics/metrics/general/IssuePositiveReactions.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.opensearch.action.search.SearchRequest; diff --git a/src/main/java/org/opensearchmetrics/metrics/general/MergedPullRequests.java b/src/main/java/org/opensearchmetrics/metrics/general/MergedPullRequests.java index 820020b..67f68fe 100644 --- a/src/main/java/org/opensearchmetrics/metrics/general/MergedPullRequests.java +++ b/src/main/java/org/opensearchmetrics/metrics/general/MergedPullRequests.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.opensearch.index.query.BoolQueryBuilder; diff --git a/src/main/java/org/opensearchmetrics/metrics/general/Metrics.java b/src/main/java/org/opensearchmetrics/metrics/general/Metrics.java index 105aca8..44f0524 100644 --- a/src/main/java/org/opensearchmetrics/metrics/general/Metrics.java +++ b/src/main/java/org/opensearchmetrics/metrics/general/Metrics.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.opensearch.action.search.SearchRequest; diff --git a/src/main/java/org/opensearchmetrics/metrics/general/OpenIssues.java b/src/main/java/org/opensearchmetrics/metrics/general/OpenIssues.java index fcf21c5..9cfba7c 100644 --- a/src/main/java/org/opensearchmetrics/metrics/general/OpenIssues.java +++ b/src/main/java/org/opensearchmetrics/metrics/general/OpenIssues.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.opensearch.index.query.BoolQueryBuilder; diff --git a/src/main/java/org/opensearchmetrics/metrics/general/OpenPullRequests.java b/src/main/java/org/opensearchmetrics/metrics/general/OpenPullRequests.java index ac77077..8b7a1ab 100644 --- a/src/main/java/org/opensearchmetrics/metrics/general/OpenPullRequests.java +++ b/src/main/java/org/opensearchmetrics/metrics/general/OpenPullRequests.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.opensearch.index.query.BoolQueryBuilder; diff --git a/src/main/java/org/opensearchmetrics/metrics/general/PullComments.java b/src/main/java/org/opensearchmetrics/metrics/general/PullComments.java index 9b3762c..73df6db 100644 --- a/src/main/java/org/opensearchmetrics/metrics/general/PullComments.java +++ b/src/main/java/org/opensearchmetrics/metrics/general/PullComments.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.opensearch.action.search.SearchRequest; diff --git a/src/main/java/org/opensearchmetrics/metrics/general/UncommentedPullRequests.java b/src/main/java/org/opensearchmetrics/metrics/general/UncommentedPullRequests.java index 2cdb44a..ec52b30 100644 --- a/src/main/java/org/opensearchmetrics/metrics/general/UncommentedPullRequests.java +++ b/src/main/java/org/opensearchmetrics/metrics/general/UncommentedPullRequests.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.opensearch.index.query.BoolQueryBuilder; diff --git a/src/main/java/org/opensearchmetrics/metrics/general/UnlabelledIssues.java b/src/main/java/org/opensearchmetrics/metrics/general/UnlabelledIssues.java index 3514ed2..85d01ba 100644 --- a/src/main/java/org/opensearchmetrics/metrics/general/UnlabelledIssues.java +++ b/src/main/java/org/opensearchmetrics/metrics/general/UnlabelledIssues.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.opensearch.index.query.BoolQueryBuilder; diff --git a/src/main/java/org/opensearchmetrics/metrics/general/UnlabelledPullRequests.java b/src/main/java/org/opensearchmetrics/metrics/general/UnlabelledPullRequests.java index 0abb355..db1af79 100644 --- a/src/main/java/org/opensearchmetrics/metrics/general/UnlabelledPullRequests.java +++ b/src/main/java/org/opensearchmetrics/metrics/general/UnlabelledPullRequests.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.opensearch.index.query.BoolQueryBuilder; diff --git a/src/main/java/org/opensearchmetrics/metrics/general/UntriagedIssues.java b/src/main/java/org/opensearchmetrics/metrics/general/UntriagedIssues.java index aac1073..6baf979 100644 --- a/src/main/java/org/opensearchmetrics/metrics/general/UntriagedIssues.java +++ b/src/main/java/org/opensearchmetrics/metrics/general/UntriagedIssues.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.opensearch.index.query.BoolQueryBuilder; diff --git a/src/main/java/org/opensearchmetrics/metrics/label/LabelMetrics.java b/src/main/java/org/opensearchmetrics/metrics/label/LabelMetrics.java index 603ed1d..fad7a9a 100644 --- a/src/main/java/org/opensearchmetrics/metrics/label/LabelMetrics.java +++ b/src/main/java/org/opensearchmetrics/metrics/label/LabelMetrics.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.label; import org.opensearch.action.search.SearchRequest; diff --git a/src/main/java/org/opensearchmetrics/metrics/release/ReleaseBranchChecker.java b/src/main/java/org/opensearchmetrics/metrics/release/ReleaseBranchChecker.java index d253c6b..1f299fd 100644 --- a/src/main/java/org/opensearchmetrics/metrics/release/ReleaseBranchChecker.java +++ b/src/main/java/org/opensearchmetrics/metrics/release/ReleaseBranchChecker.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.release; import javax.inject.Inject; diff --git a/src/main/java/org/opensearchmetrics/metrics/release/ReleaseInputs.java b/src/main/java/org/opensearchmetrics/metrics/release/ReleaseInputs.java index 1425a5d..5c05e53 100644 --- a/src/main/java/org/opensearchmetrics/metrics/release/ReleaseInputs.java +++ b/src/main/java/org/opensearchmetrics/metrics/release/ReleaseInputs.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.release; public enum ReleaseInputs { diff --git a/src/main/java/org/opensearchmetrics/metrics/release/ReleaseIssueChecker.java b/src/main/java/org/opensearchmetrics/metrics/release/ReleaseIssueChecker.java index 6025969..5d8ade7 100644 --- a/src/main/java/org/opensearchmetrics/metrics/release/ReleaseIssueChecker.java +++ b/src/main/java/org/opensearchmetrics/metrics/release/ReleaseIssueChecker.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.release; import org.opensearch.action.search.SearchRequest; diff --git a/src/main/java/org/opensearchmetrics/metrics/release/ReleaseLabelIssuesFetcher.java b/src/main/java/org/opensearchmetrics/metrics/release/ReleaseLabelIssuesFetcher.java index da8bb31..766f6ad 100644 --- a/src/main/java/org/opensearchmetrics/metrics/release/ReleaseLabelIssuesFetcher.java +++ b/src/main/java/org/opensearchmetrics/metrics/release/ReleaseLabelIssuesFetcher.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.release; import org.opensearch.action.search.SearchRequest; diff --git a/src/main/java/org/opensearchmetrics/metrics/release/ReleaseLabelPullsFetcher.java b/src/main/java/org/opensearchmetrics/metrics/release/ReleaseLabelPullsFetcher.java index 02ba961..fcc7ad9 100644 --- a/src/main/java/org/opensearchmetrics/metrics/release/ReleaseLabelPullsFetcher.java +++ b/src/main/java/org/opensearchmetrics/metrics/release/ReleaseLabelPullsFetcher.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.release; import org.opensearch.action.search.SearchRequest; diff --git a/src/main/java/org/opensearchmetrics/metrics/release/ReleaseNotesChecker.java b/src/main/java/org/opensearchmetrics/metrics/release/ReleaseNotesChecker.java index dc2c504..cf89b41 100644 --- a/src/main/java/org/opensearchmetrics/metrics/release/ReleaseNotesChecker.java +++ b/src/main/java/org/opensearchmetrics/metrics/release/ReleaseNotesChecker.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.release; import javax.inject.Inject; diff --git a/src/main/java/org/opensearchmetrics/metrics/release/ReleaseRepoFetcher.java b/src/main/java/org/opensearchmetrics/metrics/release/ReleaseRepoFetcher.java index 5c18b28..fa07725 100644 --- a/src/main/java/org/opensearchmetrics/metrics/release/ReleaseRepoFetcher.java +++ b/src/main/java/org/opensearchmetrics/metrics/release/ReleaseRepoFetcher.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.release; import org.yaml.snakeyaml.Yaml; diff --git a/src/main/java/org/opensearchmetrics/metrics/release/UrlResponse.java b/src/main/java/org/opensearchmetrics/metrics/release/UrlResponse.java index 72f9c64..ae13365 100644 --- a/src/main/java/org/opensearchmetrics/metrics/release/UrlResponse.java +++ b/src/main/java/org/opensearchmetrics/metrics/release/UrlResponse.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.release; import javax.inject.Inject; diff --git a/src/main/java/org/opensearchmetrics/model/CustomLongSerializer.java b/src/main/java/org/opensearchmetrics/model/CustomLongSerializer.java index a4cba8b..dca94a6 100644 --- a/src/main/java/org/opensearchmetrics/model/CustomLongSerializer.java +++ b/src/main/java/org/opensearchmetrics/model/CustomLongSerializer.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.model; import com.fasterxml.jackson.core.JsonGenerator; diff --git a/src/main/java/org/opensearchmetrics/model/alarm/AlarmData.java b/src/main/java/org/opensearchmetrics/model/alarm/AlarmData.java index 812b47c..ca1a77e 100644 --- a/src/main/java/org/opensearchmetrics/model/alarm/AlarmData.java +++ b/src/main/java/org/opensearchmetrics/model/alarm/AlarmData.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.model.alarm; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/org/opensearchmetrics/model/event/EventData.java b/src/main/java/org/opensearchmetrics/model/event/EventData.java index 79fc424..f017a2a 100644 --- a/src/main/java/org/opensearchmetrics/model/event/EventData.java +++ b/src/main/java/org/opensearchmetrics/model/event/EventData.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.model.event; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/org/opensearchmetrics/model/general/MetricsData.java b/src/main/java/org/opensearchmetrics/model/general/MetricsData.java index 0212975..c4fc622 100644 --- a/src/main/java/org/opensearchmetrics/model/general/MetricsData.java +++ b/src/main/java/org/opensearchmetrics/model/general/MetricsData.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.model.general; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/org/opensearchmetrics/model/label/LabelData.java b/src/main/java/org/opensearchmetrics/model/label/LabelData.java index 1a402c0..933442e 100644 --- a/src/main/java/org/opensearchmetrics/model/label/LabelData.java +++ b/src/main/java/org/opensearchmetrics/model/label/LabelData.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.model.label; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/org/opensearchmetrics/model/release/ReleaseMetricsData.java b/src/main/java/org/opensearchmetrics/model/release/ReleaseMetricsData.java index 8c25782..8166f04 100644 --- a/src/main/java/org/opensearchmetrics/model/release/ReleaseMetricsData.java +++ b/src/main/java/org/opensearchmetrics/model/release/ReleaseMetricsData.java @@ -6,7 +6,6 @@ * this file be licensed under the Apache-2.0 license or a * compatible open source license. */ - package org.opensearchmetrics.model.release; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/org/opensearchmetrics/util/OpenSearchUtil.java b/src/main/java/org/opensearchmetrics/util/OpenSearchUtil.java index d734913..85ab82d 100644 --- a/src/main/java/org/opensearchmetrics/util/OpenSearchUtil.java +++ b/src/main/java/org/opensearchmetrics/util/OpenSearchUtil.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.util; import com.google.common.collect.Iterables; diff --git a/src/main/java/org/opensearchmetrics/util/S3Util.java b/src/main/java/org/opensearchmetrics/util/S3Util.java index 4ae7ec6..6cdf4cf 100644 --- a/src/main/java/org/opensearchmetrics/util/S3Util.java +++ b/src/main/java/org/opensearchmetrics/util/S3Util.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.util; import lombok.extern.slf4j.Slf4j; diff --git a/src/main/java/org/opensearchmetrics/util/SecretsManagerUtil.java b/src/main/java/org/opensearchmetrics/util/SecretsManagerUtil.java index 98ca8b6..fa50c99 100644 --- a/src/main/java/org/opensearchmetrics/util/SecretsManagerUtil.java +++ b/src/main/java/org/opensearchmetrics/util/SecretsManagerUtil.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.util; import org.opensearchmetrics.datasource.DataSourceType; diff --git a/src/test/java/org/opensearchmetrics/lambda/GithubEventsLambdaTest.java b/src/test/java/org/opensearchmetrics/lambda/GithubEventsLambdaTest.java index f99f5ca..b078724 100644 --- a/src/test/java/org/opensearchmetrics/lambda/GithubEventsLambdaTest.java +++ b/src/test/java/org/opensearchmetrics/lambda/GithubEventsLambdaTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.lambda; import com.amazonaws.services.lambda.runtime.Context; diff --git a/src/test/java/org/opensearchmetrics/lambda/MetricsLambdaTest.java b/src/test/java/org/opensearchmetrics/lambda/MetricsLambdaTest.java index 2e2ea3f..a9f40e5 100644 --- a/src/test/java/org/opensearchmetrics/lambda/MetricsLambdaTest.java +++ b/src/test/java/org/opensearchmetrics/lambda/MetricsLambdaTest.java @@ -6,7 +6,6 @@ * this file be licensed under the Apache-2.0 license or a * compatible open source license. */ - package org.opensearchmetrics.lambda; import com.amazonaws.services.lambda.runtime.Context; diff --git a/src/test/java/org/opensearchmetrics/lambda/SlackLambdaTest.java b/src/test/java/org/opensearchmetrics/lambda/SlackLambdaTest.java index 7c749b1..33e4f29 100644 --- a/src/test/java/org/opensearchmetrics/lambda/SlackLambdaTest.java +++ b/src/test/java/org/opensearchmetrics/lambda/SlackLambdaTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.lambda; import com.amazonaws.services.lambda.runtime.Context; diff --git a/src/test/java/org/opensearchmetrics/metrics/MetricsCalculationTest.java b/src/test/java/org/opensearchmetrics/metrics/MetricsCalculationTest.java index 9967985..969bf33 100644 --- a/src/test/java/org/opensearchmetrics/metrics/MetricsCalculationTest.java +++ b/src/test/java/org/opensearchmetrics/metrics/MetricsCalculationTest.java @@ -6,7 +6,6 @@ * this file be licensed under the Apache-2.0 license or a * compatible open source license. */ - package org.opensearchmetrics.metrics; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/src/test/java/org/opensearchmetrics/metrics/events/GithubEventsTest.java b/src/test/java/org/opensearchmetrics/metrics/events/GithubEventsTest.java index 17062f6..eaa7481 100644 --- a/src/test/java/org/opensearchmetrics/metrics/events/GithubEventsTest.java +++ b/src/test/java/org/opensearchmetrics/metrics/events/GithubEventsTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.events; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/opensearchmetrics/metrics/general/ClosedIssuesTest.java b/src/test/java/org/opensearchmetrics/metrics/general/ClosedIssuesTest.java index 2981be7..409d8a8 100644 --- a/src/test/java/org/opensearchmetrics/metrics/general/ClosedIssuesTest.java +++ b/src/test/java/org/opensearchmetrics/metrics/general/ClosedIssuesTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/opensearchmetrics/metrics/general/CreatedIssuesTest.java b/src/test/java/org/opensearchmetrics/metrics/general/CreatedIssuesTest.java index 97ef9c1..74b3b0f 100644 --- a/src/test/java/org/opensearchmetrics/metrics/general/CreatedIssuesTest.java +++ b/src/test/java/org/opensearchmetrics/metrics/general/CreatedIssuesTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/opensearchmetrics/metrics/general/IssueCommentsTest.java b/src/test/java/org/opensearchmetrics/metrics/general/IssueCommentsTest.java index 64e6924..3e89544 100644 --- a/src/test/java/org/opensearchmetrics/metrics/general/IssueCommentsTest.java +++ b/src/test/java/org/opensearchmetrics/metrics/general/IssueCommentsTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/opensearchmetrics/metrics/general/IssueNegativeReactionsTest.java b/src/test/java/org/opensearchmetrics/metrics/general/IssueNegativeReactionsTest.java index 1949a73..a549a46 100644 --- a/src/test/java/org/opensearchmetrics/metrics/general/IssueNegativeReactionsTest.java +++ b/src/test/java/org/opensearchmetrics/metrics/general/IssueNegativeReactionsTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/opensearchmetrics/metrics/general/IssuePositiveReactionsTest.java b/src/test/java/org/opensearchmetrics/metrics/general/IssuePositiveReactionsTest.java index ad03f3a..b42415a 100644 --- a/src/test/java/org/opensearchmetrics/metrics/general/IssuePositiveReactionsTest.java +++ b/src/test/java/org/opensearchmetrics/metrics/general/IssuePositiveReactionsTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/opensearchmetrics/metrics/general/MergedPullRequestsTest.java b/src/test/java/org/opensearchmetrics/metrics/general/MergedPullRequestsTest.java index 57aac17..2639622 100644 --- a/src/test/java/org/opensearchmetrics/metrics/general/MergedPullRequestsTest.java +++ b/src/test/java/org/opensearchmetrics/metrics/general/MergedPullRequestsTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/opensearchmetrics/metrics/general/MetricsTest.java b/src/test/java/org/opensearchmetrics/metrics/general/MetricsTest.java index dbba87e..28f32b9 100644 --- a/src/test/java/org/opensearchmetrics/metrics/general/MetricsTest.java +++ b/src/test/java/org/opensearchmetrics/metrics/general/MetricsTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/opensearchmetrics/metrics/general/OpenIssuesTest.java b/src/test/java/org/opensearchmetrics/metrics/general/OpenIssuesTest.java index 59e8712..cb9c8a4 100644 --- a/src/test/java/org/opensearchmetrics/metrics/general/OpenIssuesTest.java +++ b/src/test/java/org/opensearchmetrics/metrics/general/OpenIssuesTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/opensearchmetrics/metrics/general/OpenPullRequestsTest.java b/src/test/java/org/opensearchmetrics/metrics/general/OpenPullRequestsTest.java index 3825ce9..61194d9 100644 --- a/src/test/java/org/opensearchmetrics/metrics/general/OpenPullRequestsTest.java +++ b/src/test/java/org/opensearchmetrics/metrics/general/OpenPullRequestsTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/opensearchmetrics/metrics/general/PullCommentsTest.java b/src/test/java/org/opensearchmetrics/metrics/general/PullCommentsTest.java index 7b23362..6eaacc1 100644 --- a/src/test/java/org/opensearchmetrics/metrics/general/PullCommentsTest.java +++ b/src/test/java/org/opensearchmetrics/metrics/general/PullCommentsTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/opensearchmetrics/metrics/general/UncommentedPullRequestsTest.java b/src/test/java/org/opensearchmetrics/metrics/general/UncommentedPullRequestsTest.java index 52e3f13..0657289 100644 --- a/src/test/java/org/opensearchmetrics/metrics/general/UncommentedPullRequestsTest.java +++ b/src/test/java/org/opensearchmetrics/metrics/general/UncommentedPullRequestsTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/opensearchmetrics/metrics/general/UnlabelledIssuesTest.java b/src/test/java/org/opensearchmetrics/metrics/general/UnlabelledIssuesTest.java index 3e22489..9a35d3e 100644 --- a/src/test/java/org/opensearchmetrics/metrics/general/UnlabelledIssuesTest.java +++ b/src/test/java/org/opensearchmetrics/metrics/general/UnlabelledIssuesTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/opensearchmetrics/metrics/general/UnlabelledPullRequestsTest.java b/src/test/java/org/opensearchmetrics/metrics/general/UnlabelledPullRequestsTest.java index c8b644f..8a84bf6 100644 --- a/src/test/java/org/opensearchmetrics/metrics/general/UnlabelledPullRequestsTest.java +++ b/src/test/java/org/opensearchmetrics/metrics/general/UnlabelledPullRequestsTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/opensearchmetrics/metrics/general/UntriagedIssuesTest.java b/src/test/java/org/opensearchmetrics/metrics/general/UntriagedIssuesTest.java index 3aca7ec..18693f1 100644 --- a/src/test/java/org/opensearchmetrics/metrics/general/UntriagedIssuesTest.java +++ b/src/test/java/org/opensearchmetrics/metrics/general/UntriagedIssuesTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.general; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/opensearchmetrics/metrics/label/LabelMetricsTest.java b/src/test/java/org/opensearchmetrics/metrics/label/LabelMetricsTest.java index a332ce7..1725360 100644 --- a/src/test/java/org/opensearchmetrics/metrics/label/LabelMetricsTest.java +++ b/src/test/java/org/opensearchmetrics/metrics/label/LabelMetricsTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.label; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/opensearchmetrics/metrics/release/ReleaseBranchCheckerTest.java b/src/test/java/org/opensearchmetrics/metrics/release/ReleaseBranchCheckerTest.java index 9f4be63..f440eb6 100644 --- a/src/test/java/org/opensearchmetrics/metrics/release/ReleaseBranchCheckerTest.java +++ b/src/test/java/org/opensearchmetrics/metrics/release/ReleaseBranchCheckerTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.release; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/opensearchmetrics/metrics/release/ReleaseInputsTest.java b/src/test/java/org/opensearchmetrics/metrics/release/ReleaseInputsTest.java index ade51e5..27e1c27 100644 --- a/src/test/java/org/opensearchmetrics/metrics/release/ReleaseInputsTest.java +++ b/src/test/java/org/opensearchmetrics/metrics/release/ReleaseInputsTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.release; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/opensearchmetrics/metrics/release/ReleaseIssueCheckerTest.java b/src/test/java/org/opensearchmetrics/metrics/release/ReleaseIssueCheckerTest.java index c3547dd..88dbfd9 100644 --- a/src/test/java/org/opensearchmetrics/metrics/release/ReleaseIssueCheckerTest.java +++ b/src/test/java/org/opensearchmetrics/metrics/release/ReleaseIssueCheckerTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.release; import org.junit.jupiter.api.BeforeEach; diff --git a/src/test/java/org/opensearchmetrics/metrics/release/ReleaseLabelIssuesFetcherTest.java b/src/test/java/org/opensearchmetrics/metrics/release/ReleaseLabelIssuesFetcherTest.java index 6392474..05e0138 100644 --- a/src/test/java/org/opensearchmetrics/metrics/release/ReleaseLabelIssuesFetcherTest.java +++ b/src/test/java/org/opensearchmetrics/metrics/release/ReleaseLabelIssuesFetcherTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.release; import org.apache.lucene.search.TotalHits; diff --git a/src/test/java/org/opensearchmetrics/metrics/release/ReleaseLabelPullsFetcherTest.java b/src/test/java/org/opensearchmetrics/metrics/release/ReleaseLabelPullsFetcherTest.java index 0f4c077..f73f35a 100644 --- a/src/test/java/org/opensearchmetrics/metrics/release/ReleaseLabelPullsFetcherTest.java +++ b/src/test/java/org/opensearchmetrics/metrics/release/ReleaseLabelPullsFetcherTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.release; import org.apache.lucene.search.TotalHits; diff --git a/src/test/java/org/opensearchmetrics/metrics/release/ReleaseMetricsTest.java b/src/test/java/org/opensearchmetrics/metrics/release/ReleaseMetricsTest.java index 68e856d..fed9b84 100644 --- a/src/test/java/org/opensearchmetrics/metrics/release/ReleaseMetricsTest.java +++ b/src/test/java/org/opensearchmetrics/metrics/release/ReleaseMetricsTest.java @@ -6,7 +6,6 @@ * this file be licensed under the Apache-2.0 license or a * compatible open source license. */ - package org.opensearchmetrics.metrics.release; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/src/test/java/org/opensearchmetrics/metrics/release/ReleaseNotesCheckerTest.java b/src/test/java/org/opensearchmetrics/metrics/release/ReleaseNotesCheckerTest.java index a7d2d3b..455867a 100644 --- a/src/test/java/org/opensearchmetrics/metrics/release/ReleaseNotesCheckerTest.java +++ b/src/test/java/org/opensearchmetrics/metrics/release/ReleaseNotesCheckerTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.release; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/opensearchmetrics/metrics/release/ReleaseRepoFetcherTest.java b/src/test/java/org/opensearchmetrics/metrics/release/ReleaseRepoFetcherTest.java index f9e7ff1..5d2dc68 100644 --- a/src/test/java/org/opensearchmetrics/metrics/release/ReleaseRepoFetcherTest.java +++ b/src/test/java/org/opensearchmetrics/metrics/release/ReleaseRepoFetcherTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.metrics.release; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/opensearchmetrics/metrics/release/ReleaseVersionIncrementCheckerTest.java b/src/test/java/org/opensearchmetrics/metrics/release/ReleaseVersionIncrementCheckerTest.java index ffc0d34..c53eb2a 100644 --- a/src/test/java/org/opensearchmetrics/metrics/release/ReleaseVersionIncrementCheckerTest.java +++ b/src/test/java/org/opensearchmetrics/metrics/release/ReleaseVersionIncrementCheckerTest.java @@ -6,7 +6,6 @@ * this file be licensed under the Apache-2.0 license or a * compatible open source license. */ - package org.opensearchmetrics.metrics.release; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/src/test/java/org/opensearchmetrics/model/CustomLongSerializerTest.java b/src/test/java/org/opensearchmetrics/model/CustomLongSerializerTest.java index 5373897..c07591f 100644 --- a/src/test/java/org/opensearchmetrics/model/CustomLongSerializerTest.java +++ b/src/test/java/org/opensearchmetrics/model/CustomLongSerializerTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.model; import com.fasterxml.jackson.core.JsonGenerator; diff --git a/src/test/java/org/opensearchmetrics/model/alarm/AlarmDataTest.java b/src/test/java/org/opensearchmetrics/model/alarm/AlarmDataTest.java index aa20f1b..eda9bb1 100644 --- a/src/test/java/org/opensearchmetrics/model/alarm/AlarmDataTest.java +++ b/src/test/java/org/opensearchmetrics/model/alarm/AlarmDataTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.model.alarm; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/src/test/java/org/opensearchmetrics/model/event/EventDataTest.java b/src/test/java/org/opensearchmetrics/model/event/EventDataTest.java index 8ce3af1..d4ccaff 100644 --- a/src/test/java/org/opensearchmetrics/model/event/EventDataTest.java +++ b/src/test/java/org/opensearchmetrics/model/event/EventDataTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.model.event; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/src/test/java/org/opensearchmetrics/model/general/MetricsDataTest.java b/src/test/java/org/opensearchmetrics/model/general/MetricsDataTest.java index d87c322..25c38d3 100644 --- a/src/test/java/org/opensearchmetrics/model/general/MetricsDataTest.java +++ b/src/test/java/org/opensearchmetrics/model/general/MetricsDataTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.model.general; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/src/test/java/org/opensearchmetrics/model/label/LabelDataTest.java b/src/test/java/org/opensearchmetrics/model/label/LabelDataTest.java index e4bc33f..3149857 100644 --- a/src/test/java/org/opensearchmetrics/model/label/LabelDataTest.java +++ b/src/test/java/org/opensearchmetrics/model/label/LabelDataTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.model.label; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/src/test/java/org/opensearchmetrics/model/release/ReleaseMetricsDataTest.java b/src/test/java/org/opensearchmetrics/model/release/ReleaseMetricsDataTest.java index 9aa4648..1be4a45 100644 --- a/src/test/java/org/opensearchmetrics/model/release/ReleaseMetricsDataTest.java +++ b/src/test/java/org/opensearchmetrics/model/release/ReleaseMetricsDataTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.model.release; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/src/test/java/org/opensearchmetrics/util/OpenSearchUtilTest.java b/src/test/java/org/opensearchmetrics/util/OpenSearchUtilTest.java index 98338f3..6ed3fb7 100644 --- a/src/test/java/org/opensearchmetrics/util/OpenSearchUtilTest.java +++ b/src/test/java/org/opensearchmetrics/util/OpenSearchUtilTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.util; import org.junit.jupiter.api.BeforeEach; diff --git a/src/test/java/org/opensearchmetrics/util/S3UtilTest.java b/src/test/java/org/opensearchmetrics/util/S3UtilTest.java index 863e4d4..48432b1 100644 --- a/src/test/java/org/opensearchmetrics/util/S3UtilTest.java +++ b/src/test/java/org/opensearchmetrics/util/S3UtilTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.util; import org.junit.jupiter.api.BeforeEach; diff --git a/src/test/java/org/opensearchmetrics/util/SecretsManagerUtilTest.java b/src/test/java/org/opensearchmetrics/util/SecretsManagerUtilTest.java index 732242e..7191e73 100644 --- a/src/test/java/org/opensearchmetrics/util/SecretsManagerUtilTest.java +++ b/src/test/java/org/opensearchmetrics/util/SecretsManagerUtilTest.java @@ -1,3 +1,11 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearchmetrics.util; import static org.junit.jupiter.api.Assertions.*;