Skip to content

Commit

Permalink
Resolves merge conflicts (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
racheldaniel authored Dec 16, 2022
1 parent 8ceb71f commit abdd6b3
Show file tree
Hide file tree
Showing 60 changed files with 2,692 additions and 459 deletions.
3 changes: 3 additions & 0 deletions .changes/0.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Previous Releases

For information on prior major and minor releases, see their changelogs:
53 changes: 53 additions & 0 deletions .changes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# CHANGELOG Automation

We use [changie](https://changie.dev/) to automate `CHANGELOG` generation. For installation and format/command specifics, see the documentation.

### Quick Tour

- All new change entries get generated under `/.changes/unreleased` as a yaml file
- `header.tpl.md` contains the contents of the entire CHANGELOG file
- `0.0.0.md` contains the contents of the footer for the entire CHANGELOG file. changie looks to be in the process of supporting a footer file the same as it supports a header file. Switch to that when available. For now, the 0.0.0 in the file name forces it to the bottom of the changelog no matter what version we are releasing.
- `.changie.yaml` contains the fields in a change, the format of a single change, as well as the format of the Contributors section for each version.

### Workflow

#### Daily workflow
Almost every code change we make associated with an issue will require a `CHANGELOG` entry. After you have created the PR in GitHub, run `changie new` and follow the command prompts to generate a yaml file with your change details. This only needs to be done once per PR.

The `changie new` command will ensure correct file format and file name. There is a one to one mapping of issues to changes. Multiple issues cannot be lumped into a single entry. If you make a mistake, the yaml file may be directly modified and saved as long as the format is preserved.

Note: If your PR has been cleared by the Server Team as not needing a changelog entry, the `Skip Changelog` label may be put on the PR to bypass the GitHub action that blacks PRs from being merged when they are missing a `CHANGELOG` entry.

#### Prerelease Workflow
These commands batch up changes in `/.changes/unreleased` to be included in this prerelease and move those files to a directory named for the release version. The `--move-dir` will be created if it does not exist and is created in `/.changes`.

```
changie batch <version> --move-dir '<version>' --prerelease 'rc1'
changie merge
```

Example
```
changie batch 1.0.5 --move-dir '1.0.5' --prerelease 'rc1'
changie merge
```

#### Final Release Workflow
These commands batch up changes in `/.changes/unreleased` as well as `/.changes/<version>` to be included in this final release and delete all prereleases. This rolls all prereleases up into a single final release. All `yaml` files in `/unreleased` and `<version>` will be deleted at this point.

```
changie batch <version> --include '<version>' --remove-prereleases
changie merge
```

Example
```
changie batch 1.0.5 --include '1.0.5' --remove-prereleases
changie merge
```

### A Note on Manual Edits & Gotchas
- Changie generates markdown files in the `.changes` directory that are parsed together with the `changie merge` command. Every time `changie merge` is run, it regenerates the entire file. For this reason, any changes made directly to `CHANGELOG.md` will be overwritten on the next run of `changie merge`.
- If changes need to be made to the `CHANGELOG.md`, make the changes to the relevant `<version>.md` file located in the `/.changes` directory. You will then run `changie merge` to regenerate the `CHANGELOG.MD`.
- Do not run `changie batch` again on released versions. Our final release workflow deletes all of the yaml files associated with individual changes. If for some reason modifications to the `CHANGELOG.md` are required after we've generated the final release `CHANGELOG.md`, the modifications need to be done manually to the `<version>.md` file in the `/.changes` directory.
- changie can modify, create and delete files depending on the command you run. This is expected. Be sure to commit everything that has been modified and deleted.
6 changes: 6 additions & 0 deletions .changes/header.tpl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# dbt Servefr Changelog

- This file provides a full account of all changes to `dbt-server`
- Changes are listed under the (pre)release in which they first appear. Subsequent releases include changes from previous releases.
- "Breaking changes" listed under a version may require action from end users or external maintainers when upgrading to that version.
- Do not edit this file directly. This file is auto-generated using [changie](https://github.com/miniscruff/changie). For details on how to document a change, see [the contributing guide](https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md#adding-changelog-entry)
7 changes: 7 additions & 0 deletions .changes/unreleased/Docs-20221006-191346.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Docs
body: Adding open source framework
time: 2022-10-06T19:13:46.352315-05:00
custom:
Author: callum-mcdata
Issue: "101"
PR: "100"
7 changes: 7 additions & 0 deletions .changes/unreleased/Docs-20221013-131653.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Docs
body: Fixing table of contents
time: 2022-10-13T13:16:53.925352-05:00
custom:
Author: callum-mcdata
Issue: "105"
PR: "105"
7 changes: 7 additions & 0 deletions .changes/unreleased/Docs-20221208-190809.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Docs
body: update README.md and CONTRIBUTING.md (renamed)
time: 2022-12-08T19:08:09.684744-08:00
custom:
Author: lostmygithubaccount
Issue: "138"
PR: "139"
8 changes: 8 additions & 0 deletions .changes/unreleased/Features-20221102-151153.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
kind: Features
body: This adds functionality to allow users to supply a profile name via cli arg,
env var or dbt_project.yml
time: 2022-11-02T15:11:53.673724-05:00
custom:
Author: racheldaniel
Issue: "108"
PR: "107"
9 changes: 9 additions & 0 deletions .changes/unreleased/Fixes-20221129-082728.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
kind: Fixes
body: Passes args through parse, sql compile and preview endpoints to the StateController;
updates the StateController methods to accept args to be passed to parse function
in lib.py that already accepts args.
time: 2022-11-29T08:27:28.370561-06:00
custom:
Author: racheldaniel
Issue: "123"
PR: "122"
7 changes: 7 additions & 0 deletions .changes/unreleased/Fixes-20221129-170329.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Fixes
body: Default target to None
time: 2022-11-29T17:03:29.72183-06:00
custom:
Author: racheldaniel
Issue: "126"
PR: "125"
7 changes: 7 additions & 0 deletions .changes/unreleased/Fixes-20221207-095530.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Fixes
body: Fixes legacy logging for stream endpoint
time: 2022-12-07T09:55:30.642422-06:00
custom:
Author: racheldaniel
Issue: "132"
PR: "118"
7 changes: 7 additions & 0 deletions .changes/unreleased/Fixes-20221208-125119.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Fixes
body: Add profile as arg to sqlconfig
time: 2022-12-08T12:51:19.859883-06:00
custom:
Author: racheldaniel
Issue: "136"
PR: "135"
7 changes: 7 additions & 0 deletions .changes/unreleased/Fixes-20221208-130454.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Fixes
body: Adds missing profile arg to configargs
time: 2022-12-08T13:04:54.360435-06:00
custom:
Author: racheldaniel
Issue: "136"
PR: "137"
7 changes: 7 additions & 0 deletions .changes/unreleased/Under the Hood-20221013-142450.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Under the Hood
body: Cache the size of the manifest and tag request spans with it for more observability
time: 2022-10-13T14:24:50.302275-04:00
custom:
Author: jp-dbt
Issue: "104"
PR: "104"
7 changes: 7 additions & 0 deletions .changes/unreleased/Under the Hood-20221017-114452.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Under the Hood
body: Build docker images for 1.3.0 release of dbt-core
time: 2022-10-17T11:44:52.226266-07:00
custom:
Author: peter-bertuglia
Issue: "1"
PR: "106"
7 changes: 7 additions & 0 deletions .changes/unreleased/Under the Hood-20221129-141225.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Under the Hood
body: adding github actions
time: 2022-11-29T14:12:25.113087-05:00
custom:
Author: jp-dbt
Issue: "1"
PR: "120"
7 changes: 7 additions & 0 deletions .changes/unreleased/Under the Hood-20221205-164129.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Under the Hood
body: 'corrects the directory name for GitHub issue templates '
time: 2022-12-05T16:41:29.039612-08:00
custom:
Author: lostmygithubaccount
Issue: "110"
PR: "111"
80 changes: 80 additions & 0 deletions .changie.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
changesDir: .changes
unreleasedDir: unreleased
headerPath: header.tpl.md
versionHeaderPath: ""
changelogPath: CHANGELOG.md
versionExt: md
versionFormat: '## dbt-core {{.Version}} - {{.Time.Format "January 02, 2006"}}'
kindFormat: '### {{.Kind}}'
changeFormat: '- {{.Body}} ([#{{.Custom.Issue}}](https://github.com/dbt-labs/dbt-core/issues/{{.Custom.Issue}}), [#{{.Custom.PR}}](https://github.com/dbt-labs/dbt-core/pull/{{.Custom.PR}}))'

kinds:
- label: Breaking Changes
- label: Features
- label: Fixes
- label: Docs
changeFormat: '- {{.Body}} ([dbt-docs/#{{.Custom.Issue}}](https://github.com/dbt-labs/dbt-docs/issues/{{.Custom.Issue}}), [dbt-docs/#{{.Custom.PR}}](https://github.com/dbt-labs/dbt-docs/pull/{{.Custom.PR}}))'
- label: Under the Hood
- label: Dependencies
changeFormat: '- {{.Body}} ({{if ne .Custom.Issue ""}}[#{{.Custom.Issue}}](https://github.com/dbt-labs/dbt-core/issues/{{.Custom.Issue}}), {{end}}[#{{.Custom.PR}}](https://github.com/dbt-labs/dbt-core/pull/{{.Custom.PR}}))'
- label: Security
changeFormat: '- {{.Body}} ({{if ne .Custom.Issue ""}}[#{{.Custom.Issue}}](https://github.com/dbt-labs/dbt-core/issues/{{.Custom.Issue}}), {{end}}[#{{.Custom.PR}}](https://github.com/dbt-labs/dbt-core/pull/{{.Custom.PR}}))'

newlines:
afterChangelogHeader: 1
afterKind: 1
afterChangelogVersion: 1
beforeKind: 1
endOfVersion: 1

custom:
- key: Author
label: GitHub Username(s) (separated by a single space if multiple)
type: string
minLength: 3
- key: Issue
label: GitHub Issue Number
type: int
minInt: 1
- key: PR
label: GitHub Pull Request Number
type: int
minInt: 1

footerFormat: |
{{- $contributorDict := dict }}
{{- /* any names added to this list should be all lowercase for later matching purposes */}}
{{- $core_team := list "peterallenwebb" "emmyoop" "nathaniel-may" "gshank" "leahwicz" "chenyulinx" "stu-k" "iknox-fa" "versusfacit" "mcknight-42" "jtcohen6" "dependabot[bot]" "snyk-bot" "colin-rogers-dbt" }}
{{- range $change := .Changes }}
{{- $authorList := splitList " " $change.Custom.Author }}
{{- /* loop through all authors for a PR */}}
{{- range $author := $authorList }}
{{- $authorLower := lower $author }}
{{- /* we only want to include non-core team contributors */}}
{{- if not (has $authorLower $core_team)}}
{{- /* Docs kind link back to dbt-docs instead of dbt-core PRs */}}
{{- $prLink := $change.Kind }}
{{- if eq $change.Kind "Docs" }}
{{- $prLink = "[dbt-docs/#pr](https://github.com/dbt-labs/dbt-docs/pull/pr)" | replace "pr" $change.Custom.PR }}
{{- else }}
{{- $prLink = "[#pr](https://github.com/dbt-labs/dbt-core/pull/pr)" | replace "pr" $change.Custom.PR }}
{{- end }}
{{- /* check if this contributor has other PRs associated with them already */}}
{{- if hasKey $contributorDict $author }}
{{- $prList := get $contributorDict $author }}
{{- $prList = append $prList $prLink }}
{{- $contributorDict := set $contributorDict $author $prList }}
{{- else }}
{{- $prList := list $prLink }}
{{- $contributorDict := set $contributorDict $author $prList }}
{{- end }}
{{- end}}
{{- end}}
{{- end }}
{{- /* no indentation here for formatting so the final markdown doesn't have unneeded indentations */}}
{{- if $contributorDict}}
### Contributors
{{- range $k,$v := $contributorDict }}
- [@{{$k}}](https://github.com/{{$k}}) ({{ range $index, $element := $v }}{{if $index}}, {{end}}{{$element}}{{end}})
{{- end }}
{{- end }}
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
venv
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@racheldaniel
@drewbanin
@peter-bertuglia
@cesher
@rviswanathan-dbt
94 changes: 94 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: 🐞 Bug
description: Report a bug or an issue you've found with dbt-server
title: "[Bug] <title>"
labels: ["bug", "triage"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: checkboxes
attributes:
label: Is this a new bug in dbt-server?
description: >
In other words, is this an error, flaw, failure or fault in the package?
If this is a bug that broke existing functionality that used to work, please open a regression issue.
If this is a request for help or troubleshooting code in your own dbt project, please join our [dbt Community Slack](https://www.getdbt.com/community/join-the-community/) or open a [Discussion question](https://github.com/dbt-labs/docs.getdbt.com/discussions).
Please search to see if an issue already exists for the bug you encountered.
options:
- label: I believe this is a new bug in dbt-server
required: true
- label: I have searched the existing issues, and I could not find an existing issue for this bug
required: true
- type: textarea
attributes:
label: Current Behavior
description: A concise description of what you're experiencing.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: true
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. In this environment...
2. With this config...
3. Run '...'
4. See error...
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: |
If applicable, log output to help explain your problem.
render: shell
validations:
required: false
- type: textarea
attributes:
label: Environment
description: |
examples:
- **dbt-adapter & version**: dbt-snowflake v1.2.0
- **dbt-server & version**: dbt-server v1.0.0
value: |
- dbt-adapter & version:
- dbt-server version:
render: markdown
validations:
required: false
- type: dropdown
id: database
attributes:
label: Which database adapter are you using with dbt?
description: If the bug is specific to the database or adapter, please open the issue in that adapter's repository instead
multiple: true
options:
- postgres
- redshift
- snowflake
- bigquery
- spark
- databricks
- other (mention it in "Additional Context")
validations:
required: false
- type: textarea
attributes:
label: Additional Context
description: |
Links? References? Anything that will give us more context about the issue you are encountering!
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Ask the community for help
url: https://github.com/dbt-labs/docs.getdbt.com/discussions
about: Need help troubleshooting? Check out our guide on how to ask
- name: Contact dbt Cloud support
url: mailto:[email protected]
about: Are you using dbt Cloud? Contact our support team for help!
- name: Participate in Discussions
url: https://github.com/dbt-labs/dbt-core/discussions
about: Do you have a Big Idea for dbt? Read open discussions, or start a new one
Loading

0 comments on commit abdd6b3

Please sign in to comment.