Skip to content

Commit

Permalink
Merge branch 'redis:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
SoulPancake authored Jun 8, 2024
2 parents 4145372 + f752b9a commit 405624f
Show file tree
Hide file tree
Showing 115 changed files with 11,318 additions and 4,455 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
doctests/* @dmaier-redislabs
29 changes: 29 additions & 0 deletions .github/spellcheck-settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
matrix:
- name: Markdown
expect_match: false
apsell:
lang: en
d: en_US
ignore-case: true
dictionary:
wordlists:
- .github/wordlist.txt
output: wordlist.dic
pipeline:
- pyspelling.filters.markdown:
markdown_extensions:
- markdown.extensions.extra:
- pyspelling.filters.html:
comments: false
attributes:
- alt
ignores:
- ':matches(code, pre)'
- code
- pre
- blockquote
- img
sources:
- 'README.md'
- 'FAQ.md'
- 'docs/**'
60 changes: 60 additions & 0 deletions .github/wordlist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
ACLs
autoload
autoloader
autoloading
analytics
Autoloading
backend
backends
behaviour
CAS
ClickHouse
config
customizable
Customizable
dataset
de
DisableIdentity
ElastiCache
extensibility
FPM
Golang
IANA
keyspace
keyspaces
Kvrocks
localhost
Lua
MSSQL
namespace
NoSQL
ORM
Packagist
PhpRedis
pipelining
pluggable
Predis
PSR
Quickstart
README
rebalanced
rebalancing
redis
Redis
RocksDB
runtime
SHA
sharding
SETNAME
SSL
struct
stunnel
TCP
TLS
uri
URI
url
variadic
RedisStack
RedisGears
RedisTimeseries
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,24 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [1.19.x, 1.20.x]
go-version: [1.19.x, 1.20.x, 1.21.x]

services:
redis:
image: redis:7.2-rc
image: redis/redis-stack-server:edge
options: >-
--health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
ports:
- 6379:6379

steps:
- name: Set up ${{ matrix.go-version }}
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Test
run: make test
8 changes: 4 additions & 4 deletions .github/workflows/doctests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [ "1.18", "1.19", "1.20" ]
go-version: [ "1.18", "1.19", "1.20", "1.21" ]

steps:
- name: Set up ${{ matrix.go-version }}
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Test doc examples
working-directory: ./doctests
run: go test
run: go test
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
with:
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
config-name: release-drafter-config.yml
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: spellcheck
on:
pull_request:
jobs:
check-spelling:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check Spelling
uses: rojopolis/[email protected]
with:
config_path: .github/spellcheck-settings.yml
task_name: Markdown
25 changes: 25 additions & 0 deletions .github/workflows/stale-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "Close stale issues"
on:
schedule:
- cron: "0 0 * * *"

permissions: {}
jobs:
stale:
permissions:
issues: write # to close stale issues (actions/stale)
pull-requests: write # to close stale PRs (actions/stale)

runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is marked stale. It will be closed in 30 days if it is not updated.'
stale-pr-message: 'This pull request is marked stale. It will be closed in 30 days if it is not updated.'
days-before-stale: 365
days-before-close: 30
stale-issue-label: "Stale"
stale-pr-label: "Stale"
operations-per-run: 10
remove-stale-when-updated: true
57 changes: 57 additions & 0 deletions .github/workflows/test-redis-enterprise.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: RE Tests

on:
push:
branches: [master]
pull_request:

permissions:
contents: read

jobs:
build:
name: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: [1.21.x]
re-build: ["7.4.2-54"]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Clone Redis EE docker repository
uses: actions/checkout@v4
with:
repository: RedisLabs/redis-ee-docker
path: redis-ee

- name: Set up ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Build cluster
working-directory: redis-ee
env:
IMAGE: "redislabs/redis:${{ matrix.re-build }}"
RE_USERNAME: [email protected]
RE_PASS: 12345
RE_CLUSTER_NAME: re-test
RE_USE_OSS_CLUSTER: false
RE_DB_PORT: 6379
run: ./build.sh

- name: Test
env:
RE_CLUSTER: "1"
run: |
go test \
--ginkgo.skip-file="ring_test.go" \
--ginkgo.skip-file="sentinel_test.go" \
--ginkgo.skip-file="osscluster_test.go" \
--ginkgo.skip-file="pubsub_test.go" \
--ginkgo.skip-file="gears_commands_test.go" \
--ginkgo.label-filter='!NonRedisEnterprise'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
testdata/*
.idea/
.DS_Store
*.tar.gz
*.dic
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## Unreleased

### Changed

* `go-redis` won't skip span creation if the parent spans is not recording. ([#2980](https://github.com/redis/go-redis/issues/2980))
Users can use the OpenTelemetry sampler to control the sampling behavior.
For instance, you can use the `ParentBased(NeverSample())` sampler from `go.opentelemetry.io/otel/sdk/trace` to keep
a similar behavior (drop orphan spans) of `go-redis` as before.

## [9.0.5](https://github.com/redis/go-redis/compare/v9.0.4...v9.0.5) (2023-05-29)


Expand Down
101 changes: 101 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Contributing

## Introduction

We appreciate your interest in considering contributing to go-redis.
Community contributions mean a lot to us.

## Contributions we need

You may already know how you'd like to contribute, whether it's a fix for a bug you
encountered, or a new feature your team wants to use.

If you don't know where to start, consider improving
documentation, bug triaging, and writing tutorials are all examples of
helpful contributions that mean less work for you.

## Your First Contribution

Unsure where to begin contributing? You can start by looking through
[help-wanted
issues](https://github.com/redis/go-redis/issues?q=is%3Aopen+is%3Aissue+label%3ahelp-wanted).

Never contributed to open source before? Here are a couple of friendly
tutorials:

- <http://makeapullrequest.com/>
- <http://www.firsttimersonly.com/>

## Getting Started

Here's how to get started with your code contribution:

1. Create your own fork of go-redis
2. Do the changes in your fork
3. If you need a development environment, run `make test`. Note: this clones and builds the latest release of [redis](https://redis.io). You also need a redis-stack-server docker, in order to run the capabilities tests. This can be started by running:
```docker run -p 6379:6379 -it redis/redis-stack-server:edge```
4. While developing, make sure the tests pass by running `make tests`
5. If you like the change and think the project could use it, send a
pull request

To see what else is part of the automation, run `invoke -l`

## Testing

Call `make test` to run all tests, including linters.

Continuous Integration uses these same wrappers to run all of these
tests against multiple versions of python. Feel free to test your
changes against all the go versions supported, as declared by the
[build.yml](./.github/workflows/build.yml) file.

### Troubleshooting

If you get any errors when running `make test`, make sure
that you are using supported versions of Docker and go.

## How to Report a Bug

### Security Vulnerabilities

**NOTE**: If you find a security vulnerability, do NOT open an issue.
Email [Redis Open Source (<[email protected]>)](mailto:[email protected]) instead.

In order to determine whether you are dealing with a security issue, ask
yourself these two questions:

- Can I access something that's not mine, or something I shouldn't
have access to?
- Can I disable something for other people?

If the answer to either of those two questions are *yes*, then you're
probably dealing with a security issue. Note that even if you answer
*no* to both questions, you may still be dealing with a security
issue, so if you're unsure, just email [us](mailto:[email protected]).

### Everything Else

When filing an issue, make sure to answer these five questions:

1. What version of go-redis are you using?
2. What version of redis are you using?
3. What did you do?
4. What did you expect to see?
5. What did you see instead?

## Suggest a feature or enhancement

If you'd like to contribute a new feature, make sure you check our
issue list to see if someone has already proposed it. Work may already
be underway on the feature you want or we may have rejected a
feature like it already.

If you don't see anything, open a new issue that describes the feature
you would like and how it should work.

## Code review process

The core team regularly looks at pull requests. We will provide
feedback as soon as possible. After receiving our feedback, please respond
within two weeks. After that time, we may close your PR if it isn't
showing any activity.
Loading

0 comments on commit 405624f

Please sign in to comment.