Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dCache
cta
Commits
84a65823
Commit
84a65823
authored
5 years ago
by
Victor Kotlyar
Browse files
Options
Downloads
Patches
Plain Diff
Add catalogue schema verification for global and temporary tables.
parent
9266e9b6
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#32488
failed
2 years ago
Stage: build:srpm
Stage: build:rpm
Stage: sign
Stage: publish
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
catalogue/CatalogueSchema.cpp
+2
-2
2 additions, 2 deletions
catalogue/CatalogueSchema.cpp
continuousintegration/orchestration/tests/prepare_tests.sh
+1
-2
1 addition, 2 deletions
continuousintegration/orchestration/tests/prepare_tests.sh
with
3 additions
and
4 deletions
catalogue/CatalogueSchema.cpp
+
2
−
2
View file @
84a65823
...
...
@@ -62,7 +62,7 @@ std::map<std::string, std::string> CatalogueSchema::getSchemaColumns(const std::
searchPos
=
findResult
+
1
;
if
(
0
<
sqlStmt
.
size
())
{
// Ignore empty statements
const
std
::
string
createTableSQL
=
"CREATE
TABLE "
+
tableName
+
"[ ]*
\\
(([a-zA-Z0-9_, '
\\
)
\\
(]+)
\\
)"
;
const
std
::
string
createTableSQL
=
"CREATE
[a-zA-Z ]+
TABLE "
+
tableName
+
"[ ]*
\\
(([a-zA-Z0-9_, '
\\
)
\\
(]+)
\\
)"
;
cta
::
utils
::
Regex
tableSqlRegex
(
createTableSQL
.
c_str
());
auto
tableSql
=
tableSqlRegex
.
exec
(
sqlStmt
);
if
(
2
==
tableSql
.
size
())
{
...
...
@@ -107,7 +107,7 @@ std::list<std::string> CatalogueSchema::getSchemaTableNames() const {
searchPos
=
findResult
+
1
;
if
(
0
<
sqlStmt
.
size
())
{
// Ignore empty statements
cta
::
utils
::
Regex
tableNamesRegex
(
"CREATE
TABLE ([a-zA-Z_0-9]+)"
);
cta
::
utils
::
Regex
tableNamesRegex
(
"CREATE
[a-zA-Z ]+
TABLE ([a-zA-Z_0-9]+)"
);
auto
tableName
=
tableNamesRegex
.
exec
(
sqlStmt
);
if
(
2
==
tableName
.
size
())
{
schemaTables
.
push_back
(
tableName
[
1
].
c_str
());
...
...
This diff is collapsed.
Click to expand it.
continuousintegration/orchestration/tests/prepare_tests.sh
+
1
−
2
View file @
84a65823
...
...
@@ -69,8 +69,7 @@ echo "Preparing CTA configuration for tests"
kubectl
--namespace
${
NAMESPACE
}
exec
ctafrontend
--
cta-catalogue-schema-verify /etc/cta/cta-catalogue.conf
if
[
$?
-ne
0
]
;
then
echo
"ERROR: failed to verify the catalogue DB schema"
# Making this non-fatal until cta-catalogue-schema-verify is fixed (see issue #540)
#exit 1
exit
1
fi
kubectl
--namespace
${
NAMESPACE
}
exec
ctafrontend
--
cta-catalogue-admin-user-create /etc/cta/cta-catalogue.conf
--username
ctaadmin1
-m
"docker cli"
for
((
i
=
0
;
i<
${#
TAPEDRIVES_IN_USE
[@]
}
;
i++
))
;
do
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment