Skip to content

Commit

Permalink
Merge branch 'hashicorp:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
otoolep authored Oct 9, 2024
2 parents 4522b09 + dd1f3da commit 52cc784
Show file tree
Hide file tree
Showing 86 changed files with 5,171 additions and 740 deletions.
89 changes: 0 additions & 89 deletions .circleci/config.yml

This file was deleted.

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 @@
* @hashicorp/consul-core-reviewers @hashicorp/nomad-eng

/.release/ @hashicorp/release-engineering
/.github/workflows/ci.yml @hashicorp/release-engineering
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2

updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
3 changes: 3 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

# Number of days of inactivity before an Issue becomes stale
daysUntilStale: 60

Expand Down
88 changes: 88 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: ci

on:
pull_request:
branches: ["main"]
push:
branches: ["main"]
tags: ["*"]

permissions:
contents: read

jobs:
go-fmt-and-vet:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: '1.20'
cache: true
- run: |
files=$(go fmt ./...)
if [ -n "$files" ]; then
echo "The following file(s) do not conform to go fmt:"
echo "$files"
exit 1
fi
- run: |
PACKAGE_NAMES=$(go list ./... | grep -v github.com/hashicorp/raft/fuzzy)
go vet $PACKAGE_NAMES
go-test:
needs: go-fmt-and-vet
strategy:
matrix:
go: ['1.19', '1.20']
arch: ['x32', 'x64']
runs-on: ubuntu-22.04
env:
INTEG_TESTS: yes
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: ${{ matrix.go }}
architecture: ${{ matrix.arch }}
cache: true
# x86 specific build.
- if: matrix.arch == 'x32'
run: |
sudo apt-get update
sudo apt-get install gcc-multilib
go test --tags batchtest ./...
# x86-64 specific build.
- if: matrix.arch == 'x64'
run: go test -race --tags batchtest ./...
go-test-compat:
needs: go-test
strategy:
matrix:
go: [ '1.20', '1.21', '1.22' ]
arch: [ 'x32', 'x64' ]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: ${{ matrix.go }}
architecture: ${{ matrix.arch }}
cache: true
submodules: true
# x86 specific build.
- if: matrix.arch == 'x32'
run: |
sudo apt-get update
sudo apt-get install gcc-multilib
git submodule update --init --recursive
cd raft-compat
go mod tidy
go test ./...
# x86-64 specific build.
- if: matrix.arch == 'x64'
run: |
git submodule update --init --recursive
cd raft-compat
go mod tidy
go test -race ./...
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "raft-compat/raft-latest"]
path = raft-compat/raft-previous-version
url = https://github.com/hashicorp/raft.git
3 changes: 3 additions & 0 deletions .golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

run:
deadline: 5m

Expand Down
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

language: go

go:
Expand Down
65 changes: 65 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,70 @@
# UNRELEASED

# 1.7.0 (June 5th, 2024)

CHANGES

* Raft multi version testing [GH-559](https://github.com/hashicorp/raft/pull/559)

IMPROVEMENTS

* Raft pre-vote extension implementation, activated by default. [GH-530](https://github.com/hashicorp/raft/pull/530)

BUG FIXES

* Fix serialize NetworkTransport data race on ServerAddr(). [GH-591](https://github.com/hashicorp/raft/pull/591)

# 1.6.1 (January 8th, 2024)

CHANGES

* Add reference use of Hashicorp Raft. [GH-584](https://github.com/hashicorp/raft/pull/584)
* [COMPLIANCE] Add Copyright and License Headers. [GH-580](https://github.com/hashicorp/raft/pull/580)

IMPROVEMENTS

* Bump github.com/hashicorp/go-hclog from 1.5.0 to 1.6.2. [GH-583](https://github.com/hashicorp/raft/pull/583)

BUG FIXES

* Fix rare leadership transfer failures when writes happen during transfer. [GH-581](https://github.com/hashicorp/raft/pull/581)

# 1.6.0 (November 15th, 2023)

CHANGES

* Upgrade hashicorp/go-msgpack to v2, with go.mod upgraded from v0.5.5 to v2.1.1. [GH-577](https://github.com/hashicorp/raft/pull/577)

go-msgpack v2.1.1 is by default binary compatible with v0.5.5 ("non-builtin" encoding of `time.Time`), but can decode messages produced by v1.1.5 as well ("builtin" encoding of `time.Time`).

However, if users of this libary overrode the version of go-msgpack (especially to v1), this **could break** compatibility if raft nodes are running a mix of versions.

This compatibility can be configured at runtime in Raft using `NetworkTransportConfig.MsgpackUseNewTimeFormat` -- the default is `false`, which maintains compatibility with `go-msgpack` v0.5.5, but if set to `true`, will be compatible with `go-msgpack` v1.1.5.

IMPROVEMENTS

* Push to notify channel when shutting down. [GH-567](https://github.com/hashicorp/raft/pull/567)
* Add CommitIndex API [GH-560](https://github.com/hashicorp/raft/pull/560)
* Document some Apply error cases better [GH-561](https://github.com/hashicorp/raft/pull/561)

BUG FIXES

* Race with `candidateFromLeadershipTransfer` [GH-570](https://github.com/hashicorp/raft/pull/570)


# 1.5.0 (April 21st, 2023)

IMPROVEMENTS
* Fixed a performance anomaly related to pipelining RPCs that caused large increases in commit latency under high write throughput. Default behavior has changed. For more information see #541.

# 1.4.0 (March 17th, 2023)

FEATURES
* Support log stores with a monotonically increasing index. Implementing a log store with the `MonotonicLogStore` interface where `IsMonotonic()` returns true will allow Raft to clear all previous logs on user restores of Raft snapshots.

BUG FIXES
* Restoring a snapshot with the raft-wal log store caused a panic due to index gap that is created during snapshot restores.

# 1.3.0 (April 22nd, 2021)

IMPROVEMENTS
Expand Down
2 changes: 2 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Copyright (c) 2013 HashiCorp, Inc.

Mozilla Public License, version 2.0

1. Definitions
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
raft [![CircleCI](https://circleci.com/gh/hashicorp/raft.svg?style=svg)](https://circleci.com/gh/hashicorp/raft)
raft [![Build Status](https://github.com/hashicorp/raft/workflows/ci/badge.svg)](https://github.com/hashicorp/raft/actions)
====

raft is a [Go](http://www.golang.org) library that manages a replicated
Expand All @@ -12,7 +12,7 @@ fault tolerance as well.

## Building

If you wish to build raft you'll need Go version 1.2+ installed.
If you wish to build raft you'll need Go version 1.16+ installed.

Please check your installation with:

Expand All @@ -34,7 +34,8 @@ and `StableStore`.


## Community Contributed Examples
[Raft gRPC Example](https://github.com/Jille/raft-grpc-example) - Utilizing the Raft repository with gRPC
- [Raft gRPC Example](https://github.com/Jille/raft-grpc-example) - Utilizing the Raft repository with gRPC
- [Raft-based KV-store Example](https://github.com/otoolep/hraftd) - Uses Hashicorp Raft to build a distributed key-value store


## Tagged Releases
Expand Down
Loading

0 comments on commit 52cc784

Please sign in to comment.