Просмотр исходного кода

Merge branch 'master' into ui/add-project-picker-empty-state

Billy Vong 7 лет назад
Родитель
Сommit
2d3385cf00
10 измененных файлов с 63 добавлено и 41 удалено
  1. 1 0
      .eslintignore
  2. 1 0
      .eslintrc
  3. 3 1
      .vscode/extensions.json
  4. 10 2
      .vscode/settings.json
  5. 12 2
      CHANGES
  6. 1 1
      Dangerfile
  7. 29 16
      Makefile
  8. 1 2
      README.rst
  9. 2 2
      bin/lint
  10. 3 15
      config/hooks/pre-commit

+ 1 - 0
.eslintignore

@@ -1,3 +1,4 @@
 **/dist/**/*
 **/vendor/**/*
 **/tests/sentry/lang/javascript/fixtures/**/*
+/examples/

+ 1 - 0
.eslintrc

@@ -14,6 +14,7 @@
     "require": false,
     "expect": false,
     "sinon": false,
+    "MockApiClient": true,
     "TestStubs": true,
     "Raven": true,
     "jest": true

+ 3 - 1
.vscode/extensions.json

@@ -5,6 +5,8 @@
         "dzannotti.vscode-babel-coloring",
         "esbenp.prettier-vscode",
         "donjayamanne.python",
-        "dbaeumer.vscode-eslint"
+        "dbaeumer.vscode-eslint",
+        "lextudio.restructuredtext",
+        "jmlntw.vscode-ensure-single-final-newline"
     ]
 }

+ 10 - 2
.vscode/settings.json

@@ -13,6 +13,7 @@
         "src/sentry/static/sentry/dist/": true
     },
     "files.trimTrailingWhitespace": true,
+    "files.ensureSingleFinalNewline": true,
 
     "prettier.bracketSpacing": false,
     "prettier.singleQuote": true,
@@ -27,11 +28,18 @@
         "editor.formatOnSave": true
     },
 
+    "[python]": {
+        "editor.formatOnSave": true
+    },
+
     "python.linting.pylintEnabled": false,
     "python.linting.flake8Enabled": true,
 
+    "python.formatting.provider": "autopep8",
     "python.pythonPath": "${env.WORKON_HOME}/sentry/bin/python",
-    "python.unitTest.pyTestEnabled": true,
+    // test discovery is sluggish and the UI around running
+    // tests is often in your way and misclicked
+    "python.unitTest.pyTestEnabled": false,
     "python.unitTest.unittestEnabled": false,
     "python.unitTest.nosetestsEnabled": false
-}
+}

+ 12 - 2
CHANGES

@@ -1,5 +1,9 @@
-Version 8.18 (Unreleased)
+Version 8.19 (Unreleased)
 -------------------------
+- Hide project filter when there are no projects to list.
+
+Version 8.18
+------------
 
 - Expanded resolution options to allow current and explicit versions.
 - Added proguard support
@@ -13,7 +17,9 @@ Version 8.18 (Unreleased)
 - Moved "create organization" into React.
 - Expanded React Form components (Form, ApiForm).
 - Moved "create team" into React.
-- Hide project filter when there are no projects to list.
+- add Slack to supported auth backends in social auth (for plugins)
+- Expanded resolution actions (on stream) to include current release and explicit
+  release.
 
 Schema Changes
 ~~~~~~~~~~~~~~
@@ -37,6 +43,10 @@ Schema Changes
 - Added GroupResolution.actor_id
 - Added Project.platform
 - Added GroupSnooze.actor_id
+- Added ScheduledJob
+- Added GroupResolution.actor_id
+- Added ``ScheduledJob`` model
+- Added User.last_active
 
 API Changes
 ~~~~~~~~~~~

+ 1 - 1
Dangerfile

@@ -103,7 +103,7 @@ warn("This change includes modification to a file that was backported from newer
 
 # Reasonable commits must update CHANGES
 if !github.pr_body.include?("#nochanges") && @S_CHANGE_LINES && git.lines_of_code > @S_CHANGE_LINES && !git.modified_files.include?("CHANGES") && checkFilesPattern(@S_CHANGES_REQUIRED_PATTERNS).any?
-    fail("You need to update CHANGES due to the size of this PR")
+    warn("You should update CHANGES due to the size of this PR")
 end
 
 if git.added_files.grep(@S_MIGRATIONS).any?

+ 29 - 16
Makefile

@@ -1,13 +1,12 @@
+CPUS ?= $(shell sysctl -n hw.ncpu || echo 1)
+MAKEFLAGS += --jobs=$(CPUS)
 NPM_ROOT = ./node_modules
 STATIC_DIR = src/sentry/static/sentry
 
-install-python:
-	@echo "--> Installing Python dependencies"
-	pip install "setuptools>=0.9.8"
-	# order matters here, base package must install first
-	pip install -e .
-	pip install ujson
-	pip install "file://`pwd`#egg=sentry[dev]"
+develop: setup-git update-submodules install-python install-yarn
+	@echo ""
+
+develop-only: develop
 
 install-yarn:
 	@echo "--> Installing Node dependencies"
@@ -18,13 +17,21 @@ install-yarn:
 	# See: https://github.com/karma-runner/karma-phantomjs-launcher/issues/120#issuecomment-262634703
 	node ./node_modules/phantomjs-prebuilt/install.js
 
-install-python-tests:
-	pip install "file://`pwd`#egg=sentry[dev,tests,dsym]"
+install-python:
+	# must be executed serialially
+	$(MAKE) install-python-base
+	$(MAKE) install-python-tests
 
-develop-only: update-submodules install-python install-python-tests install-yarn
+install-python-base:
+	@echo "--> Installing Python dependencies"
+	pip install "setuptools>=0.9.8" "pip>=8.0.0"
+	# order matters here, base package must install first
+	pip install -e .
+	pip install ujson
+	pip install "file://`pwd`#egg=sentry[dev]"
 
-develop: develop-only setup-git
-	@echo ""
+install-python-tests:
+	pip install "file://`pwd`#egg=sentry[dev,tests,dsym]"
 
 dev-postgres: install-python
 
@@ -136,7 +143,7 @@ lint-js:
 	@echo ""
 
 coverage: develop
-	make test-python-coverage
+	$(MAKE) test-python-coverage
 	coverage html
 
 publish:
@@ -160,7 +167,9 @@ travis-upgrade-pip:
 travis-setup-cassandra:
 	echo "create keyspace sentry with replication = {'class' : 'SimpleStrategy', 'replication_factor': 1};" | cqlsh --cqlversion=3.1.7
 	echo 'create table nodestore (key text primary key, value blob, flags int);' | cqlsh -k sentry --cqlversion=3.1.7
-travis-install-python: travis-upgrade-pip install-python install-python-tests
+travis-install-python:
+	$(MAKE) travis-upgrade-pip
+	$(MAKE) install-python install-python
 	python -m pip install codecov
 travis-noop:
 	@echo "nothing to do here."
@@ -176,9 +185,13 @@ travis-install-mysql: travis-install-python
 	pip install mysqlclient
 	echo 'create database sentry;' | mysql -uroot
 travis-install-acceptance: install-yarn travis-install-postgres
-travis-install-js: travis-upgrade-pip install-python install-python-tests install-yarn
+travis-install-js:
+	$(MAKE) travis-upgrade-pip
+	$(MAKE) install-python install-yarn
 travis-install-cli: travis-install-postgres
-travis-install-dist: travis-upgrade-pip install-python install-python-tests install-yarn
+travis-install-dist:
+	$(MAKE) travis-upgrade-pip
+	$(MAKE) install-python install-yarn
 travis-install-django-18: travis-install-postgres
 	pip install "Django>=1.8,<1.9"
 

+ 1 - 2
README.rst

@@ -24,8 +24,7 @@ Official Sentry SDKs
 * `PHP <https://github.com/getsentry/sentry-php>`_
 * `Go <https://github.com/getsentry/raven-go>`_
 * `Java <https://github.com/getsentry/sentry-java>`_
-* `Swift <https://github.com/getsentry/sentry-swift>`_
-* `Objective C <https://github.com/getsentry/sentry-objc>`_
+* `Objective-C/Swift <https://github.com/getsentry/sentry-cocoa>`_
 * `C# <https://github.com/getsentry/raven-csharp>`_
 * `Perl <https://github.com/getsentry/perl-raven>`_
 * `Elixir <https://github.com/getsentry/sentry-elixir>`_

+ 2 - 2
bin/lint

@@ -7,7 +7,7 @@ import sys
 # This is to avoid needing to have the `sentry` package explicitly installed.
 sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir, 'src'))
 
-from sentry.lint.engine import check_files
+from sentry.lint.engine import run
 
 offset = 1
 js = True
@@ -26,4 +26,4 @@ file_list = sys.argv[offset:]
 if not file_list:
     file_list = None
 
-sys.exit(check_files(file_list, js=js, py=py))
+sys.exit(run(file_list, js=js, py=py, format=False))

+ 3 - 15
config/hooks/pre-commit

@@ -6,8 +6,6 @@ import sys
 
 from glob import glob
 
-from sentry.lint.engine import check_files, js_format, yarn_check
-
 text_type = type(u'')
 
 # git usurbs your bin path for hooks and will always run system python
@@ -18,25 +16,15 @@ if 'VIRTUAL_ENV' in os.environ:
 
 
 def main():
-    from flake8.hooks import run
-
-    gitcmd = "git diff-index --cached --name-only HEAD"
-
-    _, files_modified, _ = run(gitcmd)
+    from sentry.lint.engine import get_modified_files, run
 
     files_modified = [
         text_type(f)
-        for f in files_modified
+        for f in get_modified_files(os.getcwd())
         if os.path.exists(f)
     ]
 
-    # Prettier formatting must take place before linting
-    js_format(files_modified)
-
-    if yarn_check(files_modified):
-        return True
-
-    return check_files(files_modified)
+    return run(files_modified)
 
 
 if __name__ == '__main__':

Некоторые файлы не были показаны из-за большого количества измененных файлов