Skip to content

Commit

Permalink
Merge pull request #43758 from tchaikov/octopus-pr-43748
Browse files Browse the repository at this point in the history
octopus: admin/doc-requirements.txt: pin Sphinx at 3.5.4

Reviewed-by: Sebastian Wagner <sewagner@redhat.com>
  • Loading branch information
sebastian-philipp committed Nov 2, 2021
2 parents bd7cde0 + a3e4a3e commit a81ee28
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 33 deletions.
4 changes: 2 additions & 2 deletions admin/doc-requirements.txt
@@ -1,6 +1,6 @@
Sphinx == 2.4.3
Sphinx == 3.5.4
git+https://github.com/ceph/sphinx-ditaa.git@py3#egg=sphinx-ditaa
breathe == 4.14.0
breathe >= 4.20.0
pyyaml >= 5.1.2
Cython
prettytable
Expand Down
5 changes: 5 additions & 0 deletions doc/conf.py
Expand Up @@ -99,6 +99,11 @@
["rados_types.h", "librados.h"])
}
breathe_domain_by_extension = {'py': 'py', 'c': 'c', 'h': 'c', 'cc': 'cxx', 'hpp': 'cxx'}
breathe_doxygen_config_options = {
'EXPAND_ONLY_PREDEF': 'YES',
'MACRO_EXPANSION': 'YES',
'PREDEFINED': 'CEPH_RADOS_API= '
}

# the docs are rendered with github links pointing to master. the javascript
# snippet in _static/ceph.js rewrites the edit links when a page is loaded, to
Expand Down
22 changes: 11 additions & 11 deletions doc/scripts/gen_state_diagram.py
Expand Up @@ -23,7 +23,7 @@ def acc_lines(generator):
def to_char(generator):
for line in generator:
for char in line:
if char is not '\n':
if char != '\n':
yield char
else:
yield ' '
Expand All @@ -41,22 +41,22 @@ def remove_multiline_comments(generator):
in_comment = False
for char in generator:
if in_comment:
if saw is "*":
if char is "/":
if saw == "*":
if char == "/":
in_comment = False
saw = ""
if char is "*":
if char == "*":
saw = "*"
continue
if saw is "/":
if char is '*':
if saw == "/":
if char == '*':
in_comment = True
saw = ""
continue
else:
yield saw
saw = ""
if char is '/':
if char == '/':
saw = "/"
continue
yield char
Expand Down Expand Up @@ -129,7 +129,7 @@ def get_state(self, line):
if tokens.group(2) not in self.state_contents.keys():
self.state_contents[tokens.group(2)] = []
self.state_contents[tokens.group(2)].append(tokens.group(1))
if tokens.group(3) is not "":
if tokens.group(3):
self.machines[tokens.group(1)] = tokens.group(3)
self.context.append((tokens.group(1), self.context_depth, ""))
return
Expand All @@ -140,14 +140,14 @@ def get_event(self, line):
line):
if i.group(1) not in self.edges.keys():
self.edges[i.group(1)] = []
if len(self.context) is 0:
if not self.context:
raise Exception("no context at line: " + line)
self.edges[i.group(1)].append((self.context[-1][0], i.group(2)))
i = re.search("return\s+transit<\s*(\w*)\s*>()", line)
if i is not None:
if len(self.context) is 0:
if not self.context:
raise Exception("no context at line: " + line)
if self.context[-1][2] is "":
if not self.context[-1][2]:
raise Exception("no event in context at line: " + line)
if self.context[-1][2] not in self.edges.keys():
self.edges[self.context[-1][2]] = []
Expand Down
2 changes: 1 addition & 1 deletion src/include/rados/librados.h
Expand Up @@ -241,7 +241,7 @@ typedef void * rados_object_list_cursor;
* The item populated by rados_object_list in
* the results array.
*/
typedef struct rados_object_list_item {
typedef struct {

/// oid length
size_t oid_length;
Expand Down
4 changes: 2 additions & 2 deletions src/pybind/mgr/dashboard/requirements-lint.txt
Expand Up @@ -7,5 +7,5 @@ flake8-colors==0.1.6; python_version >= '3'
#flake8-typing-imports; python_version >= '3'
#pep8-naming
rstcheck==3.3.1; python_version >= '3'
autopep8; python_version >= '3'
pyfakefs; python_version >= '3'
autopep8==1.5.7; python_version >= '3'
pyfakefs==4.5.0; python_version >= '3'
4 changes: 0 additions & 4 deletions src/test/rgw/CMakeLists.txt
Expand Up @@ -157,10 +157,6 @@ add_executable(unittest_rgw_dmclock_scheduler test_rgw_dmclock_scheduler.cc $<TA
add_ceph_unittest(unittest_rgw_dmclock_scheduler)

target_link_libraries(unittest_rgw_dmclock_scheduler rgw_schedulers global ${UNITTEST_LIBS})
if(WITH_BOOST_CONTEXT)
target_compile_definitions(unittest_rgw_dmclock_scheduler PRIVATE BOOST_COROUTINES_NO_DEPRECATION_WARNING)
target_link_libraries(unittest_rgw_dmclock_scheduler Boost::coroutine Boost::context)
endif()

if(WITH_RADOSGW_AMQP_ENDPOINT)
add_executable(unittest_rgw_amqp test_rgw_amqp.cc)
Expand Down
24 changes: 11 additions & 13 deletions src/test/rgw/test_rgw_dmclock_scheduler.cc
Expand Up @@ -18,9 +18,7 @@
#include "rgw/rgw_dmclock_async_scheduler.h"

#include <optional>
#ifdef HAVE_BOOST_CONTEXT
#include <boost/asio/spawn.hpp>
#endif
#include <spawn/spawn.hpp>
#include <gtest/gtest.h>
#include "acconfig.h"
#include "global/global_context.h"
Expand Down Expand Up @@ -108,7 +106,7 @@ TEST(Queue, RateLimit)
EXPECT_EQ(1u, counters(client_id::admin)->get(queue_counters::l_qlen));
EXPECT_EQ(1u, counters(client_id::auth)->get(queue_counters::l_qlen));

context.poll();
context.run_for(std::chrono::milliseconds(1));
EXPECT_TRUE(context.stopped());

ASSERT_TRUE(ec1);
Expand Down Expand Up @@ -166,7 +164,7 @@ TEST(Queue, AsyncRequest)
EXPECT_EQ(1u, counters(client_id::admin)->get(queue_counters::l_qlen));
EXPECT_EQ(1u, counters(client_id::auth)->get(queue_counters::l_qlen));

context.poll();
context.run_for(std::chrono::milliseconds(1));
EXPECT_TRUE(context.stopped());

ASSERT_TRUE(ec1);
Expand Down Expand Up @@ -220,7 +218,7 @@ TEST(Queue, Cancel)
EXPECT_FALSE(ec1);
EXPECT_FALSE(ec2);

context.poll();
context.run_for(std::chrono::milliseconds(1));
EXPECT_TRUE(context.stopped());

ASSERT_TRUE(ec1);
Expand Down Expand Up @@ -268,7 +266,7 @@ TEST(Queue, CancelClient)
EXPECT_FALSE(ec1);
EXPECT_FALSE(ec2);

context.poll();
context.run_for(std::chrono::milliseconds(1));
EXPECT_TRUE(context.stopped());

ASSERT_TRUE(ec1);
Expand Down Expand Up @@ -318,7 +316,7 @@ TEST(Queue, CancelOnDestructor)
EXPECT_FALSE(ec1);
EXPECT_FALSE(ec2);

context.poll();
context.run_for(std::chrono::milliseconds(1));
EXPECT_TRUE(context.stopped());

ASSERT_TRUE(ec1);
Expand Down Expand Up @@ -372,20 +370,20 @@ TEST(Queue, CrossExecutorRequest)
EXPECT_EQ(1u, counters(client_id::admin)->get(queue_counters::l_qlen));
EXPECT_EQ(1u, counters(client_id::auth)->get(queue_counters::l_qlen));

callback_context.poll();
callback_context.run_for(std::chrono::milliseconds(1));
// maintains work on callback executor while in queue
EXPECT_FALSE(callback_context.stopped());

EXPECT_FALSE(ec1);
EXPECT_FALSE(ec2);

queue_context.poll();
queue_context.run_for(std::chrono::milliseconds(1));
EXPECT_TRUE(queue_context.stopped());

EXPECT_FALSE(ec1); // no callbacks until callback executor runs
EXPECT_FALSE(ec2);

callback_context.poll();
callback_context.run_for(std::chrono::milliseconds(1));
EXPECT_TRUE(callback_context.stopped());

ASSERT_TRUE(ec1);
Expand All @@ -403,7 +401,7 @@ TEST(Queue, SpawnAsyncRequest)
{
boost::asio::io_context context;

boost::asio::spawn(context, [&] (boost::asio::yield_context yield) {
spawn::spawn(context, [&] (spawn::yield_context yield) {
ClientCounters counters(g_ceph_context);
AsyncScheduler queue(g_ceph_context, context, std::ref(counters), nullptr,
[] (client_id client) -> ClientInfo* {
Expand All @@ -424,7 +422,7 @@ TEST(Queue, SpawnAsyncRequest)
EXPECT_EQ(PhaseType::priority, p2);
});

context.poll();
context.run_for(std::chrono::milliseconds(1));
EXPECT_TRUE(context.stopped());
}

Expand Down

0 comments on commit a81ee28

Please sign in to comment.