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

[aws-codebuild] ReportGroup does not use provided name property #11052

Closed
BrianFarnhill opened this issue Oct 23, 2020 · 2 comments · Fixed by #11080
Closed

[aws-codebuild] ReportGroup does not use provided name property #11052

BrianFarnhill opened this issue Oct 23, 2020 · 2 comments · Fixed by #11080
Assignees
Labels
@aws-cdk/aws-codebuild Related to AWS CodeBuild bug This issue is a bug. effort/small Small work item – less than a day of effort good first issue Related to contributions. See CONTRIBUTING.md p1

Comments

@BrianFarnhill
Copy link

BrianFarnhill commented Oct 23, 2020

When using the ReportGroup construct, if you specify the reportGroupName property the resulting CloudFormation does not output the Name property at all.

Reproduction Steps

Code to reproduce this:

import * as cdk from '@aws-cdk/core';
import * as codebuild from '@aws-cdk/aws-codebuild';

export class ReportGroupBugStack extends cdk.Stack {
  constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    new codebuild.ReportGroup(this, "DemoGroupName", {
      reportGroupName: "Example Group Name"
    })
  }
}

What did you expect to happen?

The resource I expect would look like this:

    "DemoGroupName5FAD2957": {
      "Type": "AWS::CodeBuild::ReportGroup",
      "Properties": {
        "Name": "Example Group Name",
        "ExportConfig": {
          "ExportConfigType": "NO_EXPORT"
        },
        "Type": "TEST"
      },
      "UpdateReplacePolicy": "Retain",
      "DeletionPolicy": "Retain",
      "Metadata": {
        "aws:cdk:path": "ReportGroupBugStack/DemoGroupName/Resource"
      }
    },

What actually happened?

This is the output I get (note the missing name property)

    "DemoGroupName5FAD2957": {
      "Type": "AWS::CodeBuild::ReportGroup",
      "Properties": {
        "ExportConfig": {
          "ExportConfigType": "NO_EXPORT"
        },
        "Type": "TEST"
      },
      "UpdateReplacePolicy": "Retain",
      "DeletionPolicy": "Retain",
      "Metadata": {
        "aws:cdk:path": "ReportGroupBugStack/DemoGroupName/Resource"
      }
    },

Environment

  • CLI Version : 1.69.0 (build 2b474b9)
  • Framework Version: 1.69.0
  • Node.js Version: v12.18.4
  • OS : Ubuntu 18.04 (Windows Subsystem For Linux)
  • Language (Version): TypeScript (3.9.7)

This is 🐛 Bug Report

@BrianFarnhill BrianFarnhill added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 23, 2020
@github-actions github-actions bot added the @aws-cdk/aws-codebuild Related to AWS CodeBuild label Oct 23, 2020
@skinny85
Copy link
Contributor

skinny85 commented Oct 23, 2020

Hey @BrianFarnhill ,

thanks for opening the issue. You are absolutely right that this is a bug.

Any chance you can open us a PR fixing it? It should be as simple as adding the line name: props.reportGroupName here (plus a unit test, of course 😉). Our contributing docs are here.

Thanks,
Adam

@skinny85 skinny85 added effort/small Small work item – less than a day of effort good first issue Related to contributions. See CONTRIBUTING.md p1 and removed needs-triage This issue or PR still needs to be triaged. labels Oct 23, 2020
AnderEnder added a commit to AnderEnder/aws-cdk that referenced this issue Oct 23, 2020
@mergify mergify bot closed this as completed in #11080 Oct 24, 2020
mergify bot pushed a commit that referenced this issue Oct 24, 2020
Closes #11052

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-codebuild Related to AWS CodeBuild bug This issue is a bug. effort/small Small work item – less than a day of effort good first issue Related to contributions. See CONTRIBUTING.md p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants