From 3e3de45c093d409836957a41b9ab58a73797add1 Mon Sep 17 00:00:00 2001 From: Ino Murko Date: Fri, 20 Nov 2020 10:21:27 +0100 Subject: [PATCH 1/3] ignore known errors - Sentry spike protection --- Makefile | 78 +++---------------- .../lib/omg_status/sentry_filter.ex | 30 +++++++ apps/omg_status/mix.exs | 2 +- apps/omg_watcher_rpc/lib/web/endpoint.ex | 3 +- mix.lock | 11 +-- 5 files changed, 48 insertions(+), 76 deletions(-) create mode 100644 apps/omg_status/lib/omg_status/sentry_filter.ex diff --git a/Makefile b/Makefile index f037727135..dc733927a2 100644 --- a/Makefile +++ b/Makefile @@ -44,8 +44,6 @@ help: @echo " - \`make docker-remote-watcher_info\`: remote console (IEx-style) into the \c" @echo "watcher_info application." @echo "" - @echo " - \`make docker-remote-childchain\`: remote console (IEx-style) into the childchain application." - @echo "" @echo "BARE METAL DEVELOPMENT" @echo "----------------------" @echo @@ -55,9 +53,6 @@ help: @echo "1. In the first one, start geth, postgres:" @echo " make start-services" @echo "" - @echo "2. In the second terminal window, run:" - @echo " make start-child_chain" - @echo "" @echo "3. In the third terminal window, run:" @echo " make start-watcher" @echo "" @@ -67,9 +62,6 @@ help: @echo "5. Wait until they all boot. And run in the fifth terminal window:" @echo " make get-alarms" @echo "" - @echo "If you want to attach yourself to running services, use:" - @echo " make remote-child_chain" - @echo "or" @echo " make remote-watcher" @echo "" @echo "or" @@ -85,11 +77,10 @@ help: list: @$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' -all: clean build-child_chain-prod build-watcher-prod build-watcher_info-prod +all: clean build-watcher-prod build-watcher_info-prod WATCHER_IMAGE_NAME ?= "omisego/watcher:latest" WATCHER_INFO_IMAGE_NAME ?= "omisego/watcher_info:latest" -CHILD_CHAIN_IMAGE_NAME ?= "omisego/child_chain:latest" IMAGE_BUILDER ?= "omisegoimages/elixir-omg-builder:stable-20200410" IMAGE_BUILD_DIR ?= $(PWD) @@ -166,13 +157,6 @@ check-dialyzer: # Building # - -build-child_chain-prod: deps-elixir-omg - $(ENV_PROD) mix do compile, release child_chain --overwrite - -build-child_chain-dev: deps-elixir-omg - $(ENV_DEV) mix do compile, release child_chain --overwrite - build-watcher-prod: deps-elixir-omg $(ENV_PROD) mix do compile, release watcher --overwrite @@ -261,19 +245,16 @@ init_test: init-contracts init_test_reorg: init-contracts-reorg test: - mix test --include test --exclude common --exclude watcher --exclude watcher_info --exclude child_chain + mix test --include test --exclude common --exclude watcher --exclude watcher_info test-watcher: - mix test --include watcher --exclude watcher_info --exclude child_chain --exclude common --exclude test + mix test --include watcher --exclude watcher_info --exclude common --exclude test test-watcher_info: - mix test --include watcher_info --exclude watcher --exclude child_chain --exclude common --exclude test + mix test --include watcher_info --exclude watcher --exclude common --exclude test test-common: - mix test --include common --exclude child_chain --exclude watcher --exclude watcher_info --exclude test - -test-child_chain: - mix test --include child_chain --exclude common --exclude watcher --exclude watcher_info --exclude test + mix test --include common --exclude watcher --exclude watcher_info --exclude test # # Documentation @@ -291,13 +272,6 @@ start-integration-watcher: # # Docker # -docker-child_chain-prod: - docker run --rm -it \ - -v $(PWD):/app \ - -u root \ - --entrypoint /bin/sh \ - $(IMAGE_BUILDER) \ - -c "cd /app && make build-child_chain-prod" docker-watcher-prod: docker run --rm -it \ @@ -315,13 +289,6 @@ docker-watcher_info-prod: $(IMAGE_BUILDER) \ -c "cd /app && make build-watcher_info-prod" -docker-child_chain-build: - docker build -f Dockerfile.child_chain \ - --build-arg release_version=$$(cat $(PWD)/VERSION)+$$(git rev-parse --short=7 HEAD) \ - --cache-from $(CHILD_CHAIN_IMAGE_NAME) \ - -t $(CHILD_CHAIN_IMAGE_NAME) \ - . - docker-watcher-build: docker build -f Dockerfile.watcher \ --build-arg release_version=$$(cat $(PWD)/VERSION)+$$(git rev-parse --short=7 HEAD) \ @@ -338,15 +305,13 @@ docker-watcher_info-build: docker-watcher: docker-watcher-prod docker-watcher-build docker-watcher_info: docker-watcher_info-prod docker-watcher_info-build -docker-child_chain: docker-child_chain-prod docker-child_chain-build docker-perf: docker build -f ./priv/perf/Dockerfile -t $(IMAGE_NAME) . -docker-build: docker-watcher docker-watcher_info docker-child_chain +docker-build: docker-watcher docker-watcher_info docker-push: docker - docker push $(CHILD_CHAIN_IMAGE_NAME) docker push $(WATCHER_IMAGE_NAME) docker push $(WATCHER_INFO_IMAGE_NAME) @@ -399,11 +364,6 @@ docker-update-watcher_info: localchain_contract_addresses.env $(MAKE) docker-watcher_info docker-compose up watcher_info -docker-update-child_chain: localchain_contract_addresses.env - docker stop elixir-omg_childchain_1 - $(MAKE) docker-child_chain - docker-compose up childchain - docker-start-cluster-with-infura: localchain_contract_addresses.env if [ -f ./docker-compose.override.yml ]; then \ docker-compose -f docker-compose.yml -f docker-compose-infura.yml -f docker-compose.override.yml up; \ @@ -424,15 +384,12 @@ docker-nuke: localchain_contract_addresses.env $(MAKE) init-contracts docker-remote-watcher: - docker exec -it watcher /app/bin/child_chain remote + docker exec -it watcher /app/bin/watcher remote docker-remote-watcher_info: docker exec -ti watcher_info /app/bin/watcher_info remote -docker-remote-childchain: - docker exec -ti childchain /app/bin/child_chain remote - -.PHONY: docker-nuke docker-remote-watcher docker-remote-watcher_info docker-remote-childchain +.PHONY: docker-nuke docker-remote-watcher docker-remote-watcher_info ### ### barebone stuff @@ -469,12 +426,6 @@ start-watcher_info: . ${OVERRIDING_VARIABLES} && \ PORT=${WATCHER_INFO_PORT} _build/${BAREBUILD_ENV}/rel/watcher_info/bin/watcher_info $(OVERRIDING_START) -update-child_chain: - _build/dev/rel/child_chain/bin/child_chain stop ; \ - $(ENV_DEV) mix do compile, release child_chain --overwrite && \ - . ${OVERRIDING_VARIABLES} && \ - exec _build/dev/rel/child_chain/bin/child_chain $(OVERRIDING_START) & - update-watcher: _build/dev/rel/watcher/bin/watcher stop ; \ $(ENV_DEV) mix do compile, release watcher --overwrite && \ @@ -487,10 +438,6 @@ update-watcher_info: . ${OVERRIDING_VARIABLES} && \ exec PORT=${WATCHER_INFO_PORT} _build/dev/rel/watcher_info/bin/watcher_info $(OVERRIDING_START) & -stop-child_chain: - . ${OVERRIDING_VARIABLES} && \ - _build/dev/rel/child_chain/bin/child_chain stop - stop-watcher: . ${OVERRIDING_VARIABLES} && \ _build/dev/rel/watcher/bin/watcher stop @@ -499,10 +446,6 @@ stop-watcher_info: . ${OVERRIDING_VARIABLES} && \ _build/dev/rel/watcher_info/bin/watcher_info stop -remote-child_chain: - . ${OVERRIDING_VARIABLES} && \ - _build/dev/rel/child_chain/bin/child_chain remote - remote-watcher: . ${OVERRIDING_VARIABLES} && \ _build/dev/rel/watcher/bin/watcher remote @@ -520,7 +463,7 @@ get-alarms: curl -s -X GET http://localhost:${WATCHER_INFO_PORT}/alarm.get cluster-stop: localchain_contract_addresses.env - ${MAKE} stop-watcher ; ${MAKE} stop-watcher_info ; ${MAKE} stop-child_chain ; docker-compose down + ${MAKE} stop-watcher ; ${MAKE} stop-watcher_info ; docker-compose down ### git setup init: @@ -540,9 +483,6 @@ security_critical_api_specs: info_api_specs: swagger-cli bundle -r -t yaml -o apps/omg_watcher_rpc/priv/swagger/info_api_specs.yaml apps/omg_watcher_rpc/priv/swagger/info_api_specs/swagger.yaml -operator_api_specs: - swagger-cli bundle -r -t yaml -o apps/omg_child_chain_rpc/priv/swagger/operator_api_specs.yaml apps/omg_child_chain_rpc/priv/swagger/operator_api_specs/swagger.yaml - api_specs: security_critical_api_specs info_api_specs operator_api_specs ### diff --git a/apps/omg_status/lib/omg_status/sentry_filter.ex b/apps/omg_status/lib/omg_status/sentry_filter.ex new file mode 100644 index 0000000000..00abab7cc0 --- /dev/null +++ b/apps/omg_status/lib/omg_status/sentry_filter.ex @@ -0,0 +1,30 @@ +# Copyright 2019-2020 OmiseGO Pte Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +defmodule OMG.Status.SentryFilter do + @moduledoc """ + Sentry callback for filtering events. + """ + @behaviour Sentry.EventFilter + + # when the development environment restarts it lacks network access + # something to do with Cloud DNS + def exclude_exception?(%MatchError{term: {:error, :nxdomain}}, _) do + true + end + + def exclude_exception?(_, _) do + false + end +end diff --git a/apps/omg_status/mix.exs b/apps/omg_status/mix.exs index 3dbc97bc67..69841afaa4 100644 --- a/apps/omg_status/mix.exs +++ b/apps/omg_status/mix.exs @@ -36,7 +36,7 @@ defmodule OMG.Status.Mixfile do {:telemetry, "~> 0.4.1"}, {:telemetry_metrics, "~> 0.4"}, {:telemetry_metrics_statsd, "~> 0.3.0"}, - {:sentry, "~> 7.0"}, + {:sentry, "~> 8.0"}, {:statix, git: "https://github.com/omisego/statix.git", branch: "otp-21.3.8.4-support-global-tag-patch"}, {:spandex_datadog, "~> 1.0"}, {:decorator, "~> 1.2"}, diff --git a/apps/omg_watcher_rpc/lib/web/endpoint.ex b/apps/omg_watcher_rpc/lib/web/endpoint.ex index 1a2ae535c7..7b4d54d9c9 100644 --- a/apps/omg_watcher_rpc/lib/web/endpoint.ex +++ b/apps/omg_watcher_rpc/lib/web/endpoint.ex @@ -13,8 +13,8 @@ # limitations under the License. defmodule OMG.WatcherRPC.Web.Endpoint do + use Sentry.PlugCapture use Phoenix.Endpoint, otp_app: :omg_watcher_rpc - use Sentry.Phoenix.Endpoint plug(Plug.RequestId) plug(Plug.Logger, log: :debug) @@ -31,6 +31,7 @@ defmodule OMG.WatcherRPC.Web.Endpoint do json_decoder: Jason ) + plug(Sentry.PlugContext) plug(Plug.MethodOverride) plug(Plug.Head) diff --git a/mix.lock b/mix.lock index ef9a9da7d5..a7d4e59c59 100644 --- a/mix.lock +++ b/mix.lock @@ -6,6 +6,7 @@ "connection": {:hex, :connection, "1.0.4", "a1cae72211f0eef17705aaededacac3eb30e6625b04a6117c1b2db6ace7d5976", [:mix], [], "hexpm", "4a0850c9be22a43af9920a71ab17c051f5f7d45c209e40269a1938832510e4d9"}, "cors_plug": {:hex, :cors_plug, "2.0.2", "2b46083af45e4bc79632bd951550509395935d3e7973275b2b743bd63cc942ce", [:mix], [{:plug, "~> 1.8", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "f0d0e13f71c51fd4ef8b2c7e051388e4dfb267522a83a22392c856de7e46465f"}, "cowboy": {:hex, :cowboy, "2.8.0", "f3dc62e35797ecd9ac1b50db74611193c29815401e53bac9a5c0577bd7bc667d", [:rebar3], [{:cowlib, "~> 2.9.1", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "~> 1.7.1", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "4643e4fba74ac96d4d152c75803de6fad0b3fa5df354c71afdd6cbeeb15fac8a"}, + "cowboy_telemetry": {:hex, :cowboy_telemetry, "0.3.1", "ebd1a1d7aff97f27c66654e78ece187abdc646992714164380d8a041eda16754", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "3a6efd3366130eab84ca372cbd4a7d3c3a97bdfcfb4911233b035d117063f0af"}, "cowlib": {:hex, :cowlib, "2.9.1", "61a6c7c50cf07fdd24b2f45b89500bb93b6686579b069a89f88cb211e1125c78", [:rebar3], [], "hexpm", "e4175dc240a70d996156160891e1c62238ede1729e45740bdd38064dad476170"}, "credo": {:hex, :credo, "1.4.0", "92339d4cbadd1e88b5ee43d427b639b68a11071b6f73854e33638e30a0ea11f5", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "1fd3b70dce216574ce3c18bdf510b57e7c4c85c2ec9cad4bff854abaf7e58658"}, "db_connection": {:hex, :db_connection, "2.2.2", "3bbca41b199e1598245b716248964926303b5d4609ff065125ce98bcd368939e", [:mix], [{:connection, "~> 1.0.2", [hex: :connection, repo: "hexpm", optional: false]}], "hexpm", "642af240d8a8affb93b4ba5a6fcd2bbcbdc327e1a524b825d383711536f8070c"}, @@ -50,11 +51,11 @@ "nimble_parsec": {:hex, :nimble_parsec, "0.6.0", "32111b3bf39137144abd7ba1cce0914533b2d16ef35e8abc5ec8be6122944263", [:mix], [], "hexpm", "27eac315a94909d4dc68bc07a4a83e06c8379237c5ea528a9acff4ca1c873c52"}, "optimal": {:hex, :optimal, "0.3.6", "46bbf52fbbbd238cda81e02560caa84f93a53c75620f1fe19e81e4ae7b07d1dd", [:mix], [], "hexpm", "1a06ea6a653120226b35b283a1cd10039550f2c566edcdec22b29316d73640fd"}, "parse_trans": {:hex, :parse_trans, "3.3.0", "09765507a3c7590a784615cfd421d101aec25098d50b89d7aa1d66646bc571c1", [:rebar3], [], "hexpm", "17ef63abde837ad30680ea7f857dd9e7ced9476cdd7b0394432af4bfc241b960"}, - "phoenix": {:hex, :phoenix, "1.5.4", "0fca9ce7e960f9498d6315e41fcd0c80bfa6fbeb5fa3255b830c67fdfb7e703f", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_html, "~> 2.13", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:plug, "~> 1.10", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 1.0 or ~> 2.2", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.1.2 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "4e516d131fde87b568abd62e1b14aa07ba7d5edfd230bab4e25cc9dedbb39135"}, + "phoenix": {:hex, :phoenix, "1.5.6", "8298cdb4e0f943242ba8410780a6a69cbbe972fef199b341a36898dd751bdd66", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_html, "~> 2.13", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:plug, "~> 1.10", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 1.0 or ~> 2.2", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.1.2 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "0dc4d39af1306b6aa5122729b0a95ca779e42c708c6fe7abbb3d336d5379e956"}, "phoenix_pubsub": {:hex, :phoenix_pubsub, "2.0.0", "a1ae76717bb168cdeb10ec9d92d1480fec99e3080f011402c0a2d68d47395ffb", [:mix], [], "hexpm", "c52d948c4f261577b9c6fa804be91884b381a7f8f18450c5045975435350f771"}, - "plug": {:hex, :plug, "1.10.4", "41eba7d1a2d671faaf531fa867645bd5a3dce0957d8e2a3f398ccff7d2ef017f", [:mix], [{:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ad1e233fe73d2eec56616568d260777b67f53148a999dc2d048f4eb9778fe4a0"}, - "plug_cowboy": {:hex, :plug_cowboy, "2.3.0", "149a50e05cb73c12aad6506a371cd75750c0b19a32f81866e1a323dda9e0e99d", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "bc595a1870cef13f9c1e03df56d96804db7f702175e4ccacdb8fc75c02a7b97e"}, - "plug_crypto": {:hex, :plug_crypto, "1.1.2", "bdd187572cc26dbd95b87136290425f2b580a116d3fb1f564216918c9730d227", [:mix], [], "hexpm", "6b8b608f895b6ffcfad49c37c7883e8df98ae19c6a28113b02aa1e9c5b22d6b5"}, + "plug": {:hex, :plug, "1.11.0", "f17217525597628298998bc3baed9f8ea1fa3f1160aa9871aee6df47a6e4d38e", [:mix], [{:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "2d9c633f0499f9dc5c2fd069161af4e2e7756890b81adcbb2ceaa074e8308876"}, + "plug_cowboy": {:hex, :plug_cowboy, "2.4.1", "779ba386c0915027f22e14a48919a9545714f849505fa15af2631a0d298abf0f", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "d72113b6dff7b37a7d9b2a5b68892808e3a9a752f2bf7e503240945385b70507"}, + "plug_crypto": {:hex, :plug_crypto, "1.2.0", "1cb20793aa63a6c619dd18bb33d7a3aa94818e5fd39ad357051a67f26dfa2df6", [:mix], [], "hexpm", "a48b538ae8bf381ffac344520755f3007cc10bd8e90b240af98ea29b69683fc2"}, "poison": {:hex, :poison, "4.0.1", "bcb755a16fac91cad79bfe9fc3585bb07b9331e50cfe3420a24bcc2d735709ae", [:mix], [], "hexpm", "ba8836feea4b394bb718a161fc59a288fe0109b5006d6bdf97b6badfcf6f0f25"}, "poolboy": {:hex, :poolboy, "1.5.2", "392b007a1693a64540cead79830443abf5762f5d30cf50bc95cb2c1aaafa006b", [:rebar3], [], "hexpm", "dad79704ce5440f3d5a3681c8590b9dc25d1a561e8f5a9c995281012860901e3"}, "postgrex": {:hex, :postgrex, "0.15.5", "aec40306a622d459b01bff890fa42f1430dac61593b122754144ad9033a2152f", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "ed90c81e1525f65a2ba2279dbcebf030d6d13328daa2f8088b9661eb9143af7f"}, @@ -62,7 +63,7 @@ "proper": {:hex, :proper, "1.3.0", "c1acd51c51da17a2fe91d7a6fc6a0c25a6a9849d8dc77093533109d1218d8457", [:make, :mix, :rebar3], [], "hexpm", "4aa192fccddd03fdbe50fef620be9d4d2f92635b54f55fb83aec185994403cbc"}, "ranch": {:hex, :ranch, "1.7.1", "6b1fab51b49196860b733a49c07604465a47bdb78aa10c1c16a3d199f7f8c881", [:rebar3], [], "hexpm", "451d8527787df716d99dc36162fca05934915db0b6141bbdac2ea8d3c7afc7d7"}, "rocksdb": {:hex, :rocksdb, "1.5.1", "016861fbfb1f76ec2c48f745fca1f6e140fc0f27adc8c389c4cabce4a79b5f2f", [:rebar3], [], "hexpm", "63db7dfd65082d61df92810f61bd934080c77bc57eb711b36bb56a8926bdf3b0"}, - "sentry": {:hex, :sentry, "7.2.5", "570db92c3bbacd6ad02ac81cba8ac5af11235a55d65ac4375e3ec833975b83d3", [:mix], [{:hackney, "~> 1.8 or 1.6.5", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.3", [hex: :phoenix, repo: "hexpm", optional: true]}, {:plug, "~> 1.6", [hex: :plug, repo: "hexpm", optional: true]}, {:plug_cowboy, "~> 1.0 or ~> 2.0", [hex: :plug_cowboy, repo: "hexpm", optional: true]}], "hexpm", "ea84ed6848505ff2a246567df562f465d2b34c317d3ecba7c7df58daa56e5e5d"}, + "sentry": {:hex, :sentry, "8.0.4", "6886ea584fa0dfc144dd3d8c4723570a4c0c6387a639077de34fce96b11995e2", [:mix], [{:hackney, "~> 1.8", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: true]}, {:plug, "~> 1.6", [hex: :plug, repo: "hexpm", optional: true]}, {:plug_cowboy, "~> 2.3", [hex: :plug_cowboy, repo: "hexpm", optional: true]}], "hexpm", "781e4e0a8d4524c015f0f8d82e6bc30e6bf33df622da58d8c89d30c3cb943e67"}, "spandex": {:hex, :spandex, "3.0.2", "6fc99ec4cca6810ffff579cc606dcbf14d54d1419f4738f64f63854aee351fdb", [:mix], [{:decorator, "~> 1.2", [hex: :decorator, repo: "hexpm", optional: true]}, {:optimal, "~> 0.3.3", [hex: :optimal, repo: "hexpm", optional: false]}, {:plug, ">= 1.0.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "b98667d553490d63ab4ae784c4689d41052145aa2ca59f2f59caacd4a1a63d1e"}, "spandex_datadog": {:hex, :spandex_datadog, "1.0.0", "20db83c10600210a36a1ac95ed8cef3efb400ae948f48252437c2cc21dfd3969", [:mix], [{:msgpax, "~> 2.2.1", [hex: :msgpax, repo: "hexpm", optional: false]}, {:spandex, "~> 3.0", [hex: :spandex, repo: "hexpm", optional: false]}], "hexpm", "d1a499ed3e8580b88ca8ba10208004849b3bd6cfa045b90e4b69055b78474045"}, "spandex_ecto": {:hex, :spandex_ecto, "0.6.2", "845e0e0a115e84c218015e8a13cca7adb38e8b0a1b45010a51451a8c9961c551", [:mix], [{:spandex, "~> 2.2 or ~> 3.0", [hex: :spandex, repo: "hexpm", optional: false]}], "hexpm", "ddeb5c279ca850a38eee6decc8f91b3f4929c76f141b3329293793be54d0c1c7"}, From 82816588178428f2eef2cfd580f001fe9c08a3bb Mon Sep 17 00:00:00 2001 From: Ino Murko Date: Fri, 20 Nov 2020 11:06:43 +0100 Subject: [PATCH 2/3] run reorg tests only on master --- .circleci/config.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8469ac4c64..a21b9d20df 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1070,7 +1070,11 @@ workflows: - test_docker_compose_performance: filters: *all_branches_and_tags - test_docker_compose_reorg: - filters: *all_branches_and_tags + filters: + branches: + only: + - master + - master-v2 - audit_deps: requires: [build] filters: *all_branches_and_tags From 93e8475e13bf4ffb4951977df5dd1a316f905002 Mon Sep 17 00:00:00 2001 From: "ino.murko@outlook.com" Date: Fri, 20 Nov 2020 12:09:59 +0100 Subject: [PATCH 3/3] linting specs is not needed --- .circleci/config.yml | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a21b9d20df..8cf2ca6339 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -637,25 +637,6 @@ jobs: echo $(circleci tests split ./tags.txt) circleci tests split ./tags.txt > /tmp/tests-to-run mix test --exclude test $(cat /tmp/tests-to-run) - - run: - name: (Cabbage) Format generated code and check for warnings - command: | - cd priv/cabbage - # run format ONLY on formatted code so that it cleans up quoted atoms because - # we cannot exclude folders to --warnings-as-errors - mix format apps/child_chain_api/lib/child_chain_api/model/*.ex - mix format apps/watcher_info_api/lib/watcher_info_api/model/*.ex - mix format apps/watcher_security_critical_api/lib/watcher_security_critical_api/model/*.ex - MIX_ENV=test mix do compile --warnings-as-errors --ignore-module-conflict --force, test --exclude test - - save_cache: - key: v2-mix-specs-cache-{{ .Branch }}-{{ checksum "mix.lock" }} - paths: - - "priv/cabbage/deps" - - run: - name: (Cabbage) Credo and formatting - command: | - cd priv/cabbage - mix do credo, format --check-formatted --dry-run test_docker_compose_performance: description: "These are not actually performance tests, we're checking if the scripts work"