Compare commits

...

14 Commits

Author SHA1 Message Date
Arpad Müller
e97e86eb43 poetry lock 2024-05-06 12:58:34 +02:00
Arpad Müller
c9370d48de Merge remote-tracking branch 'origin/main' into arpad/less_async_trait 2024-05-06 12:54:51 +02:00
Arpad Müller
6f714c308b Adjust timeouts 2024-04-08 17:02:40 +02:00
Arpad Müller
2e6afaa642 Merge remote-tracking branch 'origin/main' into arpad/less_async_trait 2024-04-08 16:58:47 +02:00
Alexander Bayandin
8f0a0440ba CI: reduce session timeout to 30 minutes 2024-04-08 12:29:24 +01:00
Alexander Bayandin
987dc01ed7 CI: set fix timeout value in seconds for regression tests 2024-04-05 15:05:07 +01:00
Alexander Bayandin
719e4ad580 Bump pytest-timeout from 2.1.0 to 2.3.1 2024-04-05 14:58:58 +01:00
Alexander Bayandin
e61b2a08b3 CI: set pytest timeout for regression test suite 2024-04-05 12:54:47 +01:00
Arpad Müller
cc89b46ae5 Merge branch 'main' into arpad/less_async_trait 2024-04-04 16:30:09 +02:00
Arpad Müller
d5cbdd2e90 Remove it here as well 2024-04-04 12:36:28 +02:00
Arpad Müller
6ad9c3560e Merge branch 'main' into arpad/less_async_trait 2024-04-04 12:27:38 +02:00
Arpad Müller
9dc3b09e57 Remove async-trait from Cargo.toml of crates it became unused in 2024-04-03 23:25:06 +02:00
Arpad Müller
fe762e35d8 Remove async_trait from Handler trait as well 2024-04-03 23:21:16 +02:00
Arpad Müller
0c4988a92c Remove async_trait from CompactionDeltaLayer 2024-04-03 23:21:16 +02:00
12 changed files with 1853 additions and 1176 deletions

View File

@@ -48,6 +48,10 @@ inputs:
description: 'benchmark durations JSON'
required: false
default: '{}'
session_timeout:
description: 'Session timeout for the test suite'
required: false
default: ''
runs:
using: "composite"
@@ -107,6 +111,7 @@ runs:
ALLOW_FORWARD_COMPATIBILITY_BREAKAGE: contains(github.event.pull_request.labels.*.name, 'forward compatibility breakage')
RERUN_FLAKY: ${{ inputs.rerun_flaky }}
PG_VERSION: ${{ inputs.pg_version }}
SESSION_TIMEOUT: ${{ inputs.session_timeout }}
shell: bash -euxo pipefail {0}
run: |
# PLATFORM will be embedded in the perf test report
@@ -168,6 +173,10 @@ runs:
EXTRA_PARAMS="--durations-path $TEST_OUTPUT/benchmark_durations.json $EXTRA_PARAMS"
fi
if [ -n "${SESSION_TIMEOUT}" ]; then
EXTRA_PARAMS="--session-timeout ${SESSION_TIMEOUT} ${EXTRA_PARAMS}"
fi
if [[ "${{ inputs.build_type }}" == "debug" ]]; then
cov_prefix=(scripts/coverage "--profraw-prefix=$GITHUB_JOB" --dir=/tmp/coverage run)
elif [[ "${{ inputs.build_type }}" == "release" ]]; then

View File

@@ -461,7 +461,8 @@ jobs:
- name: Pytest regression tests
uses: ./.github/actions/run-python-test-set
timeout-minutes: 60
# Hard timeout to prevent hanging tests, we also have set softer pytest timeout (set via `session_timeout`) which is shorter
timeout-minutes: 110
with:
build_type: ${{ matrix.build_type }}
test_selection: regress
@@ -471,6 +472,8 @@ jobs:
real_s3_region: eu-central-1
rerun_flaky: true
pg_version: ${{ matrix.pg_version }}
# Set pytest session timeout to 25 minutes
session_timeout: '1500'
env:
TEST_RESULT_CONNSTR: ${{ secrets.REGRESS_TEST_RESULT_CONNSTR_NEW }}
CHECK_ONDISK_DATA_COMPATIBILITY: nonempty

2
Cargo.lock generated
View File

@@ -3638,7 +3638,6 @@ dependencies = [
"arc-swap",
"async-compression",
"async-stream",
"async-trait",
"byteorder",
"bytes",
"camino",
@@ -4107,7 +4106,6 @@ name = "postgres_backend"
version = "0.1.0"
dependencies = [
"anyhow",
"async-trait",
"bytes",
"futures",
"once_cell",

View File

@@ -5,7 +5,6 @@ edition.workspace = true
license.workspace = true
[dependencies]
async-trait.workspace = true
anyhow.workspace = true
bytes.workspace = true
futures.workspace = true

View File

@@ -78,17 +78,16 @@ pub fn is_expected_io_error(e: &io::Error) -> bool {
)
}
#[async_trait::async_trait]
pub trait Handler<IO> {
/// Handle single query.
/// postgres_backend will issue ReadyForQuery after calling this (this
/// might be not what we want after CopyData streaming, but currently we don't
/// care). It will also flush out the output buffer.
async fn process_query(
fn process_query(
&mut self,
pgb: &mut PostgresBackend<IO>,
query_string: &str,
) -> Result<(), QueryError>;
) -> impl Future<Output = Result<(), QueryError>> + Send;
/// Called on startup packet receival, allows to process params.
///

View File

@@ -22,7 +22,6 @@ async fn make_tcp_pair() -> (TcpStream, TcpStream) {
struct TestHandler {}
#[async_trait::async_trait]
impl<IO: AsyncRead + AsyncWrite + Unpin + Send> Handler<IO> for TestHandler {
// return single col 'hey' for any query
async fn process_query(

View File

@@ -15,7 +15,6 @@ anyhow.workspace = true
arc-swap.workspace = true
async-compression.workspace = true
async-stream.workspace = true
async-trait.workspace = true
byteorder.workspace = true
bytes.workspace = true
camino.workspace = true

View File

@@ -1384,7 +1384,6 @@ impl PageServerHandler {
}
}
#[async_trait::async_trait]
impl<IO> postgres_backend::Handler<IO> for PageServerHandler
where
IO: AsyncRead + AsyncWrite + Send + Sync + Unpin,

3000
poetry.lock generated

File diff suppressed because one or more lines are too long

View File

@@ -75,7 +75,6 @@ pub type ComputeReady = DatabaseInfo;
// TODO: replace with an http-based protocol.
struct MgmtHandler;
#[async_trait::async_trait]
impl postgres_backend::Handler<tokio::net::TcpStream> for MgmtHandler {
async fn process_query(
&mut self,

View File

@@ -23,7 +23,7 @@ moto = {extras = ["server"], version = "^4.1.2"}
backoff = "^2.2.1"
pytest-lazy-fixture = "^0.6.3"
prometheus-client = "^0.14.1"
pytest-timeout = "^2.1.0"
pytest-timeout = "^2.3.1"
Werkzeug = "^3.0.1"
pytest-order = "^1.1.0"
allure-pytest = "^2.13.2"

View File

@@ -95,7 +95,6 @@ fn cmd_to_string(cmd: &SafekeeperPostgresCommand) -> &str {
}
}
#[async_trait::async_trait]
impl<IO: AsyncRead + AsyncWrite + Unpin + Send> postgres_backend::Handler<IO>
for SafekeeperPostgresHandler
{