Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add blackwidow to support kv to redis type #49

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/ISSUE_TEMPLATE/1-bug-report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Bug Report
description: Report a bug in the PikiwiDB
labels: [ "☢️ Bug" ]

body:
- type: dropdown
id: is-regression
attributes:
label: Is this a regression?
options:
- 'Yes'
- 'No'
validations:
required: true

- type: textarea
id: description
attributes:
label: Description
validations:
required: true

- type: input
id: reproduction
attributes:
label: Please provide a link to a minimal reproduction of the bug

- type: textarea
attributes:
label: Screenshots or videos
description: If you can, upload any screenshots of the bug.
value: |
![images](https://camo.githubusercontent.com/3f51b5a32e6e5d5adabdebc5ef968150bdabc8d17a8dc1a535b8fb255d2165d0/68747470733a2f2f67772e616c697061796f626a656374732e636f6d2f7a6f732f616e7466696e63646e2f79396b776737445643642f726570726f647563652e676966)

- type: textarea
id: environment
attributes:
label: Please provide the version you discovered this bug in (check about page for version information)
render: true
placeholder: |
Version: v0.0.1
Commit Hash: 7c9b67171b4d2fbdd37218e59dbabe64451d9d68
Build Date: Oct 11, 2023, 10:49 AM GMT+8
OS: linux x64

- type: textarea
id: other
attributes:
label: Anything else?
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/2-feature-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: 'Feature Request'
description: Suggest a feature for PikiwiDB
labels: [ "✏️ Feature" ]

body:
- type: dropdown
id: affected-packages
attributes:
label: Which PikiwiDB functionalities are relevant/related to the feature request?
options:
- other
multiple: true

- type: textarea
id: description
attributes:
label: Description
validations:
required: true

- type: textarea
id: proposed-solution
attributes:
label: Proposed solution
validations:
required: true

- type: textarea
id: alternatives-considered
attributes:
label: Alternatives considered
validations:
required: true
59 changes: 59 additions & 0 deletions .github/ISSUE_TEMPLATE/3-docs-bug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: 'Docs or PikiwiDB Bug Report'
description: Report an issue in PikiwiDB's documentation
labels: [ "📒 Documentation" ]

body:
- type: textarea
id: description
attributes:
label: Describe the problem that you experienced
validations:
required: true

- type: input
id: affected-url
attributes:
label: Enter the URL of the topic with the problem

- type: textarea
id: documentation-goal
attributes:
label: Describe what you were looking for in the documentation

- type: textarea
id: reproduction-steps
attributes:
label: Describe the actions that led you to experience the problem

- type: textarea
id: expected-vs-actual-behavior
attributes:
label: Describe what you want to experience that would fix the problem

- type: textarea
id: screenshot
attributes:
label: Add a screenshot if that helps illustrate the problem

- type: textarea
id: exception-or-error
attributes:
label: If this problem caused an exception or error, please paste it here
render: true
placeholder: |
```
Paste the exception or error here inside a markdown code block,
which is annotated by three grave \(`\) characters before and after the text block.
```

- type: textarea
id: browser-info
attributes:
label: If the problem is browser-specific, please specify the device, OS, browser, and version
render: true

- type: textarea
id: additional-info
attributes:
label: Provide any additional information here in as much as detail as you can
render: true
34 changes: 0 additions & 34 deletions .github/ISSUE_TEMPLATE/bug-report.md

This file was deleted.

12 changes: 0 additions & 12 deletions .github/ISSUE_TEMPLATE/enhancement.md

This file was deleted.

13 changes: 13 additions & 0 deletions .github/pr-title-checker-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"LABEL": {
"name": "Invalid PR Title",
"color": "B60205"
},
"CHECKS": {
"regexp": "^(feat|fix|test|refactor|chore|style|docs|perf|build|ci|revert)(\\(.*\\))?:.*",
"ignoreLabels": [
"ignore-title"
]
}
}

68 changes: 68 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name-template: '$RESOLVED_VERSION'
tag-template: '$RESOLVED_VERSION'
categories:
- title: '❗ Breaking Changes:'
labels:
- '❗ Breaking Change'
- title: '🚀 New Features:'
labels:
- '✏️ Feature'
- title: '🐛 Fixes:'
labels:
- '☢️ Bug'
- title: '📚 Documentation:'
labels:
- '📒 Documentation'
- title: '🧹 Updates:'
labels:
- '🧹 Updates'
- '🤖 Dependencies'
change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&'
exclude-contributors:
- dependabot
- dependabot[bot]
version-resolver:
major:
labels:
- '❗ Breaking Change'
minor:
labels:
- '✏️ Feature'
patch:
labels:
- '📒 Documentation'
- '☢️ Bug'
- '🤖 Dependencies'
- '🧹 Updates'
default: patch
template: |
$CHANGES

Version tags:
- `https://github.com/$OWNER/$REPOSITORY/releases/tag/v$RESOLVED_VERSION`

**📒 Documentation**: PikiwiDB

**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION

Thanks to $CONTRIBUTORS for making this release possible.

autolabeler:
- label: '📒 Documentation'
files:
- '*.md'
title:
- '/(docs|doc:|\[doc\]|typos|comment|documentation)/i'
- label: '☢️ Bug'
title:
- '/(fix|race|bug|missing|correct)/i'
- label: '🧹 Updates'
title:
- '/(improve|update|update|refactor|deprecated|remove|unused|test)/i'
- label: '🤖 Dependencies'
title:
- '/(bump|dependencies)/i'
- label: '✏️ Feature'
title:
- '/(feature|feat|create|implement|add)/i'
19 changes: 19 additions & 0 deletions .github/workflows/pr-title-checker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "PR Title Checker"
on:
pull_request_target:
types:
- opened
- edited
- synchronize
- labeled
- unlabeled

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: thehanimo/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pass_on_octokit_error: false
configuration_path: .github/pr-title-checker-config.json #(optional. defaults to .github/pr-title-checker-config.json)
22 changes: 22 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release Drafter

on:
push:
branches:
- unstable
pull_request_target:
types: [ opened, reopened, synchronize ]

permissions:
contents: read

jobs:
update_release_draft:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,6 @@ tests/tmp
bin

compile_commands.json

# build support
build_support/__pycache__
49 changes: 49 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ SET(INSTALL_INCLUDEDIR ${STAGED_INSTALL_PREFIX}/include)
SET(INSTALL_LIBDIR ${STAGED_INSTALL_PREFIX}/lib)
SET(INSTALL_LIBDIR_64 ${STAGED_INSTALL_PREFIX}/lib64)
SET(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${STAGED_INSTALL_PREFIX})
SET(BUILD_SUPPORT_DIR ${PROJECT_SOURCE_DIR}/build_support)

MESSAGE(STATUS "${PROJECT_NAME} staged install: ${STAGED_INSTALL_PREFIX}")
MESSAGE(STATUS "Current platform: ${OS_VERSION} ")
Expand All @@ -107,10 +108,58 @@ include(cmake/llhttp.cmake)
include(cmake/fmt.cmake)
include(cmake/spdlog.cmake)
include(cmake/folly.cmake)
include(cmake/gtest.cmake)
include(cmake/rocksdb.cmake)
include(cmake/lz4.cmake)
include(cmake/snappy.cmake)
include(cmake/zlib.cmake)
include(cmake/zstd.cmake)

enable_testing()

ADD_SUBDIRECTORY(src/pstd)
ADD_SUBDIRECTORY(src/net)
ADD_SUBDIRECTORY(src/storage)
ADD_SUBDIRECTORY(src)

#############################################################################
### custom target
#############################################################################
SET(CMAKE_EXPORT_COMPILE_COMMANDS ON)

STRING(CONCAT FORMAT_DIRS "${PROJECT_SOURCE_DIR}/src,")
ADD_CUSTOM_TARGET(format
COMMAND ${BUILD_SUPPORT_DIR}/run_clang_format.py
/usr/bin/clang-format
${BUILD_SUPPORT_DIR}/clang_format_exclusions.txt
--source_dirs ${FORMAT_DIRS}
--quiet
--fix
)

ADD_CUSTOM_TARGET(clang-tidy
COMMAND ${BUILD_SUPPORT_DIR}/run_clang_tidy.py
-clang-tidy-binary /usr/bin/clang-tidy
-p ${CMAKE_BINARY_DIR}
-extra-arg=-std=c++17
)

ADD_CUSTOM_TARGET(clang-tidy-fix
COMMAND ${BUILD_SUPPORT_DIR}/run_clang_tidy.py
-clang-tidy-binary /usr/bin/clang-tidy
-p ${CMAKE_BINARY_DIR}
-extra-arg=-std=c++17
-fix
)

FILE(GLOB_RECURSE LINT_FILES
"${CMAKE_CURRENT_SOURCE_DIR}/src/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp"
)
ADD_CUSTOM_TARGET(cpplint echo '${LINT_FILES}' | xargs -n12 -P8
${CPPLINT_BIN}
--verbose=2 --quiet
--linelength=120
--filter=-legal/copyright,-build/header_guard,-runtime/references
)

Empty file.
Loading