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

#31363 format template configure in settings #59088

Merged

Conversation

Blargian
Copy link
Contributor

@Blargian Blargian commented Jan 22, 2024

Hi Clickhouse team,
I'm opening a PR for this feature. Look forward to your feedback and fixing any issues. :)

Changelog category (leave one):

  • New Feature

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

The user can now specify the template string directly in the query using format_schema_rows_template as an alternative to format_template_row. Closes #31363.

Documentation entry for user-facing changes

  • Documentation is written - English and Russian. (То что написал на русском скорее всего есть ошибки, я не носитель русского... нужно помощь исправить пж)

  • docs/en/interfaces/formats.md

  • docs/ru/interfaces/formats.md

  • docs/en/operations/settings/settings-formats.md

Example usage not yet added, I can add that if needed.

@Avogar Avogar self-assigned this Jan 22, 2024
@Avogar Avogar added the can be tested Allows running workflows for external contributors label Jan 22, 2024
@Felixoid
Copy link
Member

Felixoid commented Jan 24, 2024

Dear @Blargian, the # in the branch name breaks the CI because we don't URL-encode it. The fix won't be instant, so please recreate the PR from another branch without special symbols in the name.

@Felixoid
Copy link
Member

@Felixoid
Copy link
Member

If the commit would help, I'll create independent PR

@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-feature Pull request with new product feature label Jan 24, 2024
@robot-ch-test-poll2
Copy link
Contributor

robot-ch-test-poll2 commented Jan 24, 2024

This is an automated comment for commit 42628fd with description of existing statuses. It's updated for the latest CI running

❌ Click here to open a full report in a separate page

Successful checks
Check nameDescriptionStatus
AST fuzzerRuns randomly generated queries to catch program errors. The build type is optionally given in parenthesis. If it fails, ask a maintainer for help✅ success
CI runningA meta-check that indicates the running CI. Normally, it's in success or pending state. The failed status indicates some problems with the PR✅ success
ClickBenchRuns [ClickBench](https://github.com/ClickHouse/ClickBench/) with instant-attach table✅ success
ClickHouse build checkBuilds ClickHouse in various configurations for use in further steps. You have to fix the builds that fail. Build logs often has enough information to fix the error, but you might have to reproduce the failure locally. The cmake options can be found in the build log, grepping for cmake. Use these options and follow the general build process✅ success
Compatibility checkChecks that clickhouse binary runs on distributions with old libc versions. If it fails, ask a maintainer for help✅ success
Docker keeper imageThe check to build and optionally push the mentioned image to docker hub✅ success
Docker server imageThe check to build and optionally push the mentioned image to docker hub✅ success
Docs checkBuilds and tests the documentation✅ success
Fast testNormally this is the first check that is ran for a PR. It builds ClickHouse and runs most of stateless functional tests, omitting some. If it fails, further checks are not started until it is fixed. Look at the report to see which tests fail, then reproduce the failure locally as described here✅ success
Flaky testsChecks if new added or modified tests are flaky by running them repeatedly, in parallel, with more randomization. Functional tests are run 100 times with address sanitizer, and additional randomization of thread scheduling. Integrational tests are run up to 10 times. If at least once a new test has failed, or was too long, this check will be red. We don't allow flaky tests, read the doc✅ success
Install packagesChecks that the built packages are installable in a clear environment✅ success
Integration testsThe integration tests report. In parenthesis the package type is given, and in square brackets are the optional part/total tests✅ success
Mergeable CheckChecks if all other necessary checks are successful✅ success
Performance ComparisonMeasure changes in query performance. The performance test report is described in detail here. In square brackets are the optional part/total tests✅ success
SQLTestThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
SQLancerFuzzing tests that detect logical bugs with SQLancer tool✅ success
SqllogicRun clickhouse on the sqllogic test set against sqlite and checks that all statements are passed✅ success
Stress testRuns stateless functional tests concurrently from several clients to detect concurrency-related errors✅ success
Style checkRuns a set of checks to keep the code style clean. If some of tests failed, see the related log from the report✅ success
Unit testsRuns the unit tests for different release types✅ success
Upgrade checkRuns stress tests on server version from last release and then tries to upgrade it to the version from the PR. It checks if the new server can successfully startup without any errors, crashes or sanitizer asserts✅ success
Check nameDescriptionStatus
Stateful testsRuns stateful functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc❌ failure
Stateless testsRuns stateless functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc❌ failure

@Felixoid Felixoid force-pushed the #31363_format_template_configure_in_settings branch from 5f85653 to 276ccd3 Compare January 24, 2024 13:47
@Felixoid
Copy link
Member

I have restored the previous commit to not affect the autoapprove lambda. It should block changes into tests/ci directory

@Blargian
Copy link
Contributor Author

Blargian commented Jan 24, 2024

@Felixoid thanks for the heads up and also for the fix! I notice the last commits I made didn't trigger the CI to start again. Do you maybe know why?

@Felixoid
Copy link
Member

Felixoid commented Jan 24, 2024

Do you maybe know why?

Do you know a joke?

-- We have good and bad news for you
-- I'd like to start with a good part, doctor
-- We'll call decease after you

#59184

Maybe we'll find another broken assumption in the CI code in the end of the day ¯\_(ツ)_/¯

@Blargian
Copy link
Contributor Author

Do you know a joke?

-- We have good and bad news for you
-- I'd like to start with a good part, doctor
-- We'll call decease after you

Рад служить! )

src/Core/Settings.h Outdated Show resolved Hide resolved
set previous value as empty string for added setting rather than "none" in SettingsChangesHistory.h

Co-authored-by: Kruglov Pavel <48961922+Avogar@users.noreply.github.com>
@Blargian
Copy link
Contributor Author

Blargian commented Jan 30, 2024

@Avogar the last few tests are all failing on issues related to not being able to find, or remove a .tmp version of my shell test. Where does the .tmp version come from, I guess it's something the tests generate? Is there a specific permission level that test files should be given?

@Avogar
Copy link
Member

Avogar commented Jan 30, 2024

The problem is that you used filenames 00937_template_output_format_row.tmp/00937_template_output_format_resultset.tmp, the same as in test 00937_template_output_format.sh, but we run tests in parallel, so one test can create files, another remove them. Also in Stateless tests flaky check we run the same test in parallel with itself, so the same problem. Let's use unique filenames using env variable $CLICKHOUSE_TEST_UNIQUE_NAME

@Blargian
Copy link
Contributor Author

Blargian commented Feb 1, 2024

@Avogar is there some bigger issue with CI at the moment? Fast tests fails since I updated my branch from master this morning. It was okay yesterday.

edit - related to #59453 which caused fast tests to fail

@Avogar
Copy link
Member

Avogar commented Feb 1, 2024

Test 02720_row_policy_column_with_dots was broken in master by accident, already fixed, so should be ok now

Blargian and others added 5 commits February 4, 2024 15:47
@Blargian
Copy link
Contributor Author

Blargian commented Feb 6, 2024

Tests still failing:

@Avogar
Copy link
Member

Avogar commented Feb 13, 2024

Sorry for waiting, I was on vacation. I will resolve conflicts and merge this PR when tests are finished

@Blargian
Copy link
Contributor Author

Sorry for waiting, I was on vacation. I will resolve conflicts and merge this PR when tests are finished

No worries, thanks! Hope it was a good vacation 👍

@Avogar Avogar merged commit c8c9adb into ClickHouse:master Feb 14, 2024
278 of 282 checks passed
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can be tested Allows running workflows for external contributors pr-feature Pull request with new product feature pr-synced-to-cloud The PR is synced to the cloud repo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to configure FORMAT Template with string in SETTINGS
5 participants