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

chore: disable codecov from v2-release branch #32125

Merged
merged 1 commit into from
Nov 14, 2024
Merged
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
8 changes: 5 additions & 3 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
name: collect
if: github.repository == 'aws/aws-cdk'
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -19,10 +21,10 @@ jobs:
uses: actions/setup-node@v4

- name: Install dependencies
run: cd packages/aws-cdk && yarn install
Copy link
Contributor Author

@iliapolo iliapolo Nov 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we don't need to cd here - it does the exact same thing without it.

run: yarn install

- name: Build CLI
run: cd packages/aws-cdk && npx lerna run build --scope=aws-cdk
Copy link
Contributor Author

@iliapolo iliapolo Nov 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we don't need to cd here - it does the exact same thing without it.

run: npx lerna run build --scope=aws-cdk

- name: Run tests
run: cd packages/aws-cdk && yarn test
Expand All @@ -33,4 +35,4 @@ jobs:
directory: packages/aws-cdk/coverage
fail_ci_if_error: true
flags: suite.unit
token: ${{ secrets.CODECOV_TOKEN }}
use_oidc: true
Copy link
Contributor Author

@iliapolo iliapolo Nov 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switch from token based authentication to OIDC. Verified to work here. This is really nice as it allows us to entirely remove the need for a long lived token.

See https://github.com/codecov/codecov-action?tab=readme-ov-file#using-oidc

24 changes: 0 additions & 24 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ queue_rules:
- "#changes-requested-reviews-by=0"
- status-success~=AWS CodeBuild us-east-1
- status-success=validate-pr
- status-success=codecov/patch
- status-success=codecov/patch/packages/aws-cdk
- status-success=codecov/project
- status-success=codecov/project/packages/aws-cdk
commit_message_template: |-
{{ title }} (#{{ number }})
{{ body }}
Expand All @@ -37,10 +33,6 @@ queue_rules:
- "#changes-requested-reviews-by=0"
- status-success~=AWS CodeBuild us-east-1
- status-success=validate-pr
- status-success=codecov/patch
- status-success=codecov/patch/packages/aws-cdk
- status-success=codecov/project
- status-success=codecov/project/packages/aws-cdk
commit_message_template: |-
{{ title }} (#{{ number }})
{{ body }}
Expand Down Expand Up @@ -72,10 +64,6 @@ pull_request_rules:
- "#changes-requested-reviews-by=0"
- status-success~=AWS CodeBuild us-east-1
- status-success=validate-pr
- status-success=codecov/patch
- status-success=codecov/patch/packages/aws-cdk
- status-success=codecov/project
- status-success=codecov/project/packages/aws-cdk
- name: automatic merge (2+ approvers)
actions:
comment:
Expand All @@ -96,10 +84,6 @@ pull_request_rules:
- "#changes-requested-reviews-by=0"
- status-success~=AWS CodeBuild us-east-1
- status-success=validate-pr
- status-success=codecov/patch
- status-success=codecov/patch/packages/aws-cdk
- status-success=codecov/project
- status-success=codecov/project/packages/aws-cdk
- name: automatic merge (no-squash)
actions:
comment:
Expand All @@ -120,10 +104,6 @@ pull_request_rules:
- "#changes-requested-reviews-by=0"
- status-success~=AWS CodeBuild us-east-1
- status-success=validate-pr
- status-success=codecov/patch
- status-success=codecov/patch/packages/aws-cdk
- status-success=codecov/project
- status-success=codecov/project/packages/aws-cdk
- name: remove stale reviews
actions:
dismiss_reviews:
Expand Down Expand Up @@ -163,7 +143,3 @@ pull_request_rules:
- "#changes-requested-reviews-by=0"
- status-success~=AWS CodeBuild us-east-1
- status-success=validate-pr
- status-success=codecov/patch
- status-success=codecov/patch/packages/aws-cdk
- status-success=codecov/project
- status-success=codecov/project/packages/aws-cdk
3 changes: 2 additions & 1 deletion packages/aws-cdk/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ module.exports = {
lines: 81
},
},
"coveragePathIgnorePatterns": [
coveragePathIgnorePatterns: [
...baseConfig.coveragePathIgnorePatterns,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In #31702, we inadvertently overridden the base config, instead of adding to it. This caused our test utility files to be included in the coverage report.

See https://app.codecov.io/github/aws/aws-cdk/blob/main/packages%2Faws-cdk%2Ftest%2Fapi%2Ffake-sts.ts

// Mostly wrappers around the SDK, which get mocked in unit tests
"<rootDir>/lib/api/aws-auth/sdk.ts",
],
Expand Down
6 changes: 3 additions & 3 deletions packages/aws-cdk/lib/api/logs/logs-monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ export class CloudWatchLogEventMonitor {
}

private async tick(): Promise<void> {
// excluding from codecoverage because this
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is bizarre but i'm seeing sporadic behavior with respect to coverage of the if statement itself.

Our current report says its uncovered - but how can that be if the other lines of function ARE covered?
Lets disable this until we get to the bottom of it because it introduces sporadic coverage.

Followup to #32107.

// doesn't always run (depends on timing)
/* istanbul ignore next */
if (!this.active) {
// excluding from codecoverage because this
// doesn't always run (depends on timing)
/* istanbul ignore next */
return;
}
try {
Expand Down
Loading