From d7e13f5408b63e6db82531b0f04c822e13d6f251 Mon Sep 17 00:00:00 2001 From: Sergei Tsoganov Date: Tue, 10 Jan 2023 13:24:57 +0200 Subject: [PATCH 1/3] Updated dependancies --- .github/workflows/ruby.yml | 4 ++-- Gemfile | 6 +++--- Gemfile.lock | 22 +++++++++++----------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 604424818..0c92f577f 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -79,7 +79,7 @@ jobs: - name: Save coverage run: ./cc-test-reporter format-coverage --output coverage/codeclimate.${{ matrix.ruby }}.json - - uses: actions/upload-artifact@v3.1.1 + - uses: actions/upload-artifact@v3.1.2 with: name: coverage-${{ matrix.ruby }} path: coverage/codeclimate.${{ matrix.ruby }}.json @@ -104,7 +104,7 @@ jobs: - name: Give test coverage reporter executable permissions run: chmod +x cc-test-reporter - - uses: actions/download-artifact@v3.0.1 + - uses: actions/download-artifact@v3.0.2 with: name: coverage-${{ matrix.ruby }} path: coverage diff --git a/Gemfile b/Gemfile index 0b8b29189..e8a67b9ae 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' # core gem 'active_interaction', '~> 4.0' -gem 'apipie-rails', '~> 0.6.0' +gem 'apipie-rails', '~> 0.9.0' gem 'bootsnap', '>= 1.1.0', require: false gem 'iso8601', '0.13.0' # for dates and times gem 'mimemagic', '0.4.3' @@ -81,13 +81,13 @@ gem 'directo', github: 'internetee/directo', branch: 'master' gem 'strong_migrations' group :development, :test do - gem 'pry', '0.14.1' + gem 'pry', '0.14.2' end group :test do gem 'capybara' gem 'database_cleaner' - gem 'minitest', '~> 5.14' + gem 'minitest', '~> 5.17' gem 'simplecov', '0.17.1', require: false # CC last supported v0.17 gem 'spy' gem 'webdrivers' diff --git a/Gemfile.lock b/Gemfile.lock index f0d9fdc55..f3c2fb990 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -149,9 +149,9 @@ GEM akami (1.3.1) gyoku (>= 0.4.0) nokogiri - apipie-rails (0.6.0) - actionpack (>= 4.1) - activesupport (>= 4.1) + apipie-rails (0.9.0) + actionpack (>= 5.0) + activesupport (>= 5.0) attr_required (1.0.1) autoprefixer-rails (10.2.4.0) execjs @@ -310,7 +310,7 @@ GEM rake mini_mime (1.1.2) mini_portile2 (2.8.0) - minitest (5.16.3) + minitest (5.17.0) monetize (1.9.4) money (~> 6.12) money (6.13.8) @@ -363,9 +363,9 @@ GEM pg (1.4.5) pg_query (2.1.2) google-protobuf (>= 3.17.1) - pghero (2.8.1) - activerecord (>= 5) - pry (0.14.1) + pghero (3.1.0) + activerecord (>= 6) + pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) public_suffix (5.0.0) @@ -535,7 +535,7 @@ PLATFORMS DEPENDENCIES active_interaction (~> 4.0) airbrake - apipie-rails (~> 0.6.0) + apipie-rails (~> 0.9.0) aws-sdk-sesv2 (~> 1.19) bootsnap (>= 1.1.0) bootstrap-sass (~> 3.4) @@ -565,7 +565,7 @@ DEPENDENCIES lhv! mime-types-data mimemagic (= 0.4.3) - minitest (~> 5.14) + minitest (~> 5.17) money-rails newrelic-infinite_tracing newrelic_rpm @@ -577,7 +577,7 @@ DEPENDENCIES pg (= 1.4.5) pg_query (>= 0.9.0) pghero - pry (= 0.14.1) + pry (= 0.14.2) puma rails (~> 6.1.4) ransack (~> 2.6.0) @@ -600,4 +600,4 @@ DEPENDENCIES wkhtmltopdf-binary (~> 0.12.5.1) BUNDLED WITH - 2.3.26 + 2.4.3 From 6a092e47aae4e71cbb6d176ae833b8a675bf9a86 Mon Sep 17 00:00:00 2001 From: Sergei Tsoganov Date: Tue, 10 Jan 2023 13:30:55 +0200 Subject: [PATCH 2/3] Updated structure.sql --- db/structure.sql | 210 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 185 insertions(+), 25 deletions(-) diff --git a/db/structure.sql b/db/structure.sql index 66885e97e..292a9b586 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -9,6 +9,13 @@ SET xmloption = content; SET client_min_messages = warning; SET row_security = off; +-- +-- Name: public; Type: SCHEMA; Schema: -; Owner: - +-- + +-- *not* creating schema, since initdb creates it + + -- -- Name: btree_gin; Type: EXTENSION; Schema: -; Owner: - -- @@ -970,15 +977,14 @@ CREATE TABLE public.domains ( pending_json jsonb, force_delete_date date, statuses character varying[], - statuses_before_force_delete character varying[] DEFAULT '{}'::character varying[], + status_notes public.hstore, upid integer, up_date timestamp without time zone, uuid uuid DEFAULT public.gen_random_uuid() NOT NULL, locked_by_registrant_at timestamp without time zone, force_delete_start timestamp without time zone, force_delete_data public.hstore, - json_statuses_history jsonb, - status_notes public.hstore + json_statuses_history jsonb ); @@ -2303,6 +2309,74 @@ CREATE SEQUENCE public.payment_orders_id_seq ALTER SEQUENCE public.payment_orders_id_seq OWNED BY public.payment_orders.id; +-- +-- Name: pghero_query_stats; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.pghero_query_stats ( + id bigint NOT NULL, + database text, + "user" text, + query text, + query_hash bigint, + total_time double precision, + calls bigint, + captured_at timestamp without time zone +); + + +-- +-- Name: pghero_query_stats_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.pghero_query_stats_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: pghero_query_stats_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.pghero_query_stats_id_seq OWNED BY public.pghero_query_stats.id; + + +-- +-- Name: pghero_space_stats; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.pghero_space_stats ( + id bigint NOT NULL, + database text, + schema text, + relation text, + size bigint, + captured_at timestamp without time zone +); + + +-- +-- Name: pghero_space_stats_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.pghero_space_stats_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: pghero_space_stats_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.pghero_space_stats_id_seq OWNED BY public.pghero_space_stats.id; + + -- -- Name: prices; Type: TABLE; Schema: public; Owner: - -- @@ -2341,6 +2415,48 @@ CREATE SEQUENCE public.prices_id_seq ALTER SEQUENCE public.prices_id_seq OWNED BY public.prices.id; +-- +-- Name: que_jobs; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.que_jobs ( + priority smallint DEFAULT 100 NOT NULL, + run_at timestamp with time zone DEFAULT now() NOT NULL, + job_id bigint NOT NULL, + job_class text NOT NULL, + args json DEFAULT '[]'::json NOT NULL, + error_count integer DEFAULT 0 NOT NULL, + last_error text, + queue text DEFAULT ''::text NOT NULL +); + + +-- +-- Name: TABLE que_jobs; Type: COMMENT; Schema: public; Owner: - +-- + +COMMENT ON TABLE public.que_jobs IS '3'; + + +-- +-- Name: que_jobs_job_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.que_jobs_job_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: que_jobs_job_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.que_jobs_job_id_seq OWNED BY public.que_jobs.job_id; + + -- -- Name: registrant_verifications; Type: TABLE; Schema: public; Owner: - -- @@ -2416,8 +2532,7 @@ CREATE TABLE public.registrars ( settings jsonb DEFAULT '{}'::jsonb NOT NULL, legaldoc_optout boolean DEFAULT false NOT NULL, legaldoc_optout_comment text, - email_history character varying, - rate_limit integer + email_history character varying ); @@ -2622,8 +2737,7 @@ CREATE TABLE public.validation_events ( validation_eventable_type character varying, validation_eventable_id bigint, created_at timestamp(6) without time zone NOT NULL, - updated_at timestamp(6) without time zone NOT NULL, - event_type public.validation_type + updated_at timestamp(6) without time zone NOT NULL ); @@ -3165,6 +3279,20 @@ ALTER TABLE ONLY public.notifications ALTER COLUMN id SET DEFAULT nextval('publi ALTER TABLE ONLY public.payment_orders ALTER COLUMN id SET DEFAULT nextval('public.payment_orders_id_seq'::regclass); +-- +-- Name: pghero_query_stats id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.pghero_query_stats ALTER COLUMN id SET DEFAULT nextval('public.pghero_query_stats_id_seq'::regclass); + + +-- +-- Name: pghero_space_stats id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.pghero_space_stats ALTER COLUMN id SET DEFAULT nextval('public.pghero_space_stats_id_seq'::regclass); + + -- -- Name: prices id; Type: DEFAULT; Schema: public; Owner: - -- @@ -3172,6 +3300,13 @@ ALTER TABLE ONLY public.payment_orders ALTER COLUMN id SET DEFAULT nextval('publ ALTER TABLE ONLY public.prices ALTER COLUMN id SET DEFAULT nextval('public.prices_id_seq'::regclass); +-- +-- Name: que_jobs job_id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.que_jobs ALTER COLUMN job_id SET DEFAULT nextval('public.que_jobs_job_id_seq'::regclass); + + -- -- Name: registrant_verifications id; Type: DEFAULT; Schema: public; Owner: - -- @@ -3681,6 +3816,22 @@ ALTER TABLE ONLY public.payment_orders ADD CONSTRAINT payment_orders_pkey PRIMARY KEY (id); +-- +-- Name: pghero_query_stats pghero_query_stats_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.pghero_query_stats + ADD CONSTRAINT pghero_query_stats_pkey PRIMARY KEY (id); + + +-- +-- Name: pghero_space_stats pghero_space_stats_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.pghero_space_stats + ADD CONSTRAINT pghero_space_stats_pkey PRIMARY KEY (id); + + -- -- Name: prices prices_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -3689,6 +3840,14 @@ ALTER TABLE ONLY public.prices ADD CONSTRAINT prices_pkey PRIMARY KEY (id); +-- +-- Name: que_jobs que_jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.que_jobs + ADD CONSTRAINT que_jobs_pkey PRIMARY KEY (queue, priority, run_at, job_id); + + -- -- Name: registrant_verifications registrant_verifications_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -4296,13 +4455,6 @@ CREATE INDEX index_log_domains_on_object_changes_jsonb ON public.log_domains USI CREATE INDEX index_log_domains_on_object_jsonb ON public.log_domains USING gin (object_jsonb); --- --- Name: index_log_domains_on_object_json; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX index_log_domains_on_object_json ON public.log_domains USING gin (object_json); - - -- -- Name: index_log_domains_on_whodunnit; Type: INDEX; Schema: public; Owner: - -- @@ -4471,6 +4623,20 @@ CREATE INDEX index_notifications_on_registrar_id ON public.notifications USING b CREATE INDEX index_payment_orders_on_invoice_id ON public.payment_orders USING btree (invoice_id); +-- +-- Name: index_pghero_query_stats_on_database_and_captured_at; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_pghero_query_stats_on_database_and_captured_at ON public.pghero_query_stats USING btree (database, captured_at); + + +-- +-- Name: index_pghero_space_stats_on_database_and_captured_at; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_pghero_space_stats_on_database_and_captured_at ON public.pghero_space_stats USING btree (database, captured_at); + + -- -- Name: index_prices_on_zone_id; Type: INDEX; Schema: public; Owner: - -- @@ -4527,13 +4693,6 @@ CREATE INDEX index_users_on_registrar_id ON public.users USING btree (registrar_ CREATE INDEX index_validation_events_on_event_data ON public.validation_events USING gin (event_data); --- --- Name: index_validation_events_on_event_type; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX index_validation_events_on_event_type ON public.validation_events USING btree (event_type); - - -- -- Name: index_validation_events_on_validation_eventable; Type: INDEX; Schema: public; Owner: - -- @@ -5279,9 +5438,11 @@ INSERT INTO "schema_migrations" (version) VALUES ('20210708131814'), ('20210729131100'), ('20210729134625'), -('20210827185249'), -('20211029073644'), +('20211028122103'), +('20211028125245'), +('20211029082225'), ('20211124071418'), +('20211124084308'), ('20211125181033'), ('20211125184334'), ('20211126085139'), @@ -5290,7 +5451,6 @@ INSERT INTO "schema_migrations" (version) VALUES ('20220113201642'), ('20220113220809'), ('20220124105717'), -('20220216113112'), ('20220228093211'), ('20220316140727'), ('20220406085500'), @@ -5304,7 +5464,7 @@ INSERT INTO "schema_migrations" (version) VALUES ('20220715145808'), ('20220818075833'), ('20221011061840'), -('20221031114812'), +('20221206075912'), ('20221206090120'), ('20221206091556'), ('20221207102831'), From ce7217af4d50d47c1854f2841c9f1506c00bbef4 Mon Sep 17 00:00:00 2001 From: Sergei Tsoganov Date: Tue, 10 Jan 2023 13:57:06 +0200 Subject: [PATCH 3/3] Corrected test --- test/integration/repp/v1/domains/delete_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/repp/v1/domains/delete_test.rb b/test/integration/repp/v1/domains/delete_test.rb index 818815473..9b1a23f10 100644 --- a/test/integration/repp/v1/domains/delete_test.rb +++ b/test/integration/repp/v1/domains/delete_test.rb @@ -17,7 +17,7 @@ class ReppV1DomainsDeleteTest < ActionDispatch::IntegrationTest payload = { domain: { delete: { - verified: false, + verified: 'false', }, }, }