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

Migrate/Remove GitHub HashiBot Behaviors #19356

Closed
bflad opened this issue May 13, 2021 · 2 comments · Fixed by #19729
Closed

Migrate/Remove GitHub HashiBot Behaviors #19356

bflad opened this issue May 13, 2021 · 2 comments · Fixed by #19729
Assignees
Labels
provider Pertains to the provider itself, rather than any interaction with AWS. technical-debt Addresses areas of the codebase that need refactoring or redesign.
Milestone

Comments

@bflad
Copy link
Contributor

bflad commented May 13, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

GitHub HashiBot is being deprecated and decommissioned in preference of GitHub Actions. This issue to track behavior removals and migrations for this repository.

closed_issue_locker Migration

This behavior can be migrated to the dessant/lock-threads GitHub Action.

.github/workflows/lock.yml

name: 'Lock Threads'

on:
  schedule:
    - cron: '50 1 * * *'

jobs:
  lock:
    runs-on: ubuntu-latest
    steps:
      - uses: dessant/lock-threads@v2
        with:
          github-token: ${{ github.token }}
          issue-lock-comment: >
            I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

            If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
          issue-lock-inactive-days: '30'
          pr-lock-comment: >
            I'm going to lock this pull request because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

            If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
          pr-lock-inactive-days: '30'

deprecated_import_commenter Removal

This behavior was designed to add comments to pull requests containing certain Go imports. For example, when migrating Terraform Providers from Terraform Plugin SDK version 1 to 2, the entire existing codebase would be bulk updated, leaving existing (and for a short period new) pull request contributions in an invalid state for merging. Pull request open and next synchronize would trigger the comment once the behavior was in place.

Given this behavior is only enabled by the terraform-provider-aws repository today and there are no recent Go import deprecations, no replacement is provided. The behavior could be captured in a new GitHub Action, if desired and when necessary.

pull_request_path_labeler Migration

This behavior can be migrated to the actions/labeler GitHub Action.

.github/workflows/pull-request.yml

name: "Pull Request Triage"

on: [pull_request_target]

jobs:
  triage:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/labeler@v3
      with:
        configuration-path: .github/labeler-pull-request-triage.yml
        repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/labeler-pull-request-triage.yml

dependencies:
  - .github/dependabot.yml
documentation:
  - docs/**/*
  - website/**/*
  - *.md
examples:
  - examples/**/*
provider:
  - *.md
  - .github/**/*
  - .gitignore
  - .go-version
  - aws/auth_helpers.go
  - aws/awserr.go
  - aws/config.go
  - aws/*_aws_arn*
  - aws/*_aws_ip_ranges*
  - aws/*_aws_partition*
  - aws/*_aws_region*
  - aws/internal/flatmap/**/*
  - aws/internal/keyvaluetags/**/*
  - aws/internal/naming/**/*
  - aws/provider.go
  - aws/utils.go
  - docs/*.md
  - docs/contributing/**/*
  - GNUmakefile
  - infrastructure/**/*
  - main.go
  - website/docs/index.html.markdown
  - website/**/arn*
  - website/**/ip_ranges*
  - website/**/partition*
  - website/**/region*
service/accessanalyzer:
  - aws/internal/service/accessanalyzer/**/*
  - **/*_accessanalyzer_*
  - **/accessanalyzer_*
service/acm:
  - aws/internal/service/acm/**/*
  - **/*_acm_*
  - **/acm_*
# ... many more services ...
tests:
  - **/*_test.go
  - **/testdata/**/*
  - .github/workflows/*
  - .golangci.yml
  - .markdownlinkcheck.json
  - .markdownlint.yml
  - staticcheck.conf

pull_request_size_labeler Migration

This behavior can be migrated to the codelytv/pr-size-labeler GitHub Action.

.github/workflows/pull-request-size.yml

name: "Pull Request Size Labeler"

on: [pull_request]

jobs:
  labeler:
    runs-on: ubuntu-latest
    name: Label the PR size
    steps:
      - uses: codelytv/pr-size-labeler@v1
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          xs_max_size: '30'
          s_max_size: '60'
          m_max_size: '150'
          l_max_size: '300'

regexp_issue_labeler_v2 Migration

This behavior can be migrated to the actions/issue-labeler GitHub Action. The issue labeling workflow is already present in .github/workflows/issues.yml, it just needs the label configuration migrated.

.github/labeler-issue-triage.yml

bug:
  # General:
  #   panic:
  # AWS SDK Go:
  #   ValidationException:.*failed to satisfy constraint: Member must not be null
  # Terraform CLI:
  #   Provider produced inconsistent final plan
  #   Provider produced inconsistent result after apply
  #   produced an invalid new value
  #   produced an unexpected new value
  # Terraform Plugin SDK:
  #   doesn't support update
  #   Invalid address to set
  - "(doesn't support update|failed to satisfy constraint: Member must not be null|Invalid address to set|panic:|produced an (invalid|unexpected) new value|Provider produced inconsistent (final plan|result after apply))"
crash:
  - 'panic:'
service/accessanalyzer:
  - '((\*|-) ?`?)?(data "?|resource "?)aws_accessanalyzer_'
service/acm:
  - '((\*|-) ?`?)?(data "?|resource "?)aws_acm_'
# ... many more services ...

release_commenter Migration

TBD

remove_labels_on_reply Migration

This behavior can be migrated to the actions-ecosystem/action-remove-labels GitHub Action.

.github/workflows/issue-comment-created.yml

name: Issue Comment Created Triage

on:
  issue_comment:
    types: [created]

jobs:
  issue_comment_triage:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2 
      - uses: actions-ecosystem/action-remove-labels@v1
        with:
          labels: |
            stale
            waiting-reply
@bflad bflad added technical-debt Addresses areas of the codebase that need refactoring or redesign. provider Pertains to the provider itself, rather than any interaction with AWS. labels May 13, 2021
@github-actions github-actions bot added bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. labels May 13, 2021
@bflad bflad removed bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. labels May 13, 2021
bflad added a commit that referenced this issue May 13, 2021
bflad added a commit that referenced this issue May 13, 2021
Reference: #19356

Lift and shift of existing labeling configuration with conversion to YAML syntax.
ewbankkit pushed a commit that referenced this issue May 20, 2021
Reference: #19356

Lift and shift of existing labeling configuration with conversion to YAML syntax.
bflad added a commit that referenced this issue May 27, 2021
bflad added a commit that referenced this issue May 27, 2021
@bflad bflad self-assigned this Jun 9, 2021
@github-actions github-actions bot added this to the v3.45.0 milestone Jun 9, 2021
@github-actions
Copy link

This functionality has been released in v3.45.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
provider Pertains to the provider itself, rather than any interaction with AWS. technical-debt Addresses areas of the codebase that need refactoring or redesign.
Projects
None yet
1 participant