diff --git a/br/.dockerignore b/br/.dockerignore deleted file mode 120000 index 3e4e48b0b5fe6..0000000000000 --- a/br/.dockerignore +++ /dev/null @@ -1 +0,0 @@ -.gitignore \ No newline at end of file diff --git a/br/.editorconfig b/br/.editorconfig deleted file mode 100644 index 43c6a002cce45..0000000000000 --- a/br/.editorconfig +++ /dev/null @@ -1,10 +0,0 @@ -[*] -end_of_line = lf -insert_final_newline = true -charset = utf-8 - -# tab_size = 4 spaces -[*.go] -indent_style = tab -indent_size = 4 -trim_trailing_whitespace = true diff --git a/br/.gitattributes b/br/.gitattributes deleted file mode 100644 index ba35fa1000ef6..0000000000000 --- a/br/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*_generated.go linguist-generated=true diff --git a/br/.gitignore b/br/.gitignore deleted file mode 100644 index c29d04732ce40..0000000000000 --- a/br/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -/br -/bin -/.idea -/docker/data/ -/docker/logs/ -*.swp -.DS_Store -/go.mod -/go.sum - -# for the web interface -web/node_modules/ -web/dist/ -.vscode/ diff --git a/br/.golangci.yml b/br/.golangci.yml deleted file mode 100644 index 0cb2a9b651251..0000000000000 --- a/br/.golangci.yml +++ /dev/null @@ -1,12 +0,0 @@ -linters-settings: - gocyclo: - min-complexity: 40 - -issues: - # Excluding configuration per-path, per-linter, per-text and per-source - exclude-rules: - # TODO Remove it. - - path: split_client.go - text: "SA1019:" - linters: - - staticcheck diff --git a/br/COMPATIBILITY_TEST.md b/br/COMPATIBILITY_TEST.md deleted file mode 100644 index 44984ebcd2bfa..0000000000000 --- a/br/COMPATIBILITY_TEST.md +++ /dev/null @@ -1,42 +0,0 @@ -# Compatibility test - -## Background - -We had some incompatibility issues in the past, which made BR cannot restore backed up data in some situations. -So we need a test workflow to check the compatibility. - -## Goal - -- Ensure backward compatibility for restoring data from the previous 3 minor versions - -## Workflow - -### Data Preparation - -This workflow needs previous backup data. To get this data. we perform the following steps - -- Run a TiDB cluster with previous version. -- Run backup jobs with corresponding BR version, with different storages (s3, gcs). - -Given we test for the previous 3 versions, and there are 2 different storage systems, we will produce 6 backup archives for 6 separate compatibility tests. - -### Test Content - -- Start TiDB cluster with nightly version. -- Build BR binary with current directory. -- Use BR to restore different version backup data one by one. -- Make sure restore data is expected. - -### Running tests - -Start a cluster with docker-compose and Build br with latest version. - -```sh -docker-compose -f docker-compose.yaml rm -s -v && \ -docker-compose -f docker-compose.yaml build && \ -docker-compose -f docker-compose.yaml up --remove-orphans -``` - -```sh -docker-compose -f docker-compose.yaml control make compatibility_test -``` diff --git a/br/CONTRIBUTING.md b/br/CONTRIBUTING.md deleted file mode 100644 index 1f2846471a7a1..0000000000000 --- a/br/CONTRIBUTING.md +++ /dev/null @@ -1,90 +0,0 @@ -# How to contribute - -This document outlines some of the conventions on development workflow, commit -message formatting, contact points and other resources to make it easier to get -your contribution accepted. - -## Getting started - -- Fork the repository on GitHub. -- Read the README.md for build instructions. -- Play with the project, submit bugs, submit patches! - -## Building BR - -Developing BR requires: - -* [Go 1.16+](http://golang.org/doc/code.html) -* An internet connection to download the dependencies - -Simply run `make` to build the program. - -```sh -make -``` - -### Running tests - -This project contains unit tests and integration tests with coverage collection. -See [tests/README.md](./tests/README.md) for how to execute and add tests. - -### Updating dependencies - -BR uses [Go 1.11 module](https://github.com/golang/go/wiki/Modules) to manage dependencies. -To add or update a dependency: use the `go mod edit` command to change the dependency. - -## Contribution flow - -This is a rough outline of what a contributor's workflow looks like: - -- Create a topic branch from where you want to base your work. This is usually `master`. -- Make commits of logical units and add test case if the change fixes a bug or adds new functionality. -- Run tests and make sure all the tests are passed. -- Make sure your commit messages are in the proper format (see below). -- Push your changes to a topic branch in your fork of the repository. -- Submit a pull request. -- Your PR must receive LGTMs from two maintainers. - -Thanks for your contributions! - -### Code style - -The coding style suggested by the Golang community is used in BR. -See the [style doc](https://github.com/golang/go/wiki/CodeReviewComments) for details. - -Please follow this style to make BR easy to review, maintain and develop. - -### Format of the Commit Message - -We follow a rough convention for commit messages that is designed to answer two -questions: what changed and why. The subject line should feature the what and -the body of the commit should describe the why. - -``` -restore: add comment for variable declaration - -Improve documentation. -``` - -The format can be described more formally as follows: - -``` -: - - - -