15922: Change EnableBetaController14287 -> ForceLegacyAPI14.
authorTom Clegg <tom@tomclegg.ca>
Sun, 8 Dec 2019 00:48:50 +0000 (19:48 -0500)
committerTom Clegg <tom@tomclegg.ca>
Thu, 12 Dec 2019 14:59:58 +0000 (09:59 -0500)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@tomclegg.ca>

lib/config/config.default.yml
lib/config/export.go
lib/config/generated_config.go
lib/controller/federation_test.go
lib/controller/handler.go
lib/controller/handler_test.go
lib/controller/server_test.go
sdk/go/arvados/config.go
sdk/python/tests/run_test_server.py

index 98e6bd3720506232d1764979f46c45ea650a4b38..7779d7ebf2a26b11a0ca4225a6cdfe865abd8a3d 100644 (file)
@@ -512,7 +512,7 @@ Clusters:
       # "https://zzzzz.example.com/login") as an authorized redirect
       # URL.
       #
-      # Requires EnableBetaController14287. ProviderAppID must be
+      # Incompatible with ForceLegacyAPI14. ProviderAppID must be
       # blank.
       GoogleClientID: ""
       GoogleClientSecret: ""
@@ -1109,5 +1109,9 @@ Clusters:
         <p>An administrator must activate your account before you can get
         any further.</p>
 
-    # Use experimental controller code (see https://dev.arvados.org/issues/14287)
-    EnableBetaController14287: false
+    # Bypass new (Arvados 1.5) API implementations, and hand off
+    # requests directly to Rails instead. This can provide a temporary
+    # workaround for clients that are incompatible with the new API
+    # implementation. Note that it also disables some new federation
+    # features and will be removed in a future release.
+    ForceLegacyAPI14: false
index c8bbbe1a5f3c734eb52531834bac05606b60e0e1..e7278c5f32b9a8de1c5d5ec3e47d0d4838813603 100644 (file)
@@ -124,7 +124,7 @@ var whitelist = map[string]bool{
        "Containers.SupportedDockerImageFormats":       true,
        "Containers.SupportedDockerImageFormats.*":     true,
        "Containers.UsePreemptibleInstances":           true,
-       "EnableBetaController14287":                    false,
+       "ForceLegacyAPI14":                             false,
        "Git":                                          false,
        "InstanceTypes":                                true,
        "InstanceTypes.*":                              true,
index ece3a627fd6a5b7ed2fe5179068b6a10ba20439f..3e58d249bf4dee7526ea1bbab74b259b85d2d4ab 100644 (file)
@@ -518,7 +518,7 @@ Clusters:
       # "https://zzzzz.example.com/login") as an authorized redirect
       # URL.
       #
-      # Requires EnableBetaController14287. ProviderAppID must be
+      # Incompatible with ForceLegacyAPI14. ProviderAppID must be
       # blank.
       GoogleClientID: ""
       GoogleClientSecret: ""
@@ -1115,6 +1115,10 @@ Clusters:
         <p>An administrator must activate your account before you can get
         any further.</p>
 
-    # Use experimental controller code (see https://dev.arvados.org/issues/14287)
-    EnableBetaController14287: false
+    # Bypass new (Arvados 1.5) API implementations, and hand off
+    # requests directly to Rails instead. This can provide a temporary
+    # workaround for clients that are incompatible with the new API
+    # implementation. Note that it also disables some new federation
+    # features and will be removed in a future release.
+    ForceLegacyAPI14: false
 `)
index 9dc4a3b814c22c0c34940e9efcb2dcf8f497e7b7..d0bff84eaf5eb3387450f6e12de28ca6167eeffd 100644 (file)
@@ -57,9 +57,9 @@ func (s *FederationSuite) SetUpTest(c *check.C) {
        c.Assert(s.remoteMock.Start(), check.IsNil)
 
        cluster := &arvados.Cluster{
-               ClusterID:                 "zhome",
-               PostgreSQL:                integrationTestCluster().PostgreSQL,
-               EnableBetaController14287: enableBetaController14287,
+               ClusterID:        "zhome",
+               PostgreSQL:       integrationTestCluster().PostgreSQL,
+               ForceLegacyAPI14: forceLegacyAPI14,
        }
        cluster.TLS.Insecure = true
        cluster.API.MaxItemsPerResponse = 1000
index 28c616aa631733ef9010598e1499870e90d2e4e0..935a1b6cb683a57a2da99b4d4f7285b1bc1ae7f5 100644 (file)
@@ -80,7 +80,7 @@ func (h *Handler) setup() {
        rtr := router.New(federation.New(h.Cluster))
        mux.Handle("/arvados/v1/config", rtr)
 
-       if h.Cluster.EnableBetaController14287 {
+       if !h.Cluster.ForceLegacyAPI14 {
                mux.Handle("/arvados/v1/collections", rtr)
                mux.Handle("/arvados/v1/collections/", rtr)
                mux.Handle("/arvados/v1/users", rtr)
index 5243002256c1d743b4b2a1b1925ca096ddff1bad..201c5ec02d305cf513b0e734d51f57f98730fef7 100644 (file)
@@ -23,11 +23,11 @@ import (
        check "gopkg.in/check.v1"
 )
 
-var enableBetaController14287 bool
+var forceLegacyAPI14 bool
 
 // Gocheck boilerplate
 func Test(t *testing.T) {
-       for _, enableBetaController14287 = range []bool{false, true} {
+       for _, forceLegacyAPI14 = range []bool{false, true} {
                check.TestingT(t)
        }
 }
@@ -45,10 +45,9 @@ func (s *HandlerSuite) SetUpTest(c *check.C) {
        s.ctx, s.cancel = context.WithCancel(context.Background())
        s.ctx = ctxlog.Context(s.ctx, ctxlog.New(os.Stderr, "json", "debug"))
        s.cluster = &arvados.Cluster{
-               ClusterID:  "zzzzz",
-               PostgreSQL: integrationTestCluster().PostgreSQL,
-
-               EnableBetaController14287: enableBetaController14287,
+               ClusterID:        "zzzzz",
+               PostgreSQL:       integrationTestCluster().PostgreSQL,
+               ForceLegacyAPI14: forceLegacyAPI14,
        }
        s.cluster.TLS.Insecure = true
        arvadostest.SetServiceURL(&s.cluster.Services.RailsAPI, "https://"+os.Getenv("ARVADOS_TEST_API_HOST"))
index 37f148eb6eb8a08e69d5a9b4c75163d236b02b12..838de35563e60fb1a994e8cee8c28dd2b9321fbe 100644 (file)
@@ -35,10 +35,9 @@ func newServerFromIntegrationTestEnv(c *check.C) *httpserver.Server {
        log := ctxlog.TestLogger(c)
 
        handler := &Handler{Cluster: &arvados.Cluster{
-               ClusterID:  "zzzzz",
-               PostgreSQL: integrationTestCluster().PostgreSQL,
-
-               EnableBetaController14287: enableBetaController14287,
+               ClusterID:        "zzzzz",
+               PostgreSQL:       integrationTestCluster().PostgreSQL,
+               ForceLegacyAPI14: forceLegacyAPI14,
        }}
        handler.Cluster.TLS.Insecure = true
        arvadostest.SetServiceURL(&handler.Cluster.Services.RailsAPI, "https://"+os.Getenv("ARVADOS_TEST_API_HOST"))
index 5c1314532bda7237fcf0fddeb047ed62b5e3ca71..433e361e11032a78aaaac44e43e9f30a46daf6f4 100644 (file)
@@ -215,7 +215,7 @@ type Cluster struct {
                InactivePageHTML       string
        }
 
-       EnableBetaController14287 bool
+       ForceLegacyAPI14 bool
 }
 
 type Volume struct {
index dd74df2367812d48272e6be28827e7e0b806c398..2e093b396dfa22991332368db61a8e9f5904a5d5 100644 (file)
@@ -717,7 +717,6 @@ def setup_config():
     config = {
         "Clusters": {
             "zzzzz": {
-                "EnableBetaController14287": ('14287' in os.environ.get('ARVADOS_EXPERIMENTAL', '')),
                 "ManagementToken": "e687950a23c3a9bceec28c6223a06c79",
                 "SystemRootToken": auth_token('system_user'),
                 "API": {