[ARVADOS] updated: 1.3.0-1394-gfdd53d252
Git user
git at public.curoverse.com
Thu Jul 25 21:19:04 UTC 2019
Summary of changes:
lib/config/export.go | 100 ++++++++++++++++++++++++----------------------
lib/config/export_test.go | 9 +++--
2 files changed, 58 insertions(+), 51 deletions(-)
via fdd53d252b5ca50ed7914a598073f0495c6aa2a2 (commit)
from 9656b85278fa05b4118f98c987fec278168a4b1c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit fdd53d252b5ca50ed7914a598073f0495c6aa2a2
Author: Eric Biagiotti <ebiagiotti at veritasgenetics.com>
Date: Thu Jul 25 17:18:56 2019 -0400
14813: Adds ClusterID to config export
Arvados-DCO-1.1-Signed-off-by: Eric Biagiotti <ebiagiotti at veritasgenetics.com>
diff --git a/lib/config/export.go b/lib/config/export.go
index b79dec4d9..3557d2ff9 100644
--- a/lib/config/export.go
+++ b/lib/config/export.go
@@ -26,6 +26,10 @@ func ExportJSON(w io.Writer, cluster *arvados.Cluster) error {
if err != nil {
return err
}
+
+ // ClusterID is not marshalled by default (see `json:"-"`).
+ // Add it back here so it is included in the exported config.
+ m["ClusterID"] = cluster.ClusterID
err = redactUnsafe(m, "", "")
if err != nil {
return err
@@ -55,54 +59,54 @@ func ExportJSON(w io.Writer, cluster *arvados.Cluster) error {
// exists.
var whitelist = map[string]bool{
// | sort -t'"' -k2,2
- "API": true,
- "API.AsyncPermissionsUpdateInterval": false,
- "API.DisabledAPIs": false,
- "API.MaxIndexDatabaseRead": false,
- "API.MaxItemsPerResponse": true,
- "API.MaxRequestAmplification": false,
- "API.MaxRequestSize": true,
- "API.RailsSessionSecretToken": false,
- "API.RequestTimeout": true,
- "AuditLogs": false,
- "AuditLogs.MaxAge": false,
- "AuditLogs.MaxDeleteBatch": false,
- "AuditLogs.UnloggedAttributes": false,
- "Collections": true,
- "Collections.BlobSigning": true,
- "Collections.BlobSigningKey": false,
- "Collections.BlobSigningTTL": true,
- "Collections.CollectionVersioning": false,
- "Collections.DefaultReplication": true,
- "Collections.DefaultTrashLifetime": true,
- "Collections.ManagedProperties": true,
- "Collections.ManagedProperties.*": true,
- "Collections.ManagedProperties.*.*": true,
- "Collections.PreserveVersionIfIdle": true,
- "Collections.TrashSweepInterval": false,
- "Collections.TrustAllContent": false,
- "Containers": true,
- "Containers.CloudVMs": false,
- "Containers.DefaultKeepCacheRAM": true,
- "Containers.DispatchPrivateKey": false,
- "Containers.JobsAPI": true,
- "Containers.JobsAPI.CrunchJobUser": false,
- "Containers.JobsAPI.CrunchJobWrapper": false,
- "Containers.JobsAPI.CrunchRefreshTrigger": false,
- "Containers.JobsAPI.DefaultDockerImage": false,
- "Containers.JobsAPI.Enable": true,
- "Containers.JobsAPI.GitInternalDir": false,
- "Containers.JobsAPI.ReuseJobIfOutputsDiffer": false,
- "Containers.Logging": false,
- "Containers.LogReuseDecisions": false,
- "Containers.MaxComputeVMs": false,
- "Containers.MaxDispatchAttempts": false,
- "Containers.MaxRetryAttempts": true,
- "Containers.SLURM": false,
- "Containers.StaleLockTimeout": false,
- "Containers.SupportedDockerImageFormats": true,
- "Containers.UsePreemptibleInstances": true,
- "EnableBetaController14287": false,
+ "ClusterID": true,
+ "API.AsyncPermissionsUpdateInterval": false,
+ "API.DisabledAPIs": false,
+ "API.MaxIndexDatabaseRead": false,
+ "API.MaxItemsPerResponse": true,
+ "API.MaxRequestAmplification": false,
+ "API.MaxRequestSize": true,
+ "API.RailsSessionSecretToken": false,
+ "API.RequestTimeout": true,
+ "AuditLogs": false,
+ "AuditLogs.MaxAge": false,
+ "AuditLogs.MaxDeleteBatch": false,
+ "AuditLogs.UnloggedAttributes": false,
+ "Collections": true,
+ "Collections.BlobSigning": true,
+ "Collections.BlobSigningKey": false,
+ "Collections.BlobSigningTTL": true,
+ "Collections.CollectionVersioning": false,
+ "Collections.DefaultReplication": true,
+ "Collections.DefaultTrashLifetime": true,
+ "Collections.ManagedProperties": true,
+ "Collections.ManagedProperties.*": true,
+ "Collections.ManagedProperties.*.*": true,
+ "Collections.PreserveVersionIfIdle": true,
+ "Collections.TrashSweepInterval": false,
+ "Collections.TrustAllContent": false,
+ "Containers": true,
+ "Containers.CloudVMs": false,
+ "Containers.DefaultKeepCacheRAM": true,
+ "Containers.DispatchPrivateKey": false,
+ "Containers.JobsAPI": true,
+ "Containers.JobsAPI.CrunchJobUser": false,
+ "Containers.JobsAPI.CrunchJobWrapper": false,
+ "Containers.JobsAPI.CrunchRefreshTrigger": false,
+ "Containers.JobsAPI.DefaultDockerImage": false,
+ "Containers.JobsAPI.Enable": true,
+ "Containers.JobsAPI.GitInternalDir": false,
+ "Containers.JobsAPI.ReuseJobIfOutputsDiffer": false,
+ "Containers.Logging": false,
+ "Containers.LogReuseDecisions": false,
+ "Containers.MaxComputeVMs": false,
+ "Containers.MaxDispatchAttempts": false,
+ "Containers.MaxRetryAttempts": true,
+ "Containers.SLURM": false,
+ "Containers.StaleLockTimeout": false,
+ "Containers.SupportedDockerImageFormats": true,
+ "Containers.UsePreemptibleInstances": true,
+ "EnableBetaController14287": false,
"Git": false,
"InstanceTypes": true,
"InstanceTypes.*": true,
diff --git a/lib/config/export_test.go b/lib/config/export_test.go
index e12fbdc7f..7af117e38 100644
--- a/lib/config/export_test.go
+++ b/lib/config/export_test.go
@@ -20,11 +20,12 @@ func (s *ExportSuite) TestExport(c *check.C) {
confdata := strings.Replace(string(DefaultYAML), "SAMPLE", "testkey", -1)
cfg, err := testLoader(c, confdata, nil).Load()
c.Assert(err, check.IsNil)
- cluster := cfg.Clusters["xxxxx"]
+ cluster, err := cfg.GetCluster("xxxxx")
+ c.Assert(err, check.IsNil)
cluster.ManagementToken = "abcdefg"
var exported bytes.Buffer
- err = ExportJSON(&exported, &cluster)
+ err = ExportJSON(&exported, cluster)
c.Check(err, check.IsNil)
if err != nil {
c.Logf("If all the new keys are safe, add these to whitelist in export.go:")
@@ -32,5 +33,7 @@ func (s *ExportSuite) TestExport(c *check.C) {
c.Logf("\t%q: true,", strings.Replace(k, `"`, "", -1))
}
}
- c.Check(exported.String(), check.Not(check.Matches), `(?ms).*abcdefg.*`)
+ var exportedStr = exported.String()
+ c.Check(exportedStr, check.Matches, `(?ms).*ClusterID":"xxxxx.*`)
+ c.Check(exportedStr, check.Not(check.Matches), `(?ms).*abcdefg.*`)
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list