From 2abbfdd9f673ea1be49a273745d53a099e1b86a9 Mon Sep 17 00:00:00 2001 From: Mike Alfare <13974384+mikealfare@users.noreply.github.com> Date: Thu, 8 Feb 2024 15:03:02 -0500 Subject: [PATCH 1/3] Update internal issue templates (#75) --- .github/ISSUE_TEMPLATE/internal-epic.yml | 47 +++++++++++-------- .../internal-feature-implementation.yml | 25 ++++++++-- 2 files changed, 47 insertions(+), 25 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/internal-epic.yml b/.github/ISSUE_TEMPLATE/internal-epic.yml index 94bb91a4..504514a3 100644 --- a/.github/ISSUE_TEMPLATE/internal-epic.yml +++ b/.github/ISSUE_TEMPLATE/internal-epic.yml @@ -29,13 +29,36 @@ body: attributes: label: Objectives description: | - What are the goals we are trying to achieve? Provide use cases if available. - placeholder: | - - [ ] Add option to ... - - [ ] Allow adapter maintainers to configure ... + What are the high level goals we are trying to achieve? Provide use cases if available. + + Example: + - [ ] Allow adapter maintainers to support custom materializations + - [ ] Reduce maintenance burden for incremental users by offering materialized views + value: | + ```[tasklist] + - [ ] Objective + ``` validations: required: true + - type: textarea + attributes: + label: Implementation tasks + description: | + Provide a list of GH issues that will build out this functionality. + This may start empty, or as a checklist of items. + However, it should eventually become a list of Feature Implementation tickets. + + Example: + - [ ] Create new macro to select warehouse + - [ ] https://github.com/dbt-labs/dbt-adapters/issues/42 + value: | + ```[tasklist] + - [ ] Task + ``` + validations: + required: false + - type: textarea attributes: label: Consequences @@ -48,19 +71,3 @@ body: - This allows internal analytics to do more robust analysis of infrastructure usage (Add the `Impact:[Analytics]` label.) validations: required: true - - - type: textarea - attributes: - label: Implementation tasks - description: | - Provide a list of GH issues that will build out this functionality. This may start empty. - placeholder: | - - [ ] https://github.com/dbt-labs/dbt-adapters/issues/123 - - [ ] https://github.com/dbt-labs/dbt-postgres/issues/456 - value: | - ```[tasklist] - ### Implementation tasks - - [ ] - ``` - validations: - required: false diff --git a/.github/ISSUE_TEMPLATE/internal-feature-implementation.yml b/.github/ISSUE_TEMPLATE/internal-feature-implementation.yml index baea3b56..f6dfd78c 100644 --- a/.github/ISSUE_TEMPLATE/internal-feature-implementation.yml +++ b/.github/ISSUE_TEMPLATE/internal-feature-implementation.yml @@ -41,6 +41,14 @@ body: label: Acceptance criteria description: | What is the definition of done for this feature? Include any relevant edge cases and/or test cases. + + Example: + - [ ] If there are no config changes, don't alter the materialized view + - [ ] If the materialized view is scheduled to refresh, a manual refresh should not be issued + value: | + ```[tasklist] + - [ ] Criterion + ``` validations: required: true @@ -48,10 +56,16 @@ body: attributes: label: Suggested tests description: | - Provide scenarios to test. Include both positive and negative tests if possible. Link to existing similar tests if appropriate. - placeholder: | - 1. Test with no `materialized` field in the model config. Expect pass. - 2. Test with a `materialized` field in the model config that is not valid. Expect ConfigError. + Provide scenarios to test. Include both positive and negative tests if possible. + Link to existing similar tests if appropriate. + + Example: + - [ ] Test with no `materialized` field in the model config. Expect pass. + - [ ] Test with a `materialized` field in the model config that is not valid. Expect ConfigError. + value: | + ```[tasklist] + - [ ] Test + ``` validations: required: true @@ -62,6 +76,7 @@ body: Will this impact dbt Labs' ability, or a partner's ability, to make a related change? Call that out for discussion. Review `Impact:` labels to ensure they capture these consequences. placeholder: | - Example: This change impacts `dbt-databricks` because we updated a macro in `dbt-spark`. (Add the `Impact:[Databricks]` label.) + Example: + - This change impacts `dbt-databricks` because we updated a macro in `dbt-spark`. (Add the `Impact:[Databricks]` label.) validations: required: true From 2e5e97e3e9be7061fcb3f04e270bfa8fb0ab8038 Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Thu, 8 Feb 2024 13:13:00 -0700 Subject: [PATCH 2/3] GitHub Action to close issues as stale as-needed (#73) Co-authored-by: Mike Alfare <13974384+mikealfare@users.noreply.github.com> --- .github/workflows/stale.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 00000000..75a14dd4 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,30 @@ +# **what?** +# For issues that have been open for awhile without activity, label +# them as stale with a warning that they will be closed out. If +# anyone comments to keep the issue open, it will automatically +# remove the stale label and keep it open. + +# Stale label rules: +# awaiting_response, more_information_needed -> 90 days +# good_first_issue, help_wanted -> 360 days (a year) +# tech_debt -> 720 (2 years) +# all else defaults -> 180 days (6 months) + +# **why?** +# To keep the repo in a clean state from issues that aren't relevant anymore + +# **when?** +# Once a day + +name: "Close stale issues and PRs" +on: + schedule: + - cron: "30 1 * * *" + +permissions: + issues: write + pull-requests: write + +jobs: + stale: + uses: dbt-labs/actions/.github/workflows/stale-bot-matrix.yml@main From cb08aaeb29242d7062ef7db6a31911f6583881e0 Mon Sep 17 00:00:00 2001 From: Mike Alfare <13974384+mikealfare@users.noreply.github.com> Date: Thu, 8 Feb 2024 15:15:03 -0500 Subject: [PATCH 3/3] Add triaging action (#70) --- .github/workflows/resubmit-for-triage.yml | 31 +++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/resubmit-for-triage.yml diff --git a/.github/workflows/resubmit-for-triage.yml b/.github/workflows/resubmit-for-triage.yml new file mode 100644 index 00000000..385ef820 --- /dev/null +++ b/.github/workflows/resubmit-for-triage.yml @@ -0,0 +1,31 @@ +# **what?** +# When triaging submissions, we sometimes need more information from the issue creator. +# In those cases we remove the `triage` label and add the `awaiting_response` label. +# Once we receive a response in the form of a comment, we want the `awaiting_response` label removed +# and the `triage` label added so that we are aware that the issue needs action. + +# **why?** +# This automates a part of issue triaging while also removing noise from triage lists. + +# **when?** +# This will run when a comment is added to an issue and that issue has an `awaiting_response` label. + +name: Resubmit for Triage + +on: issue_comment + +defaults: + run: + shell: bash + +permissions: + issues: write + +jobs: + triage_label: + if: contains(github.event.issue.labels.*.name, 'awaiting_response') + uses: dbt-labs/actions/.github/workflows/swap-labels.yml@main + with: + add_label: "triage" + remove_label: "awaiting_response" + secrets: inherit # this is only acceptable because we own the action we're calling