Skip to content

Commit d68a50c

Browse files
authored
fix: align with abfs --manifest-server (#2)
BREAKING CHANGE: renamed `abfs_gerrit_uploader_git_servers` to `abfs_gerrit_uploader_manifest_server` and changed type from `list(string)` to `string`
1 parent 105afd9 commit d68a50c

File tree

7 files changed

+27
-25
lines changed

7 files changed

+27
-25
lines changed

examples/simple/main.tf

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ module "abfs-deployment" {
2626
module "abfs-uploaders" {
2727
source = "../../modules/uploaders"
2828

29-
project_id = var.project_id
30-
zone = var.zone
31-
service_account_email = google_service_account.abfs_server.email
32-
subnetwork = module.abfs-vpc.subnets["${var.region}/abfs-subnet"].name
33-
abfs_docker_image_uri = var.abfs_docker_image_uri
34-
abfs_gerrit_uploader_git_servers = var.abfs_gerrit_uploader_git_servers
35-
abfs_license = var.abfs_license
36-
abfs_server_name = module.abfs-deployment.abfs_server_name
29+
project_id = var.project_id
30+
zone = var.zone
31+
service_account_email = google_service_account.abfs_server.email
32+
subnetwork = module.abfs-vpc.subnets["${var.region}/abfs-subnet"].name
33+
abfs_docker_image_uri = var.abfs_docker_image_uri
34+
abfs_gerrit_uploader_manifest_server = var.abfs_gerrit_uploader_manifest_server
35+
abfs_license = var.abfs_license
36+
abfs_server_name = module.abfs-deployment.abfs_server_name
3737
}
3838

3939
module "monitoring" {

examples/simple/variables.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ variable "abfs_docker_image_uri" {
3232
type = string
3333
}
3434

35-
variable "abfs_gerrit_uploader_git_servers" {
36-
description = "List of git servers to upload to the ABFS server (e.g. [\"android.googlesource.com\"])"
37-
type = list(string)
35+
variable "abfs_gerrit_uploader_manifest_server" {
36+
default = "android.googlesource.com"
37+
description = "The manifest server to assume"
38+
type = string
3839
}
3940

4041
variable "abfs_license" {

metadata.display.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ spec:
3232
name: goog_cm_deployment_name
3333
title: Deployment name
3434
subtext: If set, this value will be used as a prefix for all VM and disk names
35-
abfs_gerrit_uploader_git_servers:
36-
name: abfs_gerrit_uploader_git_servers
35+
abfs_gerrit_uploader_manifest_server:
36+
name: abfs_gerrit_uploader_manifest_server
3737
title: ABFS Gerrit Uploader Git Servers
3838
section: gerrit_config
3939
subtext: |
40-
Format: ["android.googlesource.com","gerrit.example.com"]
40+
Format: "android.googlesource.com"
4141
abfs_gerrit_uploader_git_branch:
4242
name: abfs_gerrit_uploader_git_branch
4343
title: ABFS Gerrit Uploader Git Branch
@@ -184,4 +184,4 @@ spec:
184184
title: Gerrit Uploaders
185185
subtext: Configuration for the Gerrit uploaders - these servers are responsible for uploading the git tree from Gerrit servers to the cache on the ABFS server.
186186
- name: advanced
187-
title: Advanced properties
187+
title: Advanced properties

metadata.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ spec:
108108
description: The PD regional disk type to use for the ABFS gerrit uploader datadisk(s)
109109
varType: string
110110
defaultValue: pd-ssd
111-
- name: abfs_gerrit_uploader_git_servers
112-
description: List of git servers to upload to the ABFS server (e.g. ["android.googlesource.com"])
113-
varType: list(string)
111+
- name: abfs_gerrit_uploader_manifest_server
112+
description: The manifest server to assume
113+
varType: string
114114
required: true
115-
defaultValue: ["android.googlesource.com"]
115+
defaultValue: "android.googlesource.com"
116116
- name: abfs_gerrit_uploader_git_branch
117117
description: Git branch to upload to the ABFS server (e.g.main)
118118
varType: string

modules/uploaders/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ No modules.
4242
| <a name="input_abfs_gerrit_uploader_datadisk_size_gb"></a> [abfs\_gerrit\_uploader\_datadisk\_size\_gb](#input\_abfs\_gerrit\_uploader\_datadisk\_size\_gb) | Size in GB for the ABFS gerrit uploader datadisk(s) that will be attached to the VM(s) | `number` | `4096` | no |
4343
| <a name="input_abfs_gerrit_uploader_datadisk_type"></a> [abfs\_gerrit\_uploader\_datadisk\_type](#input\_abfs\_gerrit\_uploader\_datadisk\_type) | The PD regional disk type to use for the ABFS gerrit uploader datadisk(s) | `string` | `"pd-ssd"` | no |
4444
| <a name="input_abfs_gerrit_uploader_git_branch"></a> [abfs\_gerrit\_uploader\_git\_branch](#input\_abfs\_gerrit\_uploader\_git\_branch) | Git branch to upload to the ABFS server (e.g. main) | `string` | `"main"` | no |
45-
| <a name="input_abfs_gerrit_uploader_git_servers"></a> [abfs\_gerrit\_uploader\_git\_servers](#input\_abfs\_gerrit\_uploader\_git\_servers) | List of git servers to upload to the ABFS server (e.g. ["android.googlesource.com"]) | `list(string)` | n/a | yes |
4645
| <a name="input_abfs_gerrit_uploader_machine_type"></a> [abfs\_gerrit\_uploader\_machine\_type](#input\_abfs\_gerrit\_uploader\_machine\_type) | Machine type for ABFS gerrit uploaders | `string` | `"n2d-standard-48"` | no |
46+
| <a name="input_abfs_gerrit_uploader_manifest_server"></a> [abfs\_gerrit\_uploader\_manifest\_server](#input\_abfs\_gerrit\_uploader\_manifest\_server) | The manifest server to assume | `string` | `"android.googlesource.com"` | no |
4747
| <a name="input_abfs_gerrit_uploader_name_prefix"></a> [abfs\_gerrit\_uploader\_name\_prefix](#input\_abfs\_gerrit\_uploader\_name\_prefix) | Name prefix for the ABFS gerrit uploader VM(s) | `string` | `"abfs-gerrit-uploader"` | no |
4848
| <a name="input_abfs_license"></a> [abfs\_license](#input\_abfs\_license) | ABFS license (JSON) | `string` | n/a | yes |
4949
| <a name="input_abfs_manifest_file"></a> [abfs\_manifest\_file](#input\_abfs\_manifest\_file) | Relative path from the manifest project root to the manifest file | `string` | `"default.xml"` | no |
5050
| <a name="input_abfs_manifest_project_name"></a> [abfs\_manifest\_project\_name](#input\_abfs\_manifest\_project\_name) | Name of the git project on the manifest-server containing manifests | `string` | `"platform/manifest"` | no |
51-
| <a name="input_abfs_uploader_cos_image_ref"></a> [abfs\_puser\_cos\_image\_ref](#input\_abfs\_puser\_cos\_image\_ref) | Reference to the COS boot image to use for the ABFS uploader | `string` | `"projects/cos-cloud/global/images/family/cos-109-lts"` | no |
5251
| <a name="input_abfs_server_name"></a> [abfs\_server\_name](#input\_abfs\_server\_name) | The name of the ABFS server | `string` | n/a | yes |
52+
| <a name="input_abfs_uploader_cos_image_ref"></a> [abfs\_uploader\_cos\_image\_ref](#input\_abfs\_uploader\_cos\_image\_ref) | Reference to the COS boot image to use for the ABFS uploader | `string` | `"projects/cos-cloud/global/images/family/cos-109-lts"` | no |
5353
| <a name="input_goog_cm_deployment_name"></a> [goog\_cm\_deployment\_name](#input\_goog\_cm\_deployment\_name) | The name of the deployment for Marketplace | `string` | `""` | no |
5454
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | Google Cloud project ID | `string` | n/a | yes |
5555
| <a name="input_service_account_email"></a> [service\_account\_email](#input\_service\_account\_email) | Email of service account to attach to the servers | `string` | n/a | yes |

modules/uploaders/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ data "cloudinit_config" "abfs_gerrit_uploader_configs" {
143143
abfs_datadisk_mountpoint = var.abfs_datadisk_mountpoint
144144
# FIXME: Find a better way to parameterize the abfs command
145145
abfs_command = <<-EOT
146-
--manifest-server ${join(",", var.abfs_gerrit_uploader_git_servers)} \
146+
--manifest-server ${var.abfs_gerrit_uploader_manifest_server} \
147147
--remote-servers ${var.abfs_server_name}:50051 \
148148
--manifest-project-name ${var.abfs_manifest_project_name} \
149149
gerrit upload-daemon ${var.abfs_gerrit_uploader_count} ${count.index} \

modules/uploaders/variables.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,10 @@ variable "abfs_gerrit_uploader_datadisk_type" {
6868
type = string
6969
}
7070

71-
variable "abfs_gerrit_uploader_git_servers" {
72-
description = "List of git servers to upload to the ABFS server (e.g. [\"android.googlesource.com\"])"
73-
type = list(string)
71+
variable "abfs_gerrit_uploader_manifest_server" {
72+
default = "android.googlesource.com"
73+
description = "The manifest server to assume"
74+
type = string
7475
}
7576

7677
variable "abfs_gerrit_uploader_git_branch" {

0 commit comments

Comments
 (0)