[ARVADOS] updated: 1.3.0-1972-gd02c396c7
Git user
git at public.arvados.org
Tue Dec 10 17:44:31 UTC 2019
Summary of changes:
lib/controller/router/request.go | 10 ++++++----
lib/controller/router/response.go | 2 +-
lib/controller/router/router_test.go | 2 ++
lib/controller/rpc/conn.go | 8 ++++----
sdk/go/arvados/api.go | 22 ++++++++++++----------
sdk/go/arvados/container.go | 1 +
sdk/go/arvados/user.go | 1 +
7 files changed, 27 insertions(+), 19 deletions(-)
via d02c396c73e734cddc3d777b03c1f7e9a0cbfbfa (commit)
via 50a769bb822f5977d56577e85ecf499f32096366 (commit)
via ec159a04d69a424e7bfb1563d2ff50a64aca0f38 (commit)
from 5abaf7eeb3438eb6d9f81b02c6d5ccbff29b3184 (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 d02c396c73e734cddc3d777b03c1f7e9a0cbfbfa
Author: Tom Clegg <tom at tomclegg.ca>
Date: Tue Dec 10 12:43:35 2019 -0500
15922: Fix propagation of user setup and merge requests.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at tomclegg.ca>
diff --git a/lib/controller/router/request.go b/lib/controller/router/request.go
index cc6379486..39b4c5100 100644
--- a/lib/controller/router/request.go
+++ b/lib/controller/router/request.go
@@ -163,10 +163,12 @@ var intParams = map[string]bool{
}
var boolParams = map[string]bool{
- "distinct": true,
- "ensure_unique_name": true,
- "include_trash": true,
- "include_old_versions": true,
+ "distinct": true,
+ "ensure_unique_name": true,
+ "include_trash": true,
+ "include_old_versions": true,
+ "redirect_to_new_user": true,
+ "send_notification_email": true,
}
func stringToBool(s string) bool {
diff --git a/sdk/go/arvados/api.go b/sdk/go/arvados/api.go
index 7d6ddb317..6e115a15f 100644
--- a/sdk/go/arvados/api.go
+++ b/sdk/go/arvados/api.go
@@ -49,7 +49,7 @@ var (
EndpointUserGetSystem = APIEndpoint{"GET", "arvados/v1/users/system", ""}
EndpointUserList = APIEndpoint{"GET", "arvados/v1/users", ""}
EndpointUserMerge = APIEndpoint{"POST", "arvados/v1/users/merge", ""}
- EndpointUserSetup = APIEndpoint{"POST", "arvados/v1/users/setup", ""}
+ EndpointUserSetup = APIEndpoint{"POST", "arvados/v1/users/setup", "user"}
EndpointUserSystem = APIEndpoint{"GET", "arvados/v1/users/system", ""}
EndpointUserUnsetup = APIEndpoint{"POST", "arvados/v1/users/{uuid}/unsetup", ""}
EndpointUserUpdate = APIEndpoint{"PATCH", "arvados/v1/users/{uuid}", "user"}
@@ -105,19 +105,21 @@ type UserActivateOptions struct {
}
type UserSetupOptions struct {
- UUID string `json:"uuid"`
- Email string `json:"email"`
- OpenIDPrefix string `json:"openid_prefix"`
- RepoName string `json:"repo_name"`
- VMUUID string `json:"vm_uuid"`
- SendNotificationEmail bool `json:"send_notification_email"`
+ UUID string `json:"uuid,omitempty"`
+ Email string `json:"email,omitempty"`
+ OpenIDPrefix string `json:"openid_prefix,omitempty"`
+ RepoName string `json:"repo_name,omitempty"`
+ VMUUID string `json:"vm_uuid,omitempty"`
+ SendNotificationEmail bool `json:"send_notification_email,omitempty"`
Attrs map[string]interface{} `json:"attrs"`
}
type UserMergeOptions struct {
- NewUserUUID string `json:"new_user_uuid,omitempty"`
- OldUserUUID string `json:"old_user_uuid,omitempty"`
- NewUserToken string `json:"new_user_token,omitempty"`
+ NewUserUUID string `json:"new_user_uuid,omitempty"`
+ OldUserUUID string `json:"old_user_uuid,omitempty"`
+ NewOwnerUUID string `json:"new_owner_uuid,omitempty"`
+ NewUserToken string `json:"new_user_token,omitempty"`
+ RedirectToNewUser bool `json:"redirect_to_new_user"`
}
type UserBatchUpdateOptions struct {
commit 50a769bb822f5977d56577e85ecf499f32096366
Author: Tom Clegg <tom at tomclegg.ca>
Date: Tue Dec 10 10:31:38 2019 -0500
15922: Preserve etag in responses.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at tomclegg.ca>
diff --git a/lib/controller/router/response.go b/lib/controller/router/response.go
index 7e1b70249..c9d8319da 100644
--- a/lib/controller/router/response.go
+++ b/lib/controller/router/response.go
@@ -46,7 +46,7 @@ func applySelectParam(selectParam []string, orig map[string]interface{}) map[str
}
}
// Some keys are always preserved, even if not requested
- for _, k := range []string{"kind", "writable_by"} {
+ for _, k := range []string{"etag", "kind", "writable_by"} {
if v, ok := orig[k]; ok {
selected[k] = v
}
diff --git a/lib/controller/router/router_test.go b/lib/controller/router/router_test.go
index c951cdec8..4567f2b4e 100644
--- a/lib/controller/router/router_test.go
+++ b/lib/controller/router/router_test.go
@@ -321,6 +321,8 @@ func (s *RouterIntegrationSuite) TestSelectParam(c *check.C) {
c.Check(rr.Code, check.Equals, http.StatusOK)
c.Check(resp["kind"], check.Equals, "arvados#container")
+ c.Check(resp["etag"], check.FitsTypeOf, "")
+ c.Check(resp["etag"], check.Not(check.Equals), "")
c.Check(resp["uuid"], check.HasLen, 27)
c.Check(resp["command"], check.HasLen, 2)
c.Check(resp["mounts"], check.IsNil)
diff --git a/sdk/go/arvados/container.go b/sdk/go/arvados/container.go
index 1d3b0962f..653312d86 100644
--- a/sdk/go/arvados/container.go
+++ b/sdk/go/arvados/container.go
@@ -9,6 +9,7 @@ import "time"
// Container is an arvados#container resource.
type Container struct {
UUID string `json:"uuid"`
+ Etag string `json:"etag"`
CreatedAt time.Time `json:"created_at"`
ModifiedByClientUUID string `json:"modified_by_client_uuid"`
ModifiedByUserUUID string `json:"modified_by_user_uuid"`
diff --git a/sdk/go/arvados/user.go b/sdk/go/arvados/user.go
index 950b2ff4e..68960144a 100644
--- a/sdk/go/arvados/user.go
+++ b/sdk/go/arvados/user.go
@@ -9,6 +9,7 @@ import "time"
// User is an arvados#user record
type User struct {
UUID string `json:"uuid"`
+ Etag string `json:"etag"`
IsActive bool `json:"is_active"`
IsAdmin bool `json:"is_admin"`
Username string `json:"username"`
commit ec159a04d69a424e7bfb1563d2ff50a64aca0f38
Author: Tom Clegg <tom at tomclegg.ca>
Date: Tue Dec 10 10:31:06 2019 -0500
15922: Fix incorrect routes.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at tomclegg.ca>
diff --git a/lib/controller/rpc/conn.go b/lib/controller/rpc/conn.go
index f4bc1733e..e432406d0 100644
--- a/lib/controller/rpc/conn.go
+++ b/lib/controller/rpc/conn.go
@@ -327,25 +327,25 @@ func (conn *Conn) UserUpdateUUID(ctx context.Context, options arvados.UpdateUUID
return resp, err
}
func (conn *Conn) UserMerge(ctx context.Context, options arvados.UserMergeOptions) (arvados.User, error) {
- ep := arvados.EndpointUserUpdateUUID
+ ep := arvados.EndpointUserMerge
var resp arvados.User
err := conn.requestAndDecode(ctx, &resp, ep, nil, options)
return resp, err
}
func (conn *Conn) UserActivate(ctx context.Context, options arvados.UserActivateOptions) (arvados.User, error) {
- ep := arvados.EndpointUserUpdateUUID
+ ep := arvados.EndpointUserActivate
var resp arvados.User
err := conn.requestAndDecode(ctx, &resp, ep, nil, options)
return resp, err
}
func (conn *Conn) UserSetup(ctx context.Context, options arvados.UserSetupOptions) (map[string]interface{}, error) {
- ep := arvados.EndpointUserUpdateUUID
+ ep := arvados.EndpointUserSetup
var resp map[string]interface{}
err := conn.requestAndDecode(ctx, &resp, ep, nil, options)
return resp, err
}
func (conn *Conn) UserUnsetup(ctx context.Context, options arvados.GetOptions) (arvados.User, error) {
- ep := arvados.EndpointUserUpdateUUID
+ ep := arvados.EndpointUserUnsetup
var resp arvados.User
err := conn.requestAndDecode(ctx, &resp, ep, nil, options)
return resp, err
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list