Skip to content

Commit

Permalink
Merge branch 'main' into chore-nextest
Browse files Browse the repository at this point in the history
  • Loading branch information
dantengsky authored Oct 8, 2023
2 parents 2cfe0ff + a5533ed commit e3324f5
Show file tree
Hide file tree
Showing 38 changed files with 389 additions and 155 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ jobs:
tar x -C ./target/release -f ./distro/databend-testsuite-${version}-${target}.tar.gz --strip-components 1 bin/
chmod +x ./target/release/databend-*
- name: Run sqlsmith
timeout-minutes: 30
timeout-minutes: 60
shell: bash
run: |
bash ./scripts/ci/ci-run-sqlsmith-tests.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reuse.linux.hive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
# fetch all tags, metasrv and metaclient need tag as its version.
fetch-depth: 0
- uses: ./.github/actions/build_linux
timeout-minutes: 30
timeout-minutes: 60
with:
sha: ${{ github.sha }}
target: ${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reuse.linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
# fetch all tags, metasrv and metaclient need tag as its version.
fetch-depth: 0
- uses: ./.github/actions/check
timeout-minutes: 30
timeout-minutes: 60
with:
github_token: ${{ github.token }}

Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
# fetch all tags, metasrv and metaclient need tag as its version.
fetch-depth: 0
- uses: ./.github/actions/test_unit
timeout-minutes: 30
timeout-minutes: 60

test_metactl:
runs-on: [self-hosted, X64, Linux, 4c8g, "${{ inputs.runner_provider }}"]
Expand Down
10 changes: 10 additions & 0 deletions src/meta/app/src/principal/user_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ pub struct CopyOptions {
pub single: bool,
pub max_file_size: usize,
pub disable_variant_check: bool,
pub return_failed_only: bool,
}

impl CopyOptions {
Expand Down Expand Up @@ -525,6 +526,15 @@ impl CopyOptions {
})?;
self.disable_variant_check = disable_variant_check;
}
"return_failed_only" => {
let return_failed_only = bool::from_str(v).map_err(|_| {
ErrorCode::StrParseError(format!(
"Cannot parse return_failed_only: {} as bool",
v
))
})?;
self.return_failed_only = return_failed_only;
}
_ => {
if !ignore_unknown {
return Err(ErrorCode::BadArguments(format!(
Expand Down
2 changes: 2 additions & 0 deletions src/meta/proto-conv/src/stage_from_to_protobuf_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ impl FromToProto for mt::principal::CopyOptions {
single: p.single,
max_file_size,
disable_variant_check: p.disable_variant_check,
return_failed_only: p.return_failed_only,
})
}

Expand Down Expand Up @@ -163,6 +164,7 @@ impl FromToProto for mt::principal::CopyOptions {
single: self.single,
max_file_size,
disable_variant_check: self.disable_variant_check,
return_failed_only: self.return_failed_only,
})
}
}
Expand Down
1 change: 1 addition & 0 deletions src/meta/proto-conv/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ const META_CHANGE_LOG: &[(u64, &str)] = &[
(57, "2023-09-05: Add: catalog.proto add hdfs config", ),
(58, "2023-09-06: Add: udf.proto/UserDefinedFunction", ),
(59, "2023-08-17: Add: user.proto/CsvFileFormatParams add field `allow_column_count_mismatch`", ),
(60, "2023-08-17: Add: user.proto/CopyOptions add field `return_failed_only`", ),
// Dear developer:
// If you're gonna add a new metadata version, you'll have to add a test for it.
// You could just copy an existing test file(e.g., `../tests/it/v024_table_meta.rs`)
Expand Down
1 change: 1 addition & 0 deletions src/meta/proto-conv/tests/it/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ mod v056_least_visible_time;
mod v057_hdfs_storage;
mod v058_udf;
mod v059_csv_format_params;
mod v060_copy_options;
11 changes: 11 additions & 0 deletions src/meta/proto-conv/tests/it/user_proto_conv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ pub(crate) fn test_fs_stage_info() -> mt::principal::StageInfo {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),

Expand Down Expand Up @@ -133,6 +134,7 @@ pub(crate) fn test_s3_stage_info() -> mt::principal::StageInfo {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -170,6 +172,7 @@ pub(crate) fn test_s3_stage_info_v16() -> mt::principal::StageInfo {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -207,6 +210,7 @@ pub(crate) fn test_s3_stage_info_v14() -> mt::principal::StageInfo {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -240,6 +244,7 @@ pub(crate) fn test_gcs_stage_info() -> mt::principal::StageInfo {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -275,6 +280,7 @@ pub(crate) fn test_oss_stage_info() -> mt::principal::StageInfo {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -307,6 +313,7 @@ pub(crate) fn test_webhdfs_stage_info() -> mt::principal::StageInfo {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -340,6 +347,7 @@ pub(crate) fn test_obs_stage_info() -> mt::principal::StageInfo {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -373,6 +381,7 @@ pub(crate) fn test_cos_stage_info() -> mt::principal::StageInfo {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -814,6 +823,7 @@ pub(crate) fn test_internal_stage_info_v17() -> mt::principal::StageInfo {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -843,6 +853,7 @@ pub(crate) fn test_stage_info_v18() -> mt::principal::StageInfo {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down
20 changes: 20 additions & 0 deletions src/meta/proto-conv/tests/it/user_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ fn test_user_stage_webhdfs_v30() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -153,6 +154,7 @@ fn test_user_stage_fs_v22() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -196,6 +198,7 @@ fn test_user_stage_fs_v21() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -238,6 +241,7 @@ fn test_user_stage_fs_v20() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -281,6 +285,7 @@ fn test_user_stage_fs_v16() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -336,6 +341,7 @@ fn test_user_stage_s3_v16() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -385,6 +391,7 @@ fn test_user_stage_gcs_v16() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -437,6 +444,7 @@ fn test_user_stage_oss_v16() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -491,6 +499,7 @@ fn test_user_stage_oss_v13() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -545,6 +554,7 @@ fn test_user_stage_s3_v11() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -597,6 +607,7 @@ fn test_user_stage_s3_v8() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -640,6 +651,7 @@ fn test_user_stage_fs_v6() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -693,6 +705,7 @@ fn test_user_stage_s3_v6() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -742,6 +755,7 @@ fn test_user_stage_gcs_v6() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -784,6 +798,7 @@ fn test_user_stage_fs_v4() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -837,6 +852,7 @@ fn test_user_stage_s3_v4() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -885,6 +901,7 @@ fn test_user_stage_gcs_v4() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -935,6 +952,7 @@ fn test_user_stage_s3_v1() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -980,6 +998,7 @@ fn test_internal_stage_v17() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -1024,6 +1043,7 @@ fn test_user_stage_v19() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down
1 change: 1 addition & 0 deletions src/meta/proto-conv/tests/it/v025_user_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ fn test_decode_v25_user_stage() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
number_of_files: 100,
Expand Down
1 change: 1 addition & 0 deletions src/meta/proto-conv/tests/it/v030_user_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ fn test_decode_v30_user_stage() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down
1 change: 1 addition & 0 deletions src/meta/proto-conv/tests/it/v031_copy_max_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ fn test_decode_v31_copy_max_file() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down
1 change: 1 addition & 0 deletions src/meta/proto-conv/tests/it/v035_user_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ fn test_decode_v35_user_stage() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: true,
return_failed_only: false,
},
comment: "test".to_string(),
number_of_files: 100,
Expand Down
1 change: 1 addition & 0 deletions src/meta/proto-conv/tests/it/v042_s3_stage_new_field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ fn test_decode_v42_s3_stage_new_field() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: true,
return_failed_only: false,
},
comment: "test".to_string(),
number_of_files: 100,
Expand Down
2 changes: 2 additions & 0 deletions src/meta/proto-conv/tests/it/v051_obs_and_cos_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ fn test_decode_v51_obs_stage() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down Expand Up @@ -117,6 +118,7 @@ fn test_decode_v51_cos_stage() -> anyhow::Result<()> {
single: false,
max_file_size: 0,
disable_variant_check: false,
return_failed_only: false,
},
comment: "test".to_string(),
..Default::default()
Expand Down
Loading

0 comments on commit e3324f5

Please sign in to comment.