[ARVADOS] created: 2.1.0-651-g4231a1505

Git user git at public.arvados.org
Wed Apr 14 17:57:06 UTC 2021


        at  4231a15056ed0046fed99ff860ee0f4fbba0a582 (commit)


commit 4231a15056ed0046fed99ff860ee0f4fbba0a582
Author: Tom Clegg <tom at curii.com>
Date:   Wed Apr 14 13:56:59 2021 -0400

    17531: Remove ForceLegacyAPI14 config flag.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/doc/admin/upgrading.html.textile.liquid b/doc/admin/upgrading.html.textile.liquid
index 03e5992d1..52b71287b 100644
--- a/doc/admin/upgrading.html.textile.liquid
+++ b/doc/admin/upgrading.html.textile.liquid
@@ -62,6 +62,10 @@ h3. Centos7 Python 3 dependency upgraded to python3
 
 Now that Python 3 is part of the base repository in CentOS 7, the Python 3 dependency for Centos7 Arvados packages was changed from SCL rh-python36 to python3.
 
+h3. ForceLegacyAPI14 option removed
+
+The ForceLegacyAPI14 configuration option has been removed. In the unlikely event it is mentioned in your config file, remove it to avoid "deprecated/unknown config" warning logs.
+
 h2(#v2_1_0). v2.1.0 (2020-10-13)
 
 "Upgrading from 2.0.0":#v2_0_0
diff --git a/lib/config/config.default.yml b/lib/config/config.default.yml
index bcaa692ff..ca627d07e 100644
--- a/lib/config/config.default.yml
+++ b/lib/config/config.default.yml
@@ -571,9 +571,6 @@ Clusters:
         # ID > Web application) and add your controller's /login URL
         # (e.g., "https://zzzzz.example.com/login") as an authorized
         # redirect URL.
-        #
-        # Incompatible with ForceLegacyAPI14. ProviderAppID must be
-        # blank.
         ClientID: ""
         ClientSecret: ""
 
@@ -1481,13 +1478,6 @@ Clusters:
       # this blank.
       SSHHelpHostSuffix: ""
 
-    # 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
-
 # (Experimental) Restart services automatically when config file
 # changes are detected. Only supported by `arvados-server boot` in
 # dev/test mode.
diff --git a/lib/config/export.go b/lib/config/export.go
index b6531c59d..5c0e9f270 100644
--- a/lib/config/export.go
+++ b/lib/config/export.go
@@ -130,7 +130,6 @@ var whitelist = map[string]bool{
 	"Containers.SupportedDockerImageFormats":              true,
 	"Containers.SupportedDockerImageFormats.*":            true,
 	"Containers.UsePreemptibleInstances":                  true,
-	"ForceLegacyAPI14":                                    false,
 	"Git":                                                 false,
 	"InstanceTypes":                                       true,
 	"InstanceTypes.*":                                     true,
diff --git a/lib/config/generated_config.go b/lib/config/generated_config.go
index 4787f4fab..103266397 100644
--- a/lib/config/generated_config.go
+++ b/lib/config/generated_config.go
@@ -577,9 +577,6 @@ Clusters:
         # ID > Web application) and add your controller's /login URL
         # (e.g., "https://zzzzz.example.com/login") as an authorized
         # redirect URL.
-        #
-        # Incompatible with ForceLegacyAPI14. ProviderAppID must be
-        # blank.
         ClientID: ""
         ClientSecret: ""
 
@@ -1487,13 +1484,6 @@ Clusters:
       # this blank.
       SSHHelpHostSuffix: ""
 
-    # 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
-
 # (Experimental) Restart services automatically when config file
 # changes are detected. Only supported by ` + "`" + `arvados-server boot` + "`" + ` in
 # dev/test mode.
diff --git a/lib/controller/auth_test.go b/lib/controller/auth_test.go
index ad214b160..01990620f 100644
--- a/lib/controller/auth_test.go
+++ b/lib/controller/auth_test.go
@@ -62,10 +62,9 @@ func (s *AuthSuite) SetUpTest(c *check.C) {
 	s.fakeProvider.ValidClientSecret = "test#client/secret"
 
 	cluster := &arvados.Cluster{
-		ClusterID:        "zhome",
-		PostgreSQL:       integrationTestCluster().PostgreSQL,
-		ForceLegacyAPI14: forceLegacyAPI14,
-		SystemRootToken:  arvadostest.SystemRootToken,
+		ClusterID:       "zhome",
+		PostgreSQL:      integrationTestCluster().PostgreSQL,
+		SystemRootToken: arvadostest.SystemRootToken,
 	}
 	cluster.TLS.Insecure = true
 	cluster.API.MaxItemsPerResponse = 1000
diff --git a/lib/controller/federation_test.go b/lib/controller/federation_test.go
index e3b2291bc..f4cadd821 100644
--- a/lib/controller/federation_test.go
+++ b/lib/controller/federation_test.go
@@ -57,9 +57,8 @@ func (s *FederationSuite) SetUpTest(c *check.C) {
 	c.Assert(s.remoteMock.Start(), check.IsNil)
 
 	cluster := &arvados.Cluster{
-		ClusterID:        "zhome",
-		PostgreSQL:       integrationTestCluster().PostgreSQL,
-		ForceLegacyAPI14: forceLegacyAPI14,
+		ClusterID:  "zhome",
+		PostgreSQL: integrationTestCluster().PostgreSQL,
 	}
 	cluster.TLS.Insecure = true
 	cluster.API.MaxItemsPerResponse = 1000
diff --git a/lib/controller/handler.go b/lib/controller/handler.go
index 40f335e95..578bfc7d2 100644
--- a/lib/controller/handler.go
+++ b/lib/controller/handler.go
@@ -94,21 +94,18 @@ func (h *Handler) setup() {
 	oidcAuthorizer := localdb.OIDCAccessTokenAuthorizer(h.Cluster, h.db)
 	rtr := router.New(federation.New(h.Cluster), api.ComposeWrappers(ctrlctx.WrapCallsInTransactions(h.db), oidcAuthorizer.WrapCalls))
 	mux.Handle("/arvados/v1/config", rtr)
-	mux.Handle("/"+arvados.EndpointUserAuthenticate.Path, rtr)
-
-	if !h.Cluster.ForceLegacyAPI14 {
-		mux.Handle("/arvados/v1/collections", rtr)
-		mux.Handle("/arvados/v1/collections/", rtr)
-		mux.Handle("/arvados/v1/users", rtr)
-		mux.Handle("/arvados/v1/users/", rtr)
-		mux.Handle("/arvados/v1/connect/", rtr)
-		mux.Handle("/arvados/v1/container_requests", rtr)
-		mux.Handle("/arvados/v1/container_requests/", rtr)
-		mux.Handle("/arvados/v1/groups", rtr)
-		mux.Handle("/arvados/v1/groups/", rtr)
-		mux.Handle("/login", rtr)
-		mux.Handle("/logout", rtr)
-	}
+	mux.Handle("/"+arvados.EndpointUserAuthenticate.Path, rtr) // must come before .../users/
+	mux.Handle("/arvados/v1/collections", rtr)
+	mux.Handle("/arvados/v1/collections/", rtr)
+	mux.Handle("/arvados/v1/users", rtr)
+	mux.Handle("/arvados/v1/users/", rtr)
+	mux.Handle("/arvados/v1/connect/", rtr)
+	mux.Handle("/arvados/v1/container_requests", rtr)
+	mux.Handle("/arvados/v1/container_requests/", rtr)
+	mux.Handle("/arvados/v1/groups", rtr)
+	mux.Handle("/arvados/v1/groups/", rtr)
+	mux.Handle("/login", rtr)
+	mux.Handle("/logout", rtr)
 
 	hs := http.NotFoundHandler()
 	hs = prepend(hs, h.proxyRailsAPI)
diff --git a/lib/controller/handler_test.go b/lib/controller/handler_test.go
index d12e4fa33..935208fc4 100644
--- a/lib/controller/handler_test.go
+++ b/lib/controller/handler_test.go
@@ -26,13 +26,9 @@ import (
 	check "gopkg.in/check.v1"
 )
 
-var forceLegacyAPI14 bool
-
 // Gocheck boilerplate
 func Test(t *testing.T) {
-	for _, forceLegacyAPI14 = range []bool{false, true} {
-		check.TestingT(t)
-	}
+	check.TestingT(t)
 }
 
 var _ = check.Suite(&HandlerSuite{})
@@ -48,9 +44,8 @@ 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,
-		ForceLegacyAPI14: forceLegacyAPI14,
+		ClusterID:  "zzzzz",
+		PostgreSQL: integrationTestCluster().PostgreSQL,
 	}
 	s.cluster.API.RequestTimeout = arvados.Duration(5 * time.Minute)
 	s.cluster.TLS.Insecure = true
@@ -198,10 +193,6 @@ func (s *HandlerSuite) TestLogoutSSO(c *check.C) {
 }
 
 func (s *HandlerSuite) TestLogoutGoogle(c *check.C) {
-	if s.cluster.ForceLegacyAPI14 {
-		// Google login N/A
-		return
-	}
 	s.cluster.Login.Google.Enable = true
 	s.cluster.Login.Google.ClientID = "test"
 	req := httptest.NewRequest("GET", "https://0.0.0.0:1/logout?return_to=https://example.com/foo", nil)
diff --git a/lib/controller/integration_test.go b/lib/controller/integration_test.go
index db1f7f0d0..aeaede427 100644
--- a/lib/controller/integration_test.go
+++ b/lib/controller/integration_test.go
@@ -37,11 +37,6 @@ type IntegrationSuite struct {
 }
 
 func (s *IntegrationSuite) SetUpSuite(c *check.C) {
-	if forceLegacyAPI14 {
-		c.Skip("heavy integration tests don't run with forceLegacyAPI14")
-		return
-	}
-
 	cwd, _ := os.Getwd()
 
 	s.oidcprovider = arvadostest.NewOIDCProvider(c)
diff --git a/lib/controller/server_test.go b/lib/controller/server_test.go
index 838de3556..e3558c3f4 100644
--- a/lib/controller/server_test.go
+++ b/lib/controller/server_test.go
@@ -35,9 +35,8 @@ func newServerFromIntegrationTestEnv(c *check.C) *httpserver.Server {
 	log := ctxlog.TestLogger(c)
 
 	handler := &Handler{Cluster: &arvados.Cluster{
-		ClusterID:        "zzzzz",
-		PostgreSQL:       integrationTestCluster().PostgreSQL,
-		ForceLegacyAPI14: forceLegacyAPI14,
+		ClusterID:  "zzzzz",
+		PostgreSQL: integrationTestCluster().PostgreSQL,
 	}}
 	handler.Cluster.TLS.Insecure = true
 	arvadostest.SetServiceURL(&handler.Cluster.Services.RailsAPI, "https://"+os.Getenv("ARVADOS_TEST_API_HOST"))
diff --git a/sdk/go/arvados/config.go b/sdk/go/arvados/config.go
index 2fda7febe..c0170d1d7 100644
--- a/sdk/go/arvados/config.go
+++ b/sdk/go/arvados/config.go
@@ -266,8 +266,6 @@ type Cluster struct {
 		SSHHelpHostSuffix      string
 		IdleTimeout            Duration
 	}
-
-	ForceLegacyAPI14 bool
 }
 
 type Volume struct {

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list