From a6424db35f3a814b479e27d181ba0ea169f71920 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Sat, 7 Nov 2020 08:25:01 -0600 Subject: [PATCH 1/3] Update 05-seed_data.sql Errant formerly valid seed data does not comply with current table structured. Removed. --- schema/generate/05-seed_data.sql | 7 ------- 1 file changed, 7 deletions(-) diff --git a/schema/generate/05-seed_data.sql b/schema/generate/05-seed_data.sql index 64c7b69801..64c731841c 100644 --- a/schema/generate/05-seed_data.sql +++ b/schema/generate/05-seed_data.sql @@ -117,13 +117,6 @@ INSERT INTO "augur_data"."chaoss_metric_status" VALUES (80, 'experimental', 'lib INSERT INTO "augur_data"."chaoss_metric_status" VALUES (81, 'experimental', 'librariesio', 'metric', 'implemented', 'implemented', 'f', '/api/unstable///dependents', NULL, 'Dependents', 'experimental', '"dependents"', 'Insight Worker', '0.0.1', 'librariesio', '2019-06-20 22:51:25', NULL); COMMIT; - - -BEGIN; -INSERT INTO "augur_data"."contributor_affiliations"("ca_id", "ca_domain", "ca_affiliation", "ca_start_date", "ca_active", "ca_last_used", "tool_source", "tool_version", "data_source", "data_collection_date") VALUES (25152, 'goggins.com', 'goggins', '2016-03-03', 1, '2019-10-29 12:22:25', NULL, NULL, NULL, '2019-10-29 17:22:30'); -COMMIT; - - -- SPDX Schema Required Metadata From 5ae36ac1e9479265d990649703de5b72a88665fb Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Sat, 7 Nov 2020 08:42:00 -0600 Subject: [PATCH 2/3] Update 15-schema_update_17.sql Added `IF NOT EXISTS` in script where I found note from carter. --- schema/generate/15-schema_update_17.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schema/generate/15-schema_update_17.sql b/schema/generate/15-schema_update_17.sql index 2b9fd231e4..100a639d30 100644 --- a/schema/generate/15-schema_update_17.sql +++ b/schema/generate/15-schema_update_17.sql @@ -3,8 +3,8 @@ ALTER TABLE "augur_data"."repo" ALTER COLUMN "forked_from" TYPE varchar USING "forked_from"::varchar; ALTER TABLE "augur_data"."repo" - ADD COLUMN "repo_archived" int4, - ADD COLUMN "repo_archived_date_collected" timestamptz(0), + ADD COLUMN IF NOT EXISTS "repo_archived" int4, + ADD COLUMN IF NOT EXISTS "repo_archived_date_collected" timestamptz(0), ALTER COLUMN "forked_from" TYPE varchar USING "forked_from"::varchar; update "augur_operations"."augur_settings" set value = 17 where setting = 'augur_data_version'; From 77d553eec529bfada69022c8c3d92682fde6cd98 Mon Sep 17 00:00:00 2001 From: Gabe Heim Date: Mon, 9 Nov 2020 22:18:59 -0600 Subject: [PATCH 3/3] graphql pagination for pr files model now acknowledges not found repos --- workers/pull_request_worker/pull_request_worker.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/workers/pull_request_worker/pull_request_worker.py b/workers/pull_request_worker/pull_request_worker.py index 54c8c33441..4b0a97c421 100644 --- a/workers/pull_request_worker/pull_request_worker.py +++ b/workers/pull_request_worker/pull_request_worker.py @@ -108,6 +108,9 @@ def find_root_of_subject(data, key_subject): if 'errors' in data: self.logger.info("Error!: {}".format(data['errors'])) + if j['errors'][0]['type'] == 'NOT_FOUND': + self.logger.warning("Github repo was not found or does not exist for endpoint: {}\n".format(url)) + break if data['errors'][0]['type'] == 'RATE_LIMITED': self.update_gh_rate_limit(response) num_attempts -= 1 @@ -133,7 +136,7 @@ def find_root_of_subject(data, key_subject): if not success: self.logger.info('GraphQL query failed: {}'.format(query)) - continue + break before_parameters.update({ data_subject: ', before: \"{}\"'.format(page_info['startCursor'])