Skip to content

Commit

Permalink
Merge branch 'scylladb:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Jadw1 authored Jan 23, 2025
2 parents d07b426 + 0092bb5 commit 0476452
Show file tree
Hide file tree
Showing 2,368 changed files with 35,990 additions and 7,737 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
*.hh diff=cpp
*.svg binary
docs/_static/api/js/* binary
pgo/profiles/** filter=lfs diff=lfs merge=lfs -text
7 changes: 4 additions & 3 deletions .github/scripts/auto-backport.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def create_pull_request(repo, new_branch_name, base_branch_name, pr, backport_pr
backport_pr.add_to_assignees(pr.user)
if is_draft:
backport_pr.add_to_labels("conflicts")
pr_comment = f"@{pr.user} - This PR was marked as draft because it has conflicts\n"
pr_comment = f"@{pr.user.login} - This PR was marked as draft because it has conflicts\n"
pr_comment += "Please resolve them and mark this PR as ready for review"
backport_pr.create_issue_comment(pr_comment)
logging.info(f"Assigned PR to original author: {pr.user}")
Expand All @@ -66,7 +66,8 @@ def get_pr_commits(repo, pr, stable_branch, start_commit=None):
if pr.merged:
merge_commit = repo.get_commit(pr.merge_commit_sha)
if len(merge_commit.parents) > 1: # Check if this merge commit includes multiple commits
commits.append(pr.merge_commit_sha)
for commit in pr.get_commits():
commits.append(commit.sha)
else:
if start_commit:
promoted_commits = repo.compare(start_commit, stable_branch).commits
Expand Down Expand Up @@ -114,7 +115,7 @@ def backport(repo, pr, version, commits, backport_base_branch):
is_draft = False
for commit in commits:
try:
repo_local.git.cherry_pick(commit, '-m1', '-x')
repo_local.git.cherry_pick(commit, '-x')
except GitCommandError as e:
logging.warning(f'Cherry-pick conflict on commit {commit}: {e}')
is_draft = True
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/iwyu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
CLEANER_OUTPUT_PATH: build/clang-include-cleaner.log
# the "idl" subdirectory does not contain C++ source code. the .hh files in it are
# supposed to be processed by idl-compiler.py, so we don't check them using the cleaner
CLEANER_DIRS: test/unit exceptions alternator api auth cdc compaction db dht gms index lang message mutation
CLEANER_DIRS: test/unit exceptions alternator api auth cdc compaction db dht gms index lang message mutation mutation_writer node_ops redis replica

permissions: {}

Expand Down Expand Up @@ -45,6 +45,10 @@ jobs:
-G Ninja \
-B $BUILD_DIR \
-S .
- run: |
cmake \
--build $BUILD_DIR \
--target wasmtime_bindings
- name: Build headers
run: |
swagger_targets=''
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/seastar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ env:
BUILD_DIR: build

jobs:
read-toolchain:
uses: ./.github/workflows/read-toolchain.yaml
build-with-the-latest-seastar:
needs:
- read-toolchain
runs-on: ubuntu-latest
# be consistent with tools/toolchain/image
container: scylladb/scylla-toolchain:fedora-40-20240621
container: ${{ needs.read-toolchain.outputs.image }}
strategy:
matrix:
build_type:
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/urgent_issue_reminder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Urgent Issue Reminder

on:
schedule:
- cron: '10 8 * * 1' # Runs every Monday at 8 AM

jobs:
reminder:
runs-on: ubuntu-latest

steps:
- name: Send reminders
uses: actions/github-script@v7
with:
script: |
const labelFilters = ['P0', 'P1', 'Field-Tier1','status/release blocker', 'status/regression'];
const excludingLabelFilters = ['documentation'];
const daysInactive = 7;
const now = new Date();
// Fetch open issues
const issues = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open'
});
console.log("Looking for issues with labels:"+labelFilters+", excluding labels:"+excludingLabelFilters+ ", inactive for more than "+daysInactive+" days.");
for (const issue of issues.data) {
// Check if issue has any of the specified labels
const hasFilteredLabel = issue.labels.some(label => labelFilters.includes(label.name));
const hasExcludingLabel = issue.labels.some(label => excludingLabelFilters.includes(label.name));
if (hasExcludingLabel) continue;
if (!hasFilteredLabel) continue;
// Check for inactivity
const lastUpdated = new Date(issue.updated_at);
const diffInDays = (now - lastUpdated) / (1000 * 60 * 60 * 24);
console.log("Issue #"+issue.number+"; Days inactive:"+diffInDays);
if (diffInDays > daysInactive) {
if (issue.assignees.length > 0) {
console.log("==>> Alert about issue #"+issue.number);
const assigneesLogins = issue.assignees.map(assignee => `@${assignee.login}`).join(', ');
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
body: `${assigneesLogins}, This urgent issue had no activity for more than ${daysInactive} days. Please check its status.\n CC @mykaul @dani-tweig`
});
} else {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
body: `This urgent issue had no activity for more than ${daysInactive} days. Please check its status.\n CC @mykaul @dani-tweig`
});
}
}
}
44 changes: 38 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ if(DEFINED CMAKE_BUILD_TYPE)
endif()
endif(DEFINED CMAKE_BUILD_TYPE)

option(Scylla_ENABLE_LTO "Turn on link-time optimization for the 'release' mode." ON)

include(mode.common)
get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(is_multi_config)
Expand All @@ -42,6 +44,7 @@ else()
endif()

include(limit_jobs)

# Configure Seastar compile options to align with Scylla
set(CMAKE_CXX_STANDARD "23" CACHE INTERNAL "")
set(CMAKE_CXX_EXTENSIONS ON CACHE INTERNAL "")
Expand Down Expand Up @@ -92,7 +95,7 @@ else()
set(Seastar_EXCLUDE_APPS_FROM_ALL ON CACHE BOOL "" FORCE)
set(Seastar_EXCLUDE_TESTS_FROM_ALL ON CACHE BOOL "" FORCE)
set(Seastar_IO_URING ON CACHE BOOL "" FORCE)
set(Seastar_SCHEDULING_GROUPS_COUNT 16 CACHE STRING "" FORCE)
set(Seastar_SCHEDULING_GROUPS_COUNT 19 CACHE STRING "" FORCE)
set(Seastar_UNUSED_RESULT_ERROR ON CACHE BOOL "" FORCE)
add_subdirectory(seastar)
target_compile_definitions (seastar
Expand All @@ -102,13 +105,17 @@ endif()

set(ABSL_PROPAGATE_CXX_STD ON CACHE BOOL "" FORCE)

if(Scylla_ENABLE_LTO)
list(APPEND absl_cxx_flags $<$<CONFIG:RelWithDebInfo>:${CMAKE_CXX_COMPILE_OPTIONS_IPO};-ffat-lto-objects>)
endif()

find_package(Sanitizers QUIET)
set(sanitizer_cxx_flags
list(APPEND absl_cxx_flags
$<$<CONFIG:Debug,Sanitize>:$<TARGET_PROPERTY:Sanitizers::address,INTERFACE_COMPILE_OPTIONS>;$<TARGET_PROPERTY:Sanitizers::undefined_behavior,INTERFACE_COMPILE_OPTIONS>>)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(ABSL_GCC_FLAGS ${sanitizer_cxx_flags})
list(APPEND ABSL_GCC_FLAGS ${absl_cxx_flags})
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(ABSL_LLVM_FLAGS ${sanitizer_cxx_flags})
list(APPEND ABSL_LLVM_FLAGS ${absl_cxx_flags})
endif()
set(ABSL_DEFAULT_LINKOPTS
$<$<CONFIG:Debug,Sanitize>:$<TARGET_PROPERTY:Sanitizers::address,INTERFACE_LINK_LIBRARIES>;$<TARGET_PROPERTY:Sanitizers::undefined_behavior,INTERFACE_LINK_LIBRARIES>>)
Expand Down Expand Up @@ -141,11 +148,13 @@ find_package(ICU COMPONENTS uc i18n REQUIRED)
find_package(fmt 10.0.0 REQUIRED)
find_package(libdeflate REQUIRED)
find_package(libxcrypt REQUIRED)
find_package(p11-kit REQUIRED)
find_package(Snappy REQUIRED)
find_package(RapidJSON REQUIRED)
find_package(xxHash REQUIRED)
find_package(yaml-cpp REQUIRED)
find_package(zstd REQUIRED)
find_package(lz4 REQUIRED)

set(scylla_gen_build_dir "${CMAKE_BINARY_DIR}/gen")
file(MAKE_DIRECTORY "${scylla_gen_build_dir}")
Expand Down Expand Up @@ -191,6 +200,7 @@ target_sources(scylla-main
tombstone_gc_options.cc
tombstone_gc.cc
reader_concurrency_semaphore.cc
reader_concurrency_semaphore_group.cc
row_cache.cc
schema_mutations.cc
serializer.cc
Expand All @@ -213,7 +223,10 @@ target_link_libraries(scylla-main
Seastar::seastar
Snappy::snappy
systemd
ZLIB::ZLIB)
ZLIB::ZLIB
lz4::lz4_static
zstd::zstd_static
)

option(Scylla_CHECK_HEADERS
"Add check-headers target for checking the self-containness of headers")
Expand Down Expand Up @@ -248,13 +261,15 @@ add_custom_target(compiler-training)

add_subdirectory(api)
add_subdirectory(alternator)
add_subdirectory(audit)
add_subdirectory(db)
add_subdirectory(auth)
add_subdirectory(cdc)
add_subdirectory(compaction)
add_subdirectory(cql3)
add_subdirectory(data_dictionary)
add_subdirectory(dht)
add_subdirectory(ent)
add_subdirectory(gms)
add_subdirectory(idl)
add_subdirectory(index)
Expand Down Expand Up @@ -285,7 +300,8 @@ add_version_library(scylla_version

add_executable(scylla
main.cc)
target_link_libraries(scylla PRIVATE
set(scylla_libs
audit
scylla-main
api
auth
Expand All @@ -296,10 +312,12 @@ target_link_libraries(scylla PRIVATE
cql3
data_dictionary
dht
encryption
gms
idl
index
lang
ldap
locator
message
mutation
Expand All @@ -320,8 +338,18 @@ target_link_libraries(scylla PRIVATE
transport
types
utils)
target_link_libraries(scylla PRIVATE
${scylla_libs})

if(Scylla_ENABLE_LTO)
include(enable_lto)
foreach(target scylla ${scylla_libs})
enable_lto(${target})
endforeach()
endif()

target_link_libraries(scylla PRIVATE
p11-kit::p11-kit
Seastar::seastar
absl::headers
yaml-cpp::yaml-cpp
Expand All @@ -339,3 +367,7 @@ add_dependencies(compiler-training
if(Scylla_DIST)
add_subdirectory(dist)
endif()

if(Scylla_BUILD_INSTRUMENTED)
add_subdirectory(pgo)
endif()
Loading

0 comments on commit 0476452

Please sign in to comment.