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
90591f3b
Unverified
Commit
90591f3b
authored
10 months ago
by
Noah Moss
Committed by
GitHub
10 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix Cloverage failures on master (#41799)
parent
4cbae2ee
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
enterprise/backend/src/metabase_enterprise/audit_db.clj
+14
-18
14 additions, 18 deletions
enterprise/backend/src/metabase_enterprise/audit_db.clj
with
14 additions
and
18 deletions
enterprise/backend/src/metabase_enterprise/audit_db.clj
+
14
−
18
View file @
90591f3b
...
...
@@ -19,10 +19,17 @@
(
java.util.jar
JarEntry
JarFile
)
(
java.nio.file
Path
)))
(
def
^
:private
audit-installed?
(
atom
false
))
(
set!
*warn-on-reflection*
true
)
(
defsetting
last-analytics-checksum
"A place to save the analytics-checksum, to check between app startups. If set to -1, skips the checksum process
entirely to avoid calculating checksums in environments (e2e tests) where we don't care."
:type
:integer
:visibility
:internal
:audit
:never
:doc
false
:export?
false
)
(
defn-
running-from-jar?
"Returns true iff we are running from a jar.
...
...
@@ -84,18 +91,18 @@
"Default Dashboard Overview (this is a dashboard) entity id."
"bJEYb0o5CXlfWFcIztDwJ"
)
(
def
^
{
:arglists
'
([
audit-installed?
model
entity-id
])
(
def
^
{
:arglists
'
([
checksum
model
entity-id
])
:private
true
}
memoized-select-audit-entity*
(
mdb/memoize-for-application-db
(
fn
[
audit-installed?
model
entity-id
]
(
when
audit-installed?
(
fn
[
checksum
model
entity-id
]
(
when
checksum
(
t2/select-one
model
:entity_id
entity-id
)))))
(
defn
memoized-select-audit-entity
"Returns the object from entity id and model. Memoizes from entity id.
Should only be used for audit/pre-loaded objects."
[
model
entity-id
]
(
memoized-select-audit-entity*
@
audit-installed?
model
entity-id
))
(
memoized-select-audit-entity*
(
last-analytics-checksum
)
model
entity-id
))
(
defenterprise
default-custom-reports-collection
"Default custom reports collection."
...
...
@@ -209,16 +216,6 @@
analytics data."
-1
)
(
defsetting
last-analytics-checksum
"A place to save the analytics-checksum, to check between app startups. If set to -1, skips the checksum process
entirely to avoid calculating checksums in environments (e2e tests) where we don't care."
:type
:integer
:default
0
:visibility
:internal
:audit
:never
:doc
false
:export?
false
)
(
defn-
should-skip-checksum?
[
last-checksum
]
(
=
SKIP_CHECKSUM_FLAG
last-checksum
))
...
...
@@ -295,5 +292,4 @@
;; prevent sync while loading
((
sync-util/with-duplicate-ops-prevented
:sync-database
audit-db
(
fn
[]
(
maybe-load-analytics-content!
audit-db
)
(
reset!
audit-installed?
true
)))))))
(
maybe-load-analytics-content!
audit-db
)))))))
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