Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
94021855
Commit
94021855
authored
7 years ago
by
Simon Belak
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of github.com:metabase/metabase into xray-insights-batch1
parents
6a991905
50593330
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
bin/ci
+49
-6
49 additions, 6 deletions
bin/ci
frontend/src/metabase/visualizations/lib/settings.js
+1
-1
1 addition, 1 deletion
frontend/src/metabase/visualizations/lib/settings.js
jest.unit.conf.json
+6
-2
6 additions, 2 deletions
jest.unit.conf.json
with
57 additions
and
9 deletions
.gitignore
+
1
−
0
View file @
94021855
...
...
@@ -49,3 +49,4 @@ bin/release/aws-eb/metabase-aws-eb.zip
*.po~
/locales/metabase-*.pot
/stats.json
coverage-summary.json
This diff is collapsed.
Click to expand it.
bin/ci
+
49
−
6
View file @
94021855
...
...
@@ -11,6 +11,8 @@ node-0() {
MB_MYSQL_TEST_USER
=
ubuntu run_step lein-test
}
node-1
()
{
run_step lein docstring-checker
is_enabled
"drivers"
&&
export
ENGINES
=
"h2,sqlserver,oracle"
||
export
ENGINES
=
"h2"
if
is_engine_enabled
"oracle"
;
then
run_step install-oracle
...
...
@@ -19,6 +21,8 @@ node-1() {
run_step lein-test
}
node-2
()
{
run_step lein bikeshed
is_enabled
"drivers"
&&
export
ENGINES
=
"h2,postgres,sqlite,presto"
||
export
ENGINES
=
"h2"
if
is_engine_enabled
"crate"
;
then
run_step install-crate
...
...
@@ -31,6 +35,9 @@ node-2() {
run_step lein-test
}
node-3
()
{
run_step yarn run lint
run_step yarn run flow
is_enabled
"drivers"
&&
export
ENGINES
=
"h2,redshift,druid,vertica"
||
export
ENGINES
=
"h2"
if
is_engine_enabled
"vertica"
;
then
run_step install-vertica
...
...
@@ -41,22 +48,47 @@ node-3() {
fi
}
node-4
()
{
run_step lein bikeshed
run_step lein docstring-checker
run_step ./bin/reflection-linter
run_step ./bin/build version frontend sample-dataset uberjar
report-frontend-size
report-uberjar-size
}
node-5
()
{
run_step lein eastwood
run_step yarn run lint
run_step yarn run flow
run_step yarn run test-unit
run_step yarn run test-karma
run_step yarn run test-unit
report-frontend-coverage
}
node-6
()
{
run_step ./bin/build version sample-dataset uberjar
run_step yarn run test-integrated
}
report
()
{
timestamp
=
"
$(
date
-u
+
"%Y-%m-%dT%H:%M:%SZ"
)
"
name
=
"
$1
"
value
=
"
$2
"
if
!
[
-z
${
STATS_DB
+x
}
]
;
then
psql
"
$STATS_DB
"
-c
"INSERT INTO build_stats (timestamp, name, value, build_number, node_index, branch, hash) VALUES ('
$timestamp
', '
$name
',
$value
,
$CIRCLE_BUILD_NUM
,
$CIRCLE_NODE_INDEX
, '
$CIRCLE_BRANCH
', '
$CIRCLE_SHA1
');"
>
/dev/null
fi
}
report-frontend-coverage
()
{
report
"frontend-coverage-lines"
$(
node
-e
"console.log(require('./coverage-summary.json').total.lines.pct)"
)
report
"frontend-coverage-functions"
$(
node
-e
"console.log(require('./coverage-summary.json').total.functions.pct)"
)
report
"frontend-coverage-branches"
$(
node
-e
"console.log(require('./coverage-summary.json').total.branches.pct)"
)
report
"frontend-coverage-statements"
$(
node
-e
"console.log(require('./coverage-summary.json').total.statements.pct)"
)
report
"frontend-loc"
$(
node
-e
"console.log(require('./coverage-summary.json').total.lines.total)"
)
}
report-frontend-size
()
{
report
"frontend-size"
"
$(
wc
-c
< resources/frontend_client/app/dist/app-main.bundle.js
)
"
}
report-uberjar-size
()
{
report
"uberjar-size"
"
$(
wc
-c
< target/uberjar/metabase.jar
)
"
}
install-crate
()
{
sudo
add-apt-repository ppa:crate/stable
-y
...
...
@@ -123,6 +155,8 @@ run_step() {
wait
$!
||
status
=
$?
elapsed
=
$(
expr
$(
date
+%s
)
-
$start
||
true
)
summary
=
"
${
summary
}
status=
$status
time=
$elapsed
command=
$@
\n
"
report
"run-status
\"
$*
\"
"
"
$status
"
report
"run-time
\"
$*
\"
"
"
$elapsed
"
return
$status
}
...
...
@@ -139,6 +173,10 @@ summary() {
trap
summary EXIT
fail_fast
()
{
if
[
-z
${
CIRCLE_NODE_TOTAL
+x
}
]
;
then
return
0
fi
echo
-e
"========================================"
echo
-e
"Failing fast! Stopping other nodes..."
# Touch a file to differentiate between a local failure and a
...
...
@@ -161,6 +199,10 @@ exit_early() {
trap
exit_early SIGUSR1
if
[
-z
${
CIRCLE_BUILD_NUM
+x
}
]
;
then
export
CIRCLE_BUILD_NUM
=
"-1"
fi
if
[
-z
${
CIRCLE_SHA1
+x
}
]
;
then
export
CIRCLE_SHA1
=
"
$(
git rev-parse HEAD
)
"
fi
...
...
@@ -184,7 +226,8 @@ if [ -z ${CIRCLE_NODE_INDEX+x} ]; then
# If CIRCLE_NODE_INDEX isn't set, read node numbers from the args
# Useful for testing locally.
for
i
in
"
$@
"
;
do
node-
$i
export
CIRCLE_NODE_INDEX
=
"
$i
"
node-
$i
done
else
# Normal mode on CircleCI
...
...
This diff is collapsed.
Click to expand it.
frontend/src/metabase/visualizations/lib/settings.js
+
1
−
1
View file @
94021855
...
...
@@ -165,7 +165,7 @@ function getSetting(settingDefs, id, vizSettings, series) {
return
;
}
const
settingDef
=
settingDefs
[
id
];
const
settingDef
=
settingDefs
[
id
]
||
{}
;
const
[{
card
}]
=
series
;
const
visualization_settings
=
card
.
visualization_settings
||
{};
...
...
This diff is collapsed.
Click to expand it.
jest.unit.conf.json
+
6
−
2
View file @
94021855
...
...
@@ -20,5 +20,9 @@
"ace"
:
{},
"ga"
:
{},
"document"
:
{}
}
}
\ No newline at end of file
},
"collectCoverage"
:
true
,
"coverageDirectory"
:
"./"
,
"coverageReporters"
:
[
"text"
,
"json-summary"
],
"collectCoverageFrom"
:
[
"frontend/src/**/*.js"
,
"frontend/src/**/*.jsx"
]
}
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