Skip to content

Commit 9fc99cc

Browse files
committed
Revert "feat: Implement universal SAX parser for custom structs"
This reverts commit b13636f.
1 parent b13636f commit 9fc99cc

File tree

51 files changed

+131
-2725
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+131
-2725
lines changed

.github/workflows/publish-ubuntu-22.04-images.yaml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,6 @@ jobs:
1818
USERVER_IMAGE_TAG: ${{ github.event.release.tag_name || 'latest' }}
1919
steps:
2020
- uses: actions/checkout@v5
21-
22-
- name: Free disk space
23-
run: |
24-
df -h
25-
# See https://stackoverflow.com/questions/75536771/github-runner-out-of-disk-space-after-building-docker-image
26-
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /usr/lib/php* /opt/ghc \
27-
/usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \
28-
/opt/hostedtoolcache/CodeQL || true
29-
sudo docker image prune --all --force
30-
df -h
31-
3221
- name: Login to GitHub Container Registry
3322
uses: docker/login-action@v3
3423
with:

.github/workflows/publish-ubuntu-24.04-images.yaml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,6 @@ jobs:
1818
USERVER_IMAGE_TAG: ${{ github.event.release.tag_name || 'latest' }}
1919
steps:
2020
- uses: actions/checkout@v5
21-
22-
- name: Free disk space
23-
run: |
24-
df -h
25-
# See https://stackoverflow.com/questions/75536771/github-runner-out-of-disk-space-after-building-docker-image
26-
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /usr/lib/php* /opt/ghc \
27-
/usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \
28-
/opt/hostedtoolcache/CodeQL || true
29-
sudo docker image prune --all --force
30-
df -h
31-
3221
- name: Login to GitHub Container Registry
3322
uses: docker/login-action@v3
3423
with:

chaotic-openapi/chaotic_openapi/front/parser.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,13 @@ def parse_schema(self, schema: dict, full_filepath: str, full_vfilepath: str) ->
4747

4848
self._append_schema(parsed)
4949

50-
def _guess_parser(self, schema: dict):
50+
@staticmethod
51+
def _guess_parser(schema: dict):
5152
if 'openapi' in schema or 'components' in schema:
5253
return openapi.OpenApi
5354
elif 'swagger' in schema or 'definitions' in schema:
5455
return swagger.Swagger
55-
assert False, f"Don't know about file format ({self._state.full_filepath}): {schema}"
56+
assert False, schema
5657

5758
def _convert_openapi_header(
5859
self,

cmake/GetUserverVersion.cmake

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,8 @@ else()
2222
endif()
2323

2424
file(READ ${USERVER_ROOT_DIR}/version.txt VERSION)
25-
string(STRIP ${VERSION} VERSION)
26-
string(REGEX MATCH "^([0-9]+)\.([0-9]+[\-a-z0-9]*)" USERVER_MATCHED_VERSION_STRING "${VERSION}")
27-
if(NOT USERVER_MATCHED_VERSION_STRING STREQUAL VERSION)
28-
message(FATAL_ERROR "Failed to retrieve userver major/minor version number from '${VERSION}'")
29-
endif()
30-
set(USERVER_MAJOR_VERSION ${CMAKE_MATCH_1})
31-
set(USERVER_MINOR_VERSION ${CMAKE_MATCH_2})
25+
string(REGEX MATCH ^[0-9]+ USERVER_MAJOR_VERSION "${VERSION}")
26+
string(REGEX MATCH [-0-9a-z]+$ USERVER_MINOR_VERSION "${VERSION}")
3227

3328
set(USERVER_VERSION "${USERVER_MAJOR_VERSION}.${USERVER_MINOR_VERSION}")
3429
string(REPLACE "-" "_" USERVER_VERSION_STR "${USERVER_VERSION}")

cmake/tsan.suppressions.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
#######################################################################################################################
2-
# ThreadSanitizer suppressions file as per https://github.com/google/sanitizers/wiki/ThreadSanitizerSuppressions #
3-
# #
4-
# Use it by setting environment variable TSAN_OPTIONS="suppressions=path-to/cmake/tsan.suppressions.txt" if userver #
5-
# is built with CMake option -DUSERVER_SANITIZE='thread' #
6-
#######################################################################################################################
1+
# ThreadSanitizer suppressions file as per https://github.com/google/sanitizers/wiki/ThreadSanitizerSuppressions
72

83
# libev uses `sig_atomic_t volatile` for `EV_ATOMIC_T`, that is not atomic. However all the accesess are synchronized
94
# via assembly implemented memory barriers

core/src/engine/coro/marked_allocator.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ USERVER_NAMESPACE_BEGIN
44

55
namespace engine::coro::debug {
66

7-
// must be accessible from gdb
8-
// without __attribute__((used)) can be optimized out
9-
static const std::size_t page_size __attribute__((used)) = MarkedAllocator::traits_type::page_size();
10-
static std::size_t allocator_stack_size __attribute__((used)) = MarkedAllocator::traits_type::default_size();
7+
static volatile const std::size_t page_size = MarkedAllocator::traits_type::page_size();
8+
static volatile std::size_t allocator_stack_size = MarkedAllocator::traits_type::default_size();
119

1210
MarkedAllocator::MarkedAllocator(std::size_t size) : boost::coroutines2::protected_fixedsize_stack(size) {
1311
auto alignment = page_size;

core/src/engine/task/task_context.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,6 @@ class TaskContext::ProfilerExecutionGuard {
497497

498498
void TaskContext::CoroFunc(TaskPipe& task_pipe) {
499499
for (TaskContext* context : task_pipe) {
500-
// `context` is accessed in gdb, do not rename
501500
UASSERT(context);
502501
context->task_pipe_ = &task_pipe;
503502

core/src/logging/component.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#include <userver/logging/log.hpp>
1717
#include <userver/logging/logger.hpp>
1818
#include <userver/os_signals/component.hpp>
19-
#include <userver/testsuite/testpoint.hpp>
2019
#include <userver/utils/algo.hpp>
2120
#include <userver/utils/statistics/writer.hpp>
2221
#include <userver/utils/thread_name.hpp>
@@ -212,7 +211,6 @@ void Logging::StopSocketLoggingDebug(const std::optional<logging::Level>& log_le
212211

213212
void Logging::OnLogRotate() {
214213
try {
215-
TESTPOINT("on-logrotate-called", formats::json::Value{});
216214
TryReopenFiles();
217215
} catch (const std::exception& e) {
218216
LOG_ERROR() << "An error occurred while ReopenAll: " << e;

core/src/server/middlewares/handler_adapter.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,13 @@ void HandlerAdapter::LogRequest(const http::HttpRequest& request, request::Reque
154154
misc::CutTrailingSlash(request.GetRequestPath(), handler_.GetConfig().url_trailing_slash);
155155

156156
logging::LogExtra log_extra{
157-
{tracing::kHttpMetaType, meta_type},
158-
{tracing::kType, kTracingTypeRequest},
157+
{tracing::kHttpMetaType, std::string{meta_type}},
158+
{tracing::kType, std::string{kTracingTypeRequest}},
159159
{"request_body_length", request.RequestBody().length()},
160-
{kTracingBody, handler_.GetRequestBodyForLoggingChecked(request, context, request.RequestBody())},
161-
{kTracingUri, handler_.GetUrlForLoggingChecked(request, context)},
162-
{tracing::kHttpMethod, request.GetMethodStr()},
160+
{std::string{kTracingBody},
161+
handler_.GetRequestBodyForLoggingChecked(request, context, request.RequestBody())},
162+
{std::string{kTracingUri}, handler_.GetUrlForLoggingChecked(request, context)},
163+
{tracing::kHttpMethod, std::string{request.GetMethodStr()}},
163164
};
164165
log_extra.Extend(GetHeadersLogExtra(
165166
need_log_request_headers, request, header_whitelist, handler_.GetConfig().request_headers_size_log_limit

grpc/include/userver/ugrpc/client/call_context.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#include <grpcpp/client_context.h>
77

8+
#include <userver/tracing/span.hpp>
89
#include <userver/utils/impl/internal_tag_fwd.hpp>
910

1011
USERVER_NAMESPACE_BEGIN
@@ -32,6 +33,9 @@ class CallContext {
3233
/// @returns RPC name
3334
std::string_view GetCallName() const noexcept;
3435

36+
/// @returns RPC span
37+
tracing::Span& GetSpan() noexcept;
38+
3539
private:
3640
impl::CallState& state_;
3741
};

0 commit comments

Comments
 (0)