Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/metabase/server.clj
  • Loading branch information
emurphy committed Jan 7, 2021
2 parents dea0141 + b6367e5 commit 867b2fc
Show file tree
Hide file tree
Showing 1,911 changed files with 303,195 additions and 63,247 deletions.
1,167 changes: 782 additions & 385 deletions .circleci/config.yml

Large diffs are not rendered by default.

18 changes: 0 additions & 18 deletions .circleci/skip-driver-tests.sh

This file was deleted.

7 changes: 6 additions & 1 deletion .dir-locals.el
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
((nil . ((indent-tabs-mode . nil) ; always use spaces for tabs
(require-final-newline . t))) ; add final newline on save
(js2-mode . ((js2-mode-show-parse-errors . nil) ; these settings will let flycheck do everything through eslint,
(js2-mode-show-strict-warnings . nil))) ; because js2-mode can't handle flowtype
(clojure-mode . ((eval . (progn
;; Specify which arg is the docstring for certain macros
;; (Add more as needed)
Expand All @@ -18,11 +20,14 @@
(let-404 1)
(match 1)
(merge-with 1)
(l/matche '(1 (:defn)))
(l/matcha '(1 (:defn)))
(p.types/defprotocol+ '(1 (:defn)))
(p.types/def-abstract-type '(1 (:defn)))
(p.types/deftype+ '(2 nil nil (:defn)))
(p/def-map-type '(2 nil nil (:defn)))
(p.types/defrecord+ '(2 nil nil (:defn))))))
(p.types/defrecord+ '(2 nil nil (:defn)))
(tools.macro/macrolet '(1 (:defn))))))
;; if you're using clj-refactor (highly recommended!), prefer prefix notation when cleaning the ns form
(cljr-favor-prefix-notation . t)
;; prefer keeping source width about ~118, GitHub seems to cut off stuff at either 119 or 120 and
Expand Down
12 changes: 9 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@
"react/no-find-dom-node": 0,
"flowtype/define-flow-type": 1,
"flowtype/use-flow-type": 1,
"no-color-literals": 1,
"prefer-const": [1, { "destructuring": "all" }]
"prefer-const": [1, { "destructuring": "all" }],
"no-useless-escape": 0
},
"globals": {
"pending": false,
"before": true,
"cy": true,
"Cypress": true
"Cypress": true,
},
"env": {
"browser": true,
Expand All @@ -43,5 +44,10 @@
"settings": {
"import/resolver": "webpack",
"import/ignore": ["\\.css$"]
},
"parserOptions": {
"ecmaFeatures": {
"legacyDecorators": true
}
}
}
9 changes: 8 additions & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@
.*/node_modules/update-notifier/.*
.*/node_modules/boxen/.*
.*/node_modules/libnpx/.*
.*/node_modules/@babel/standalone/.*
.*/node_modules/@babel/.*
.*/node_modules/@testing-library/jest-dom/.*
.*/node_modules/.*/node_modules/chalk/.*
.*/node_modules/react-draggable/lib/.*
.*/node_modules/redux-form/es/.*
.*/node_modules/annotate-react-dom/src/annotate-react-dom.js
.*/node_modules/csstype/.*
.*/node_modules/gensync/.*

[include]
.*/frontend/.*
.*/enterprise/frontend/.*

[libs]
./frontend/interfaces
Expand All @@ -31,9 +36,11 @@ esproposal.decorators=ignore
esproposal.class_static_fields=enable
esproposal.class_instance_fields=enable
suppress_comment= \\(.\\|\n\\)*\\$FlowFixMe
module.name_mapper='^metabase-enterprise\/\(.*\)$' -> '<PROJECT_ROOT>/enterprise/frontend/src/metabase-enterprise/\1'
module.name_mapper='.*\(\.css\)' -> 'CSSModule'
module.name_mapper='^ace/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/ace-builds/src-min-noconflict/\1'
module.name_mapper='^assets\/\(.*\)$' -> '<PROJECT_ROOT>/resources/frontend_client/app/assets/\1'
module.name_mapper='^metabase-types\/\(.*\)$' -> '<PROJECT_ROOT>/frontend/src/metabase-types/\1'
module.system=haste
strip_root=true
module.file_ext=.js
Expand Down
15 changes: 0 additions & 15 deletions .github/CODEOWNERS

This file was deleted.

37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-implementation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Feature Implementation
about: This issue is used to track a feature implementation for a solution to a user
problem that may span days to weeks to implement. This is used by the core Metabase
team to project plan and mange work.
title: Feature X Implementation
labels: ".Feature"
assignees: ''

---

This demonstrates a workflow and implementation plan around feature X that we can use in features that go out in a release. There should be a paragraph description of the problem we're trying to solve and a high level what the solution will be.

**Links**
- product doc: _link to product doc_
- eng doc: _link to technical design doc_
- feature branch: `branch-name` _this should be the feature branch where this work will be done in. PRs will be delivered against this branch_
- Issue links: _list of issues this should close when this is delivered_

**Implementation Plan**

**ETA**: MM/DD/YYYY (ETA of merged feature when we start work)

_(each individual item in list should correspond to a PR and be less than one week of work maximum!)_

- [x] step 1: #somePRnumber
- [ ] step 2
- [ ] step 3

**Needs to happen before merge**

_(we can put stuff like translations, docs, testing, etc)_

- [ ] Design polish
- [ ] String translations
- [ ] Test on case X, Y, Z
- [ ] Write rough pass documents for handoff to customer success
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Feature request
about: Suggest an idea for this project
title: ''
labels: "Type:New Feature, .Needs Triage"
labels: ".Needs Triage, Type:New Feature"
assignees: ''

---
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/questions-and-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Questions and help
about: If you think you need help with something related to Metabase
title: ''
labels: "Type:Question, .Needs Triage"
labels: ".Needs Triage, Type:Question"
assignees: ''

---
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/security-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Security Issue
about: If you think you found a security vulnerability with Metabase
title: ''
labels: "Security, .Needs Triage"
labels: ".Needs Triage, Security"
assignees: ''

---
Expand Down
13 changes: 7 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@


###### Before submitting the PR, please make sure you do the following

- [ ] If you're attempting to fix a translation issue, please submit your changes to our [POEditor project](https://poeditor.com/join/project/ynjQmwSsGh) instead of opening a PR.

### Tests
- [ ] Run the frontend and integration tests with `yarn lint && yarn flow && yarn test`)
- [ ] If there are changes to the backend codebase, run the backend tests with `lein test && lein lint && ./bin/reflection-linter`

- [ ] Sign the [Contributor License Agreement](https://docs.google.com/a/metabase.com/forms/d/1oV38o7b9ONFSwuzwmERRMi9SYrhYeOrkbmNaq9pOJ_E/viewform)
(unless it's a tiny documentation change).
- [ ] Run the frontend and Cypress end-to-end tests with `yarn lint && yarn test`)
- [ ] If there are changes to the backend codebase, run the backend tests with `lein test && lein lint && ./bin/reflection-linter`

- [ ] Sign the [Contributor License Agreement](https://docs.google.com/a/metabase.com/forms/d/1oV38o7b9ONFSwuzwmERRMi9SYrhYeOrkbmNaq9pOJ_E/viewform)
(unless it's a tiny documentation change).
31 changes: 31 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/cypress_repro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
### Status

PENDING CI / PENDING REVIEW / READY _(choose one and update accordingly)_

### What does this PR accomplish?

- Reproduces #XXXXX

### How to test this manually?

- `yarn test-cypress-open`
- `relative/path/to/the/file` _(optionally, include the line number on which the test starts)_
> _(For still unfixed bug)_
- Replace `it.skip()` with `it.only()` to test this in isolation
- The test should fail until the related issue is fixed
> _(For a fixed bug)_
- The test should pass

### Additional notes:

> _(For still unfixed bug)_
- Once the issue is fixed, please remove the `.skip` part (unskip the test completely)
- Make sure the test is passing and
- Merge it together with the fix
> _(For a fixed bug)_
- Please merge this repro unskipped
- The bug was fixed in #YYYYY

### Questions:

- this is optional
22 changes: 22 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "CodeQL"

on:
pull_request:
paths-ignore:
- 'docs/**'
push:
paths-ignore:
- 'docs/**'

jobs:
analyze:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: javascript
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
138 changes: 138 additions & 0 deletions .github/workflows/uberjar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
name: Uberjar

on:
push:
branches:
- master
- 'release-**'
tags:
- '**'
paths-ignore:
- 'docs/**'
- 'frontend/test/**'
- 'enterprise/frontend/test/**'

jobs:

build:
runs-on: ubuntu-20.04
timeout-minutes: 60
strategy:
matrix:
edition: [ee, oss]
env:
MB_EDITION: ${{ matrix.edition }}
INTERACTIVE: false
steps:
- uses: actions/checkout@v2
- name: Prepare Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Prepare JDK 8
uses: actions/setup-java@v1
with:
java-version: 8
- name: Install gettext
run: sudo apt install gettext
- name: Install Clojure CLI
run: |
curl -O https://download.clojure.org/install/linux-install-1.10.1.708.sh &&
sudo bash ./linux-install-1.10.1.708.sh
- name: Check versions
run: |
echo "Node.js `node --version`"
echo "yarn `yarn --version`"
java -version
echo "Clojure `clojure -e "(println (clojure-version))"`"
lein --version
msgfmt --version
- name: Get yarn cache
uses: actions/cache@v2
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Get M2 cache
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/project.clj') }}-${{ hashFiles('**/deps.edn') }}

- run: yarn install --lockfile
- run: lein with-profile +include-all-drivers,+cloverage,+junit,+${{ matrix.edition }} deps
- run: ./bin/build

- name: Mark with the commit hash
run: git rev-parse --short HEAD > COMMIT-ID
- name: Calculate SHA256 checksum
run: sha256sum ./target/uberjar/metabase.jar > SHA256.sum
- name: Upload JARs as artifact
uses: actions/upload-artifact@v2
with:
name: metabase-${{ matrix.edition }}-uberjar
path: |
./target/uberjar/metabase.jar
./COMMIT-ID
./SHA256.sum
check:
runs-on: ubuntu-20.04
name: check ${{ matrix.edition }} (java ${{ matrix.java-version }})
needs: build
timeout-minutes: 10
strategy:
matrix:
edition: [ee, oss]
java-version: [8, 11, 13]
steps:
- name: Prepare JRE (Java Run-time Environment)
uses: actions/setup-java@v1
with:
java-package: jre
java-version: ${{ matrix.java-version }}
- run: java -version

- uses: actions/download-artifact@v2
name: Retrieve uberjar artifact
with:
name: metabase-${{ matrix.edition }}-uberjar

- name: Launch uberjar
run: |
java -jar ./target/uberjar/metabase.jar &
sleep 180
timeout-minutes: 5

- name: Check API health
run: curl -s localhost:3000/api/health

known-issue-java15:
runs-on: ubuntu-20.04
needs: build
timeout-minutes: 10
strategy:
matrix:
edition: [ee, oss]
steps:
- name: Prepare JRE 15
uses: actions/setup-java@v1
with:
java-package: jre
java-version: 15
- run: java -version

- uses: actions/download-artifact@v2
name: Retrieve uberjar artifact
with:
name: metabase-${{ matrix.edition }}-uberjar

- name: Launch uberjar
run: |
java -jar ./target/uberjar/metabase.jar &
sleep 180
timeout-minutes: 5

- name: Check API health
run: curl -s localhost:3000/api/health
continue-on-error: true
Loading

0 comments on commit 867b2fc

Please sign in to comment.