Merge pull request #40713 from ClickHouse/remove-useless-line

Remove one line from XML, because we do not care
This commit is contained in:
Alexey Milovidov 2022-09-11 09:53:30 +03:00 committed by GitHub
commit 5802c2fdd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
253 changed files with 11 additions and 283 deletions

View File

@ -133,11 +133,11 @@ func TestConfigFileFrameCopy(t *testing.T) {
require.Empty(t, errs)
i := 0
sizes := map[string]int64{
"users.xml": int64(2039),
"users.xml": int64(2017),
"default-password.xml": int64(188),
"config.xml": int64(61282),
"config.xml": int64(61260),
"server-include.xml": int64(168),
"user-include.xml": int64(582),
"user-include.xml": int64(559),
}
var checkedFiles []string
for {

View File

@ -1,4 +1,3 @@
<?xml version="1.0" ?>
<clickhouse>
<test_user>
<networks>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<!--
NOTE: User and query level settings are set up in "users.xml" file.
If you have accidentally specified user-level settings here, server won't start.

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<!-- See also the files in users.d directory where the settings can be overridden. -->
<!-- Profiles of settings. -->

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<!--
NOTE: User and query level settings are set up in "users.xml" file.
If you have accidentally specified user-level settings here, server won't start.

View File

@ -1,4 +1,3 @@
<?xml version="1.0" ?>
<clickhouse>
<listen_host>::</listen_host>
<listen_host>0.0.0.0</listen_host>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<!--
NOTE: User and query level settings are set up in "users.xml" file.
If you have accidentally specified user-level settings here, server won't start.

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<!-- Config that is used when server is run without config file. -->
<clickhouse>
<logger>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<profiles>
<default>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<users>
<default>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<!-- See also the files in users.d directory where the settings can be overridden. -->

View File

@ -10,8 +10,7 @@ using namespace DB;
TEST(Common, getMultipleValuesFromConfig)
{
std::istringstream // STYLE_CHECK_ALLOW_STD_STRING_STREAM
xml_isteam(R"END(<?xml version="1.0"?>
<clickhouse>
xml_isteam(R"END(<clickhouse>
<first_level>
<second_level>0</second_level>
<second_level>1</second_level>

View File

@ -60,24 +60,6 @@ TEST(Common, SensitiveDataMasker)
"SELECT id FROM mysql('localhost:3308', 'database', 'table', 'root', '******') WHERE "
"ssn='000-00-0000' or email='hidden@hidden.test'");
#ifndef NDEBUG
// simple benchmark
auto start = std::chrono::high_resolution_clock::now();
static constexpr size_t iterations = 200000;
for (int i = 0; i < iterations; ++i)
{
std::string query2 = "SELECT id FROM mysql('localhost:3308', 'database', 'table', 'root', 'qwerty123') WHERE ssn='123-45-6789' or "
"email='JonhSmith@secret.domain.test'";
masker2.wipeSensitiveData(query2);
}
auto finish = std::chrono::high_resolution_clock::now();
std::chrono::duration<double> elapsed = finish - start;
std::cout << "Elapsed time: " << elapsed.count() << "s per " << iterations <<" calls (" << elapsed.count() * 1000000 / iterations << "µs per call)"
<< std::endl;
// I have: "Elapsed time: 3.44022s per 200000 calls (17.2011µs per call)"
masker2.printStats();
#endif
DB::SensitiveDataMasker maskerbad(*empty_xml_config , "");
// gtest has not good way to check exception content, so just do it manually (see https://github.com/google/googletest/issues/952 )
@ -104,8 +86,7 @@ TEST(Common, SensitiveDataMasker)
try
{
std::istringstream // STYLE_CHECK_ALLOW_STD_STRING_STREAM
xml_isteam_bad(R"END(<?xml version="1.0"?>
<clickhouse>
xml_isteam(R"END(<clickhouse>
<query_masking_rules>
<rule>
<name>test</name>
@ -118,7 +99,7 @@ TEST(Common, SensitiveDataMasker)
</query_masking_rules>
</clickhouse>)END");
Poco::AutoPtr<Poco::Util::XMLConfiguration> xml_config = new Poco::Util::XMLConfiguration(xml_isteam_bad);
Poco::AutoPtr<Poco::Util::XMLConfiguration> xml_config = new Poco::Util::XMLConfiguration(xml_isteam);
DB::SensitiveDataMasker masker_xml_based_exception_check(*xml_config, "query_masking_rules");
ADD_FAILURE() << "XML should throw an error on bad XML" << std::endl;
@ -134,14 +115,13 @@ TEST(Common, SensitiveDataMasker)
try
{
std::istringstream // STYLE_CHECK_ALLOW_STD_STRING_STREAM
xml_isteam_bad(R"END(<?xml version="1.0"?>
<clickhouse>
xml_isteam(R"END(<clickhouse>
<query_masking_rules>
<rule><name>test</name></rule>
</query_masking_rules>
</clickhouse>)END");
Poco::AutoPtr<Poco::Util::XMLConfiguration> xml_config = new Poco::Util::XMLConfiguration(xml_isteam_bad);
Poco::AutoPtr<Poco::Util::XMLConfiguration> xml_config = new Poco::Util::XMLConfiguration(xml_isteam);
DB::SensitiveDataMasker masker_xml_based_exception_check(*xml_config, "query_masking_rules");
ADD_FAILURE() << "XML should throw an error on bad XML" << std::endl;
@ -157,14 +137,13 @@ TEST(Common, SensitiveDataMasker)
try
{
std::istringstream // STYLE_CHECK_ALLOW_STD_STRING_STREAM
xml_isteam_bad(R"END(<?xml version="1.0"?>
<clickhouse>
xml_isteam(R"END(<clickhouse>
<query_masking_rules>
<rule><name>test</name><regexp>())(</regexp></rule>
</query_masking_rules>
</clickhouse>)END");
Poco::AutoPtr<Poco::Util::XMLConfiguration> xml_config = new Poco::Util::XMLConfiguration(xml_isteam_bad);
Poco::AutoPtr<Poco::Util::XMLConfiguration> xml_config = new Poco::Util::XMLConfiguration(xml_isteam);
DB::SensitiveDataMasker masker_xml_based_exception_check(*xml_config, "query_masking_rules");
ADD_FAILURE() << "XML should throw an error on bad XML" << std::endl;
@ -180,7 +159,7 @@ TEST(Common, SensitiveDataMasker)
{
std::istringstream // STYLE_CHECK_ALLOW_STD_STRING_STREAM
xml_isteam(R"END(<?xml version="1.0"?>
xml_isteam(R"END(
<clickhouse>
<query_masking_rules>
<rule>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<synonyms_extensions>
<extension>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<!-- Config for test server -->
<clickhouse>
<query_masking_rules>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<profiles>
<!-- Profile that allows only read queries. -->

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<!-- User and profile to be used in sesson_log tests, to make sure that list of user's profiles is logged correctly -->
<clickhouse>
<profiles>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<dictionaries_config>/etc/clickhouse-server/dictionaries/*.xml</dictionaries_config>
</clickhouse>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<users>
<default>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<profiles>
<default>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<max_concurrent_queries>10000</max_concurrent_queries>
</clickhouse>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<storage_configuration>
<disks>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<storage_configuration>
<disks>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<backups>
<on_cluster_first_sync_timeout>1000</on_cluster_first_sync_timeout>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<remote_servers>
<cluster0>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<remote_servers>
<source_trivial_cluster>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<profiles>
<default>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<remote_servers>
<events>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<distributed_ddl>
<path>/clickhouse/task_queue/ddl</path>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<logger>
<level>information</level>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<profiles>
<default>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<remote_servers>
<source>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<distributed_ddl>
<path>/clickhouse/task_queue/ddl</path>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<logger>
<level>information</level>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<profiles>
<default>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<!-- How many simualteneous workers are posssible -->
<max_workers>3</max_workers>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<remote_servers>
<source>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<!-- How many simualteneous workers are posssible -->
<max_workers>4</max_workers>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<tcp_port_secure>9440</tcp_port_secure>
<remote_servers>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<remote_servers>
<source>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<remote_servers>
<events>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<!-- How many simualteneous workers are posssible -->
<max_workers>1</max_workers>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<!-- How many simualteneous workers are posssible -->
<max_workers>3</max_workers>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<!-- How many simualteneous workers are posssible -->
<max_workers>3</max_workers>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<remote_servers>
<source>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<remote_servers>
<source>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<remote_servers>
<source>

View File

@ -24,7 +24,6 @@ def make_storage_with_key(id):
"bash",
"-c",
"""cat > /etc/clickhouse-server/config.d/storage_keys_config.xml << EOF
<?xml version="1.0"?>
<clickhouse>
<encryption_codecs>
<aes_128_gcm_siv>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<query_log>
<database>system</database>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<concurrent_threads_soft_limit_num>1</concurrent_threads_soft_limit_num>
<query_log>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<concurrent_threads_soft_limit_num>50</concurrent_threads_soft_limit_num>
<query_log>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<concurrent_threads_soft_limit_num>10</concurrent_threads_soft_limit_num>
<query_log>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<profiles>
<default>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<!--
NOTE: User and query level settings are set up in "users.xml" file.
-->

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<!-- Profiles of settings. -->
<profiles>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<!-- Config for test server -->
<clickhouse>
<query_masking_rules>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<!--
NOTE: User and query level settings are set up in "users.xml" file.
If you have accidentally specified user-level settings here, server won't start.

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<!-- Config that is used when server is run without config file. -->
<clickhouse>
<logger>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<profiles>
<default>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<!-- Profiles of settings. -->
<profiles>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<logger>
<level>trace</level>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<!-- Config that is used when server is run without config file. -->
<clickhouse>
<logger>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<profiles>
<default>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<!-- Config for test server -->
<clickhouse>
<query_masking_rules>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<logger>
<level>trace</level>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<!-- Config that is used when server is run without config file. -->
<clickhouse>
<logger>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<profiles>
<default>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<!-- Config that is used when server is run without config file. -->
<clickhouse>
<logger>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<!-- Config for test server -->
<clickhouse>
<query_masking_rules>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<!-- Config that is used when server is run without config file. -->
<clickhouse>
<logger>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<profiles>
<default>

View File

@ -61,7 +61,6 @@ def test_login_as_dropped_user_xml():
"-c",
"""
cat > /etc/clickhouse-server/users.d/user_c.xml << EOF
<?xml version="1.0"?>
<clickhouse>
<users>
<C>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<logger>
<level>trace</level>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<openSSL>
<client>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<profiles>
<default>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<logger>
<level>trace</level>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<profiles>
<default>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<users>
<admin>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<users>
<default>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<logger>
<level>trace</level>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<profiles>
<default>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<logger>
<level>trace</level>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<dictionary>
<name>dict0</name>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<dictionary>
<name>dict2</name>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<profiles>
<default>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<logger>
<level>trace</level>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<profiles>
<default>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<dictionaries_config>/etc/clickhouse-server/config.d/postgres_dict.xml</dictionaries_config>
</clickhouse>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<dictionary>
<name>dict0</name>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<logger>
<level>trace</level>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<profiles>
<default>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<logger>
<level>trace</level>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<dictionary>
<name>executable</name>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<dictionary>
<name>file</name>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<dictionary>
<name>slow</name>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<profiles>
<default>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<logger>
<level>trace</level>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<profiles>
<default>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<logger>
<level>trace</level>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<clickhouse>
<profiles>
<default>

Some files were not shown because too many files have changed in this diff Show More