Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: Check settings validation #16733

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

evanevanevanevannnn
Copy link
Collaborator

Changelog entry

...

Changelog category

  • Not for changelog (changelog entry is not required)

Description for reviewers

new tests (and test infra) for solomon/reading test suit (#16383)

Copy link

github-actions bot commented Apr 3, 2025

2025-04-03 13:20:33 UTC Pre-commit check linux-x86_64-relwithdebinfo for 4852c08 has started.
2025-04-03 13:20:48 UTC Artifacts will be uploaded here
2025-04-03 13:23:33 UTC ya make is running...
🟡 2025-04-03 14:40:39 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
26859 24173 0 35 2540 111

2025-04-03 14:43:23 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-04-03 15:00:59 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
192 (only retried tests) 57 0 34 0 101

2025-04-03 15:01:08 UTC ya make is running... (failed tests rerun, try 3)
🔴 2025-04-03 15:19:43 UTC Some tests failed, follow the links below.

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
176 (only retried tests) 42 0 34 0 100

🟢 2025-04-03 15:19:54 UTC Build successful.
🟢 2025-04-03 15:20:16 UTC ydbd size 2.2 GiB changed* by +8.1 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 18726ad merge: 4852c08 diff diff %
ydbd size 2 350 613 760 Bytes 2 350 622 104 Bytes +8.1 KiB +0.000%
ydbd stripped size 491 593 664 Bytes 491 596 224 Bytes +2.5 KiB +0.001%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Apr 3, 2025

🟢 2025-04-03 16:06:43 UTC The validation of the Pull Request description is successful.

Copy link

github-actions bot commented Apr 3, 2025

2025-04-03 13:30:38 UTC Pre-commit check linux-x86_64-release-asan for 4852c08 has started.
2025-04-03 13:30:44 UTC Artifacts will be uploaded here
2025-04-03 13:33:31 UTC ya make is running...
🟡 2025-04-03 14:46:57 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
12422 12272 0 87 30 33

2025-04-03 14:48:02 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-04-03 15:01:02 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
201 (only retried tests) 129 0 39 3 30

2025-04-03 15:01:10 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-04-03 15:19:59 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
103 (only retried tests) 32 0 39 1 31

🟢 2025-04-03 15:20:07 UTC Build successful.
🟢 2025-04-03 15:20:37 UTC ydbd size 3.8 GiB changed* by +21.5 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 18726ad merge: 4852c08 diff diff %
ydbd size 4 124 394 680 Bytes 4 124 416 696 Bytes +21.5 KiB +0.001%
ydbd stripped size 1 425 049 000 Bytes 1 425 057 288 Bytes +8.1 KiB +0.001%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@evanevanevanevannnn evanevanevanevannnn changed the title New Solomon tests Test: Check settings validation Apr 3, 2025
auto grpcPort = cluster.MutableSettings()->Add();
*grpcPort->MutableName() = "grpcPort";
*grpcPort->MutableValue() = value;
if (auto value = properties.Value("http_endpoint", ""); !value.empty()) {
Copy link
Collaborator

@GrigoriyPA GrigoriyPA Apr 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно наверное упростить и написать:

if (auto value = properties.Value("http_endpoint", "")) {

(аналогично с ифом ниже)

if (attr.name() == "http_endpoint"sv) {
source.SetHttpEndpoint(attr.value());
}
else if (attr.name() == "grpc_endpoint"sv) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Обычно в коде рядом else идёт на той же строчке, что и }:

} else if (attr.name() == "grpc_endpoint"sv) {

Аналогично с else ниже

}

if (source.GetHttpEndpoint().empty() || source.GetGrpcEndpoint().empty()) {
throw yexception() << "Specify both http_endpoint and grpc_endpoint for solomon source.";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не могу найти по коду валидации того что http_endpoint и grpc_endpoint заполнены на более ранних оптимизациях. Она должна быть сделана дополнительно на более раннем этапе, так как ошибки возникающие в dq integration приводят к завершению запроса с INTERNAL ERROR (можно добавить валидацию на load metadata / type annotation)

@@ -17,12 +17,13 @@ def parse_args():
parser.add_argument("--auth", type=str, required=False, help="Allowed value for Authorization header")
parser.add_argument("--shard", type=str, required=False, action='append',
help="Allowed shard id in form $project_name/$service_name/$cluster_name")
parser.add_argument("--port", type=int, required=False, default=31000, help="Listen HTTP port")
parser.add_argument("--http_port", type=int, required=False, default=31000, help="Listen HTTP port")
parser.add_argument("--grpc_port", type=int, required=False, default=32000, help="Listen GRPC port")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Немного не обычно выглядит snake case в аргументах, может быть переименовать в --http-port и --grpc-port? Но я не уверен как лучше

result["from"] = str(request.from_time)
result["to"] = str(request.to_time)
result["program"] = f"program length {len(str(request.queries[0].value))}"
if (request.downsampling.HasField("disabled")):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Кажется скобки для python в if излишни, if request.downsampling.HasField("disabled"): должно работать

logger.debug('ReadRequest: %s', request)

project = request.container.project_id
if (project == "invalid"):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тоже можно наверное опустить скобки

@@ -0,0 +1,3 @@
RECURSE(
reading
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не хватает перевода строки

ydb/tests/library/test_meta
)

END()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не хватает перевода строки

error = generic_error

assert (error is not None)
assert (error_msg in extract_issue_messages(error))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В assert на сколько я знаю тоже скобки можно убрать

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test reading. Functional. Check settings validation
2 participants