From e05afd21bba2b26303948041bdf6f20d4fdffedc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Mej=C3=ADa?= Date: Wed, 4 Oct 2023 16:14:45 +0200 Subject: [PATCH] AVRO-3878: Rename default git branch to be 'main' --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .github/dependabot.yml | 1 - .github/workflows/codeql-csharp-analysis.yml | 4 ++-- .github/workflows/codeql-java-analysis.yml | 4 ++-- .github/workflows/codeql-js-analysis.yml | 4 ++-- .github/workflows/codeql-py-analysis.yml | 4 ++-- .github/workflows/java-publish-snapshot.yml | 2 +- .github/workflows/maven4.yml | 4 ++-- .github/workflows/rat.yml | 4 ++-- .github/workflows/spotless.yml | 4 ++-- .github/workflows/test-arm64.yml | 4 ++-- .github/workflows/test-lang-c++.yml | 4 ++-- .github/workflows/test-lang-c.yml | 4 ++-- .github/workflows/test-lang-csharp.yml | 4 ++-- .github/workflows/test-lang-java.yml | 4 ++-- .github/workflows/test-lang-js.yml | 4 ++-- .github/workflows/test-lang-perl.yml | 4 ++-- .github/workflows/test-lang-php.yml | 4 ++-- .github/workflows/test-lang-py.yml | 4 ++-- .github/workflows/test-lang-ruby.yml | 4 ++-- .github/workflows/test-lang-rust-audit.yml | 4 ++-- .github/workflows/test-lang-rust-ci.yml | 4 ++-- .github/workflows/test-lang-rust-clippy.yml | 4 ++-- doc/content/en/docs/++version++/IDL Language/_index.md | 2 +- doc/content/en/project/How to contribute/_index.md | 4 ++-- lang/csharp/README.md | 2 +- lang/php/README.md | 4 ++-- lang/py/README.md | 2 +- lang/rust/README.tpl | 6 +++--- lang/rust/avro/README.md | 8 ++++---- lang/rust/avro/src/lib.rs | 2 +- lang/rust/avro/src/rabin.rs | 2 +- share/docker/Dockerfile | 2 +- 33 files changed, 59 insertions(+), 60 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 87da2294fe4..2823e406003 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -13,7 +13,7 @@ - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review. - - Make sure that the change passes the automated tests. You can [build the entire project](https://github.com/apache/avro/blob/master/BUILD.md) or just the [language-specific SDK](https://avro.apache.org/project/how-to-contribute/#unit-tests). + - Make sure that the change passes the automated tests. You can [build the entire project](https://github.com/apache/avro/blob/main/BUILD.md) or just the [language-specific SDK](https://avro.apache.org/project/how-to-contribute/#unit-tests). - Each pull request should address only one issue, not mix up code from multiple issues. diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 0059d8f55a3..14d2f29b768 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -84,7 +84,6 @@ updates: schedule: interval: "daily" open-pull-requests-limit: 20 - target-branch: master - package-ecosystem: "github-actions" directory: "/" diff --git a/.github/workflows/codeql-csharp-analysis.yml b/.github/workflows/codeql-csharp-analysis.yml index 58f9c1404f3..c140a6e91ab 100644 --- a/.github/workflows/codeql-csharp-analysis.yml +++ b/.github/workflows/codeql-csharp-analysis.yml @@ -23,11 +23,11 @@ name: "CodeQL C#" on: push: branches: - - master + - main pull_request: # The branches below must be a subset of the branches above branches: - - master + - main paths: - .github/workflows/codeql-csharp-analysis.yml - lang/csharp/** diff --git a/.github/workflows/codeql-java-analysis.yml b/.github/workflows/codeql-java-analysis.yml index 7c2b7b87c61..8fe8d1060eb 100644 --- a/.github/workflows/codeql-java-analysis.yml +++ b/.github/workflows/codeql-java-analysis.yml @@ -23,10 +23,10 @@ on: workflow_dispatch: push: branches: - - master + - main pull_request: branches: - - master + - main paths: - .github/workflows/codeql-java-analysis.yml - lang/java/** diff --git a/.github/workflows/codeql-js-analysis.yml b/.github/workflows/codeql-js-analysis.yml index bb91cc0901d..98f27bde6f4 100644 --- a/.github/workflows/codeql-js-analysis.yml +++ b/.github/workflows/codeql-js-analysis.yml @@ -23,11 +23,11 @@ name: "CodeQL JavaScript" on: push: branches: - - master + - main pull_request: # The branches below must be a subset of the branches above branches: - - master + - main paths: - .github/workflows/codeql-js-analysis.yml - lang/js/** diff --git a/.github/workflows/codeql-py-analysis.yml b/.github/workflows/codeql-py-analysis.yml index 9e2580d3ead..0fecf34c0e7 100644 --- a/.github/workflows/codeql-py-analysis.yml +++ b/.github/workflows/codeql-py-analysis.yml @@ -23,11 +23,11 @@ name: "CodeQL Python" on: push: branches: - - master + - main pull_request: # The branches below must be a subset of the branches above branches: - - master + - main paths: - .github/workflows/codeql-py-analysis.yml - lang/py/** diff --git a/.github/workflows/java-publish-snapshot.yml b/.github/workflows/java-publish-snapshot.yml index 279a0aff4bc..09e92d45c1f 100644 --- a/.github/workflows/java-publish-snapshot.yml +++ b/.github/workflows/java-publish-snapshot.yml @@ -19,7 +19,7 @@ name: "Publish Snapshot to Maven" on: workflow_dispatch: push: - branches: [ master ] + branches: [ main ] paths: - .github/workflows/java-publish-snapshot.yml - lang/java/** diff --git a/.github/workflows/maven4.yml b/.github/workflows/maven4.yml index b939cd1254c..39663c4a802 100644 --- a/.github/workflows/maven4.yml +++ b/.github/workflows/maven4.yml @@ -17,9 +17,9 @@ name: 'Maven 4' on: workflow_dispatch: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] paths: - .github/workflows/maven4.yml - lang/java/** diff --git a/.github/workflows/rat.yml b/.github/workflows/rat.yml index 7ae41115ae3..cf09ad68dc9 100644 --- a/.github/workflows/rat.yml +++ b/.github/workflows/rat.yml @@ -17,9 +17,9 @@ name: 'Rat' on: workflow_dispatch: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/spotless.yml b/.github/workflows/spotless.yml index 4f5a14a4257..29dfa0016f0 100644 --- a/.github/workflows/spotless.yml +++ b/.github/workflows/spotless.yml @@ -17,9 +17,9 @@ name: 'Spotless' on: workflow_dispatch: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] paths: - .github/workflows/spotless.yml - lang/java/** diff --git a/.github/workflows/test-arm64.yml b/.github/workflows/test-arm64.yml index 44c45993995..812f1d01f1d 100644 --- a/.github/workflows/test-arm64.yml +++ b/.github/workflows/test-arm64.yml @@ -18,10 +18,10 @@ name: CI on Linux ARM64 on: push: branches: - - master + - main pull_request: branches: - - master + - main jobs: java: diff --git a/.github/workflows/test-lang-c++.yml b/.github/workflows/test-lang-c++.yml index 9f3b61c583b..5747a0da361 100644 --- a/.github/workflows/test-lang-c++.yml +++ b/.github/workflows/test-lang-c++.yml @@ -17,9 +17,9 @@ name: Test C++ on: workflow_dispatch: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] paths: - '.github/workflows/test-lang-c\+\+.yml' - 'lang/c\+\+/**' diff --git a/.github/workflows/test-lang-c.yml b/.github/workflows/test-lang-c.yml index a32fff9dc96..877ff7f5f1b 100644 --- a/.github/workflows/test-lang-c.yml +++ b/.github/workflows/test-lang-c.yml @@ -17,9 +17,9 @@ name: Test C on: workflow_dispatch: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] paths: - .github/workflows/test-lang-c.yml - lang/c/** diff --git a/.github/workflows/test-lang-csharp.yml b/.github/workflows/test-lang-csharp.yml index 579e5c30b3e..db370df599f 100644 --- a/.github/workflows/test-lang-csharp.yml +++ b/.github/workflows/test-lang-csharp.yml @@ -17,9 +17,9 @@ name: 'Test C#' on: workflow_dispatch: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] paths: - .github/workflows/test-lang-csharp.yml - lang/csharp/** diff --git a/.github/workflows/test-lang-java.yml b/.github/workflows/test-lang-java.yml index a4920b4a009..89997300ec1 100644 --- a/.github/workflows/test-lang-java.yml +++ b/.github/workflows/test-lang-java.yml @@ -17,9 +17,9 @@ name: 'Test Java' on: workflow_dispatch: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] paths: - .github/workflows/test-lang-java.yml - lang/java/** diff --git a/.github/workflows/test-lang-js.yml b/.github/workflows/test-lang-js.yml index f3cc6bca4ed..cbc56a29c22 100644 --- a/.github/workflows/test-lang-js.yml +++ b/.github/workflows/test-lang-js.yml @@ -17,9 +17,9 @@ name: 'Test JavaScript' on: workflow_dispatch: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] paths: - .github/workflows/test-lang-js.yml - lang/js/** diff --git a/.github/workflows/test-lang-perl.yml b/.github/workflows/test-lang-perl.yml index 601d09818b7..c30599b7537 100644 --- a/.github/workflows/test-lang-perl.yml +++ b/.github/workflows/test-lang-perl.yml @@ -17,9 +17,9 @@ name: 'Test Perl' on: workflow_dispatch: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] paths: - .github/workflows/test-lang-perl.yml - lang/perl/** diff --git a/.github/workflows/test-lang-php.yml b/.github/workflows/test-lang-php.yml index 7082b9838bf..f4e9ae42f6b 100644 --- a/.github/workflows/test-lang-php.yml +++ b/.github/workflows/test-lang-php.yml @@ -17,9 +17,9 @@ name: 'Test PHP' on: workflow_dispatch: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] paths: - .github/workflows/test-lang-php.yml - lang/php/** diff --git a/.github/workflows/test-lang-py.yml b/.github/workflows/test-lang-py.yml index 498d8a84ba9..e037a848e34 100644 --- a/.github/workflows/test-lang-py.yml +++ b/.github/workflows/test-lang-py.yml @@ -17,9 +17,9 @@ name: 'Test Python' on: workflow_dispatch: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] paths: - .github/workflows/test-lang-py.yml - lang/py/** diff --git a/.github/workflows/test-lang-ruby.yml b/.github/workflows/test-lang-ruby.yml index bd5ed6c9b92..786bb5ce0ad 100644 --- a/.github/workflows/test-lang-ruby.yml +++ b/.github/workflows/test-lang-ruby.yml @@ -17,9 +17,9 @@ name: 'Test Ruby' on: workflow_dispatch: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] paths: - .github/workflows/test-lang-ruby.yml - lang/ruby/** diff --git a/.github/workflows/test-lang-rust-audit.yml b/.github/workflows/test-lang-rust-audit.yml index 9ca10b0b538..d530f8ce6ff 100644 --- a/.github/workflows/test-lang-rust-audit.yml +++ b/.github/workflows/test-lang-rust-audit.yml @@ -19,9 +19,9 @@ name: Rust Security Audit on: workflow_dispatch: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] paths: - .github/workflows/test-lang-rust-audit.yml - lang/rust/Cargo.toml diff --git a/.github/workflows/test-lang-rust-ci.yml b/.github/workflows/test-lang-rust-ci.yml index 5993cd59025..b2f7425ba65 100644 --- a/.github/workflows/test-lang-rust-ci.yml +++ b/.github/workflows/test-lang-rust-ci.yml @@ -19,9 +19,9 @@ name: Rust Continuous Integration on: workflow_dispatch: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] paths: - .github/workflows/test-lang-rust-ci.yml - lang/rust/** diff --git a/.github/workflows/test-lang-rust-clippy.yml b/.github/workflows/test-lang-rust-clippy.yml index e0287863160..b8c6fe90dbe 100644 --- a/.github/workflows/test-lang-rust-clippy.yml +++ b/.github/workflows/test-lang-rust-clippy.yml @@ -19,9 +19,9 @@ name: Rust Clippy Check on: workflow_dispatch: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] paths: - .github/workflows/test-lang-rust-clippy.yml - lang/rust/** diff --git a/doc/content/en/docs/++version++/IDL Language/_index.md b/doc/content/en/docs/++version++/IDL Language/_index.md index be6375005da..7d0121274a9 100644 --- a/doc/content/en/docs/++version++/IDL Language/_index.md +++ b/doc/content/en/docs/++version++/IDL Language/_index.md @@ -506,6 +506,6 @@ and [GitHub](https://github.com/jonesetc/atom-language-avro) A `.avdl` detecting plugin by Gurpreet Atwal on [GitHub](https://github.com/gurpreetatwal/vim-avro) (Last change in December 2016) -[avro-idl.vim](https://github.com/apache/avro/blob/master/share/editors/avro-idl.vim) in the Avro repository `share/editors` directory (last change in September 2010) +[avro-idl.vim](https://github.com/apache/avro/blob/main/share/editors/avro-idl.vim) in the Avro repository `share/editors` directory (last change in September 2010) Both provide syntax highlighting. diff --git a/doc/content/en/project/How to contribute/_index.md b/doc/content/en/project/How to contribute/_index.md index 679f02bc431..6514d7c3627 100755 --- a/doc/content/en/project/How to contribute/_index.md +++ b/doc/content/en/project/How to contribute/_index.md @@ -64,7 +64,7 @@ But take care about the following points ## Code Style (Autoformatting) -For Java code we use [Spotless](https://github.com/diffplug/spotless/) to format the code to comply with Avro's code style conventions (see above). Automatic formatting relies on [Avro's Eclipse JDT formatter definition](https://github.com/apache/avro/blob/master/lang/java/eclipse-java-formatter.xml). You can use the same definition to auto format from Eclipse or from IntelliJ configuring the Eclipse formatter plugin. +For Java code we use [Spotless](https://github.com/diffplug/spotless/) to format the code to comply with Avro's code style conventions (see above). Automatic formatting relies on [Avro's Eclipse JDT formatter definition](https://github.com/apache/avro/blob/main/lang/java/eclipse-java-formatter.xml). You can use the same definition to auto format from Eclipse or from IntelliJ configuring the Eclipse formatter plugin. If you use maven code styles issues are checked at the compile phase. If your code breaks because of bad formatting, you can format it automatically by running the command: ```shell @@ -257,7 +257,7 @@ Committers: for non-trivial changes, it is best to get another committer to revi Apply the patch uploaded by the user or check out their pull request. Edit the CHANGES.txt file, adding a description of the change, including the bug number it fixes. Add it to the appropriate section - BUGFIXES, IMPROVEMENTS, NEW FEATURES. Please follow the format in CHANGES.txt file. While adding an entry please add it to the end of a section. Use the same entry for the first line of the git commit message. -Changes are normally committed to master first, then, if they're backward-compatible, cherry-picked to a branch. +Changes are normally committed to the main branch first, then, if they're backward-compatible, cherry-picked to a branch. When you commit a change, resolve the issue in Jira. When resolving, always set the fix version and assign the issue. Set the fix version to either to the next minor release if the change is compatible and will be merged to that branch, or to the next major release if the change is incompatible and will only be committed to trunk. Assign the issue to the primary author of the patch. If the author is not in the list of project contributors, edit their Jira roles and make them an Avro contributor. diff --git a/lang/csharp/README.md b/lang/csharp/README.md index 6f923fe0273..14a3fa9d4f3 100644 --- a/lang/csharp/README.md +++ b/lang/csharp/README.md @@ -1,4 +1,4 @@ -# Avro C# [![Build Status](https://travis-ci.org/apache/avro.svg?branch=master)](https://travis-ci.org/apache/avro) [![NuGet Package](https://img.shields.io/nuget/v/Apache.Avro.svg)](https://www.nuget.org/packages/Apache.Avro) +# Avro C# [![Test C#](https://github.com/apache/avro/actions/workflows/test-lang-csharp.yml/badge.svg)](https://github.com/apache/avro/actions/workflows/test-lang-csharp.yml) [![NuGet Package](https://img.shields.io/nuget/v/Apache.Avro.svg)](https://www.nuget.org/packages/Apache.Avro) [![Avro](https://avro.apache.org/images/avro-logo.png)](http://avro.apache.org/) diff --git a/lang/php/README.md b/lang/php/README.md index 98cfd291186..6ff868eaec9 100644 --- a/lang/php/README.md +++ b/lang/php/README.md @@ -1,4 +1,4 @@ -|[![AVRO](https://raw.githubusercontent.com/apache/avro/master/doc/src/resources/images/avro-logo.png)](https://github.com/apache/avro) | [![AVRO](https://raw.githubusercontent.com/apache/avro/master/doc/src/resources/images/apache_feather.gif)](https://github.com/apac @@ -100,7 +100,7 @@ features = ["xz"] ## Upgrading to a newer minor version The library is still in beta, so there might be backward-incompatible changes between minor -versions. If you have troubles upgrading, check the [version upgrade guide](https://github.com/apache/avro/blob/master/lang/rust/migration_guide.md). +versions. If you have troubles upgrading, check the [version upgrade guide](https://github.com/apache/avro/blob/main/lang/rust/migration_guide.md). ## Defining a schema @@ -657,11 +657,11 @@ assert_eq!(false, SchemaCompatibility::can_read(&writers_schema, &readers_schema 1.65.0 ## License -This project is licensed under [Apache License 2.0](https://github.com/apache/avro/blob/master/LICENSE.txt). +This project is licensed under [Apache License 2.0](https://github.com/apache/avro/blob/main/LICENSE.txt). ## Contributing Everyone is encouraged to contribute! You can contribute by forking the GitHub repo and making a pull request or opening an issue. -All contributions will be licensed under [Apache License 2.0](https://github.com/apache/avro/blob/master/LICENSE.txt). +All contributions will be licensed under [Apache License 2.0](https://github.com/apache/avro/blob/main/LICENSE.txt). Please consider adding documentation and tests! If you introduce a backward-incompatible change, please consider adding instruction to migrate in the [Migration Guide](migration_guide.md) diff --git a/lang/rust/avro/src/lib.rs b/lang/rust/avro/src/lib.rs index 35b1b431a11..b2d930068b1 100644 --- a/lang/rust/avro/src/lib.rs +++ b/lang/rust/avro/src/lib.rs @@ -89,7 +89,7 @@ //! # Upgrading to a newer minor version //! //! The library is still in beta, so there might be backward-incompatible changes between minor -//! versions. If you have troubles upgrading, check the [version upgrade guide](https://github.com/apache/avro/blob/master/lang/rust/migration_guide.md). +//! versions. If you have troubles upgrading, check the [version upgrade guide](https://github.com/apache/avro/blob/main/lang/rust/migration_guide.md). //! //! # Defining a schema //! diff --git a/lang/rust/avro/src/rabin.rs b/lang/rust/avro/src/rabin.rs index fc63f8999b8..e742346e307 100644 --- a/lang/rust/avro/src/rabin.rs +++ b/lang/rust/avro/src/rabin.rs @@ -133,7 +133,7 @@ mod tests { use digest::Digest; use pretty_assertions::assert_eq; - // See: https://github.com/apache/avro/blob/master/share/test/data/schema-tests.txt + // See: https://github.com/apache/avro/blob/main/share/test/data/schema-tests.txt #[test] fn test1() -> TestResult { let data: &[(&str, i64)] = &[ diff --git a/share/docker/Dockerfile b/share/docker/Dockerfile index 51e91eab8dd..1baa92b2603 100644 --- a/share/docker/Dockerfile +++ b/share/docker/Dockerfile @@ -90,7 +90,7 @@ RUN apt-get -qqy install --no-install-recommends libzstd-dev \ php-dev # Install a maven release ------------------------------------------- -# Inspired from https://github.com/apache/accumulo-docker/blob/master/Dockerfile#L53 +# Inspired from https://github.com/apache/accumulo-docker/blob/bbb9892e165d40fb35fa19f38929effc5d0c709b/Dockerfile#L30 ENV MAVEN_VERSION 3.8.6 ENV APACHE_DIST_URLS \ https://www.apache.org/dyn/closer.cgi?action=download&filename= \