Browse Source

Merge branch 'giza-protobuf-and-query-node' into distributor-node

Leszek Wiesner 3 years ago
parent
commit
f435ea5ec1

+ 39 - 1
metadata-protobuf/doc/index.md

@@ -21,9 +21,12 @@
     - [DistributionBucketFamilyMetadata](#.DistributionBucketFamilyMetadata)
     - [DistributionBucketOperatorMetadata](#.DistributionBucketOperatorMetadata)
     - [GeoCoordiantes](#.GeoCoordiantes)
+    - [GeographicalArea](#.GeographicalArea)
     - [NodeLocationMetadata](#.NodeLocationMetadata)
     - [StorageBucketOperatorMetadata](#.StorageBucketOperatorMetadata)
   
+    - [GeographicalArea.Continent](#.GeographicalArea.Continent)
+  
 - [proto/Video.proto](#proto/Video.proto)
     - [License](#.License)
     - [MediaType](#.MediaType)
@@ -224,7 +227,8 @@
 | ----- | ---- | ----- | ----------- |
 | region | [string](#string) | optional | ID / name of the region covered by the distribution family (ie. us-east-1). Should be unique. |
 | description | [string](#string) | optional | Additional, more specific description of the region |
-| boundary | [GeoCoordiantes](#GeoCoordiantes) | repeated | Geographical boundary of the region, defined as polygon through array of coordinates (providing [{}] will unset the current value) |
+| areas | [GeographicalArea](#GeographicalArea) | repeated | Standarized geographical areas covered by the family (providing [{}] will unset the current value) |
+| latency_test_targets | [string](#string) | repeated | List of targets (hosts/ips) best suited latency measurements for this family |
 
 
 
@@ -264,6 +268,23 @@
 
 
 
+<a name=".GeographicalArea"></a>
+
+### GeographicalArea
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| continent | [GeographicalArea.Continent](#GeographicalArea.Continent) | optional |  |
+| country_code | [string](#string) | optional | ISO 3166-1 alpha-2 country code |
+| subdivision_code | [string](#string) | optional | ISO 3166-2 subdivision code |
+
+
+
+
+
+
 <a name=".NodeLocationMetadata"></a>
 
 ### NodeLocationMetadata
@@ -299,6 +320,23 @@
 
  
 
+
+<a name=".GeographicalArea.Continent"></a>
+
+### GeographicalArea.Continent
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| AF | 1 |  |
+| NA | 2 |  |
+| OC | 3 |  |
+| AN | 4 |  |
+| AS | 5 |  |
+| EU | 6 |  |
+| SA | 7 |  |
+
+
  
 
  

+ 1 - 1
query-node/mappings/storage/metadata.ts

@@ -135,7 +135,7 @@ export async function processDistributionBucketFamilyMetadata(
     metadataEntity.description = meta.description || (null as any)
   }
   if (isSet(meta.latencyTestTargets)) {
-    metadataEntity.latencyTestTargets = meta.latencyTestTargets
+    metadataEntity.latencyTestTargets = meta.latencyTestTargets.filter((t) => t)
   }
 
   await store.save<DistributionBucketOperatorMetadata>(metadataEntity)

+ 1 - 1
query-node/schemas/storage.graphql

@@ -230,7 +230,7 @@ type DistributionBucketFamilyMetadata @entity {
   areas: [DistributionBucketFamilyGeographicArea!] @derivedFrom(field: "distributionBucketFamilyMetadata")
 
   "List of targets (hosts/ips) best suited latency measurements for the family"
-  latencyTestTargets: [String!]
+  latencyTestTargets: [String]
 }
 
 type DistributionBucketOperatorMetadata @entity {