Skip to content

Commit

Permalink
Merge pull request pingcap#1 from pingcap/master
Browse files Browse the repository at this point in the history
Merge master code from pingcap repo
  • Loading branch information
lizhenhuan authored Jun 25, 2022
2 parents 7693239 + 383d1c8 commit 01a0ed1
Show file tree
Hide file tree
Showing 4,590 changed files with 1,257,088 additions and 646,188 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
13 changes: 13 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
startup --host_jvm_args=-Xmx8g
startup --unlimit_coredumps

run --color=yes
build:release --workspace_status_command=./build/print-workspace-status.sh --stamp
build:release --config=ci
build --incompatible_strict_action_env --incompatible_enable_cc_toolchain_resolution
build:ci --remote_cache=http://172.16.4.3:8084/tidb
test:ci --verbose_failures
test:ci --test_timeout=180
test:ci --test_env=GO_TEST_WRAP_TESTV=1 --test_verbose_timeout_warnings
test:ci --remote_cache=http://172.16.4.3:8084/tidb
test:ci --test_env=TZ=Asia/Shanghai --test_output=errors --experimental_ui_max_stdouterr_bytes=104857600
47 changes: 47 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
codecov:
notify:
require_ci_to_pass: yes

coverage:
precision: 4
round: down
range: "65...90"

status:
project:
default:
threshold: 0.2 #Allow the coverage to drop by threshold%, and posting a success status.
patch:
default:
target: 0% # trial operation
changes: no

parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no

comment:
layout: "header, diff"
behavior: default
require_changes: no

ignore:
- "LICENSES"
- "*_test.go"
- ".git"
- "*.yml"
- "*.md"
- "cmd/.*"
- "docs/.*"
- "vendor/.*"
- "ddl/failtest/.*"
- "ddl/testutil/.*"
- "executor/seqtest/.*"
- "metrics/.*"
- "expression/generator/.*"
- "br/pkg/mock/.*"

5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Declare files that will always have LF line endings on checkout.
*.y text eol=lf
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Require review from domain experts when the PR modified significant config files.
/sessionctx/variable @pingcap/tidb-configuration-reviewer
/config/config.toml.example @pingcap/tidb-configuration-reviewer
/session/bootstrap.go @pingcap/tidb-configuration-reviewer
16 changes: 0 additions & 16 deletions .github/ISSUE_TEMPLATE

This file was deleted.

22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: "\U0001F41B Bug Report"
about: As a User, I want to report a Bug.
labels: type/bug
---

## Bug Report

Please answer these questions before submitting your issue. Thanks!

### 1. Minimal reproduce step (Required)

<!-- a step by step guide for reproducing the bug. -->

### 2. What did you expect to see? (Required)

### 3. What did you see instead (Required)

### 4. What is your TiDB version? (Required)

<!-- Paste the output of SELECT tidb_version() -->

7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: "\U0001F680 Enhancement"
about: As a TiDB developer, I want to make an enhancement.
labels: type/enhancement
---

## Enhancement
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: "\U0001F680 Feature Request"
about: As a user, I want to request a New Feature on the product.
labels: type/feature-request
---

## Feature Request

**Is your feature request related to a problem? Please describe:**
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

**Describe the feature you'd like:**
<!-- A clear and concise description of what you want to happen. -->

**Describe alternatives you've considered:**
<!-- A clear and concise description of any alternative solutions or features you've considered. -->

**Teachability, Documentation, Adoption, Migration Strategy:**
<!-- If you can, explain some scenarios how users might use this, situations it would be helpful in. Any API designs, mockups, or diagrams are also helpful. -->
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/general-question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: "\U0001F914 Ask a Question"
about: I want to ask a question.
labels: type/question
---

## General Question

<!--
Before asking a question, make sure you have:
- Searched existing Stack Overflow questions.
- Googled your question.
- Searched open and closed [GitHub issues](https://github.com/pingcap/tidb/issues?utf8=%E2%9C%93&q=is%3Aissue)
- Read the documentation:
- [TiDB Readme](https://github.com/pingcap/tidb)
- [TiDB Doc](https://github.com/pingcap/docs)
-->
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/performance-questions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: "\U0001F947 Ask a Database Performance Question"
about: I want to ask a database performance question.
labels: type/question, type/performance
---

## Performance Questions

- What version of TiDB are you using?
<!-- You can try `tidb-server -V` or run `select tidb_version();` on TiDB to get this information -->

- What's the observed and your expected performance respectively?

- Have you compared TiDB with other databases? If yes, what's their difference?

- For a specific slow SQL query, please provide the following information:
- Whether you analyzed the tables involved in the query and how long it is after you ran the last `ANALYZE`.
- Whether this SQL query always or occasionally runs slowly.
- The `EXPLAIN ANALYZE` result of this query if your TiDB version is higher than 2.1, or you can just provide the `EXPLAIN` result.
- The plain text of the SQL query and table schema so we can test it locally. It would be better if you can provide the dumped statistics information.
<!-- you can use `show create table ${involved_table}\G` to get the table schema.-->
<!-- use `curl -G "http://${tidb-server-ip}:${tidb-server-status-port}/stats/dump/${db_name}/${table_name}" > ${table_name}_stats.json` to get the dumped statistics of one involved table.-->
- The `EXPLAIN` result of the compared database. For MySQL, `EXPLAIN format=json`'s result will be more helpful.
- Other information that is useful from your perspective.

- For a general performance question, e.g. the benchmark result you got by yourself is not expected, please provide the following information:
- Your cluster's topology architecture.
- A simple description of you workload.
- The metrics PDF generated from Grafana monitor. Remember to set the time range to the performance issue duration.
42 changes: 42 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
sig/execution:
- distsql/*
- executor/*
- !executor/brie*
- util/chunk/*
- util/disk/*
- util/execdetails/*
- util/expensivequery/*
- util/filesort/*
- util/memory/*
- util/sqlexec/*

component/expression:
- expression/*
- types/*

sig/planner:
- planner/*
- bindinfo/*
- util/ranger/*
- util/plancodec/*

component/statistics:
- statistics/*

sig/sql-infra:
- ddl/*
- domain/*
- infoschema/*
- session/*
- server/*
- privilege/*
- plugin/*
- config/*
- meta/*
- owner/*

component/config:
- config/*

sig/migrate:
- executor/brie*
39 changes: 39 additions & 0 deletions .github/licenserc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
header:
license:
spdx-id: Apache-2.0
copyright-owner: PingCAP, Inc.
paths-ignore:
- 'docs/'
- 'br/'
- '.gitignore'
- '.gitattributes'
- '.golangci.yml'
- '.golangci_br.yml'
- 'LICENSES/'
- '**/BUILD.bazel'
- 'WORKSPACE'
- '.bazelrc'
- '**/*.key'
- '**/*.md'
- '**/*.json'
- '**/*.toml'
- '**/*.pem'
- '**/*.crt'
- '**/*.test'
- '**/*.result'
- '**/*.example'
- '**/*.patch'
- '**/*.bzl'
- '.codecov.yml'
- 'Jenkinsfile'
- '.editorconfig'
- 'hooks/pre-commit'
- '**/go.mod'
- '**/go.sum'
- 'LICENSE'
- '.github/'
- 'parser/'
- 'dumpling/'
- 'tidb-binlog/driver/example'
- 'tidb-binlog/proto/go-binlog/secondary_binlog.pb.go'
comment: on-failure
60 changes: 60 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<!--
Thank you for contributing to TiDB!
PR Title Format:
1. pkg [, pkg2, pkg3]: what's changed
2. *: what's changed
-->

### What problem does this PR solve?
<!--
Please create an issue first to describe the problem.
There MUST be one line starting with "Issue Number: " and
linking the relevant issues via the "close" or "ref".
For more info, check https://pingcap.github.io/tidb-dev-guide/contribute-to-tidb/contribute-code.html#referring-to-an-issue.
-->

Issue Number: close #xxx

Problem Summary:

### What is changed and how it works?

### Check List

Tests <!-- At least one of them must be included. -->

- [ ] Unit test
- [ ] Integration test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No code

Side effects

- [ ] Performance regression: Consumes more CPU
- [ ] Performance regression: Consumes more Memory
- [ ] Breaking backward compatibility

Documentation

- [ ] Affects user behaviors
- [ ] Contains syntax changes
- [ ] Contains variable changes
- [ ] Contains experimental features
- [ ] Changes MySQL compatibility

### Release note

<!-- compatibility change, improvement, bugfix, and new feature need a release note -->

Please refer to [Release Notes Language Style Guide](https://pingcap.github.io/tidb-dev-guide/contribute-to-tidb/release-notes-style-guide.html) to write a quality release note.

```release-note
None
```
60 changes: 60 additions & 0 deletions .github/workflows/integration-test-br-compatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: BR / Compatibility Test

on:
push:
# merged git action
branches:
- master
- 'release-[0-9].[0-9]*'
paths:
- 'br/**'
- '!**.html'
- '!**.md'
- '!CNAME'
- '!LICENSE'
- '!br/docs/**'
- '!br/tests/**'
- '!br/docker/**'
# disable pull request only keep the merge action since it is very costly to run those tests
# pull_request:

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:

- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18

- name: Generate compatibility test backup data
timeout-minutes: 15
run: sh br/compatibility/prepare_backup.sh

- name: Start server
run: |
TAG=nightly PORT_SUFFIX=1 docker-compose -f br/compatibility/backup_cluster.yaml rm -s -v
TAG=nightly PORT_SUFFIX=1 docker-compose -f br/compatibility/backup_cluster.yaml build
TAG=nightly PORT_SUFFIX=1 docker-compose -f br/compatibility/backup_cluster.yaml up --remove-orphans -d
TAG=nightly PORT_SUFFIX=1 docker-compose -f br/compatibility/backup_cluster.yaml exec -T control go mod tidy
TAG=nightly PORT_SUFFIX=1 docker-compose -f br/compatibility/backup_cluster.yaml exec -T control make build_br
TAG=nightly PORT_SUFFIX=1 docker-compose -f br/compatibility/backup_cluster.yaml exec -T control br/tests/run_compatible.sh run
- name: Collect component log
if: ${{ failure() }}
run: |
tar czvf ${{ github.workspace }}/logs.tar.gz /tmp/br/docker/backup_logs/*
- uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
name: logs
path: ${{ github.workspace }}/logs.tar.gz
Loading

0 comments on commit 01a0ed1

Please sign in to comment.