Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client.Update does not prune immutable fields #203

Closed
dave-tucker opened this issue Jul 16, 2021 · 0 comments · Fixed by #210
Closed

client.Update does not prune immutable fields #203

dave-tucker opened this issue Jul 16, 2021 · 0 comments · Fixed by #210
Assignees

Comments

@dave-tucker
Copy link
Collaborator

// update many fields
bridgeRow.UUID = uuid
bridgeRow.ExternalIds["baz"] = "foobar"
bridgeRow.OtherConfig = map[string]string{"foo": "bar"}
ops, err = suite.client.Where(bridgeRow).Update(bridgeRow)
require.NoError(suite.T(), err)
reply, err = suite.client.Transact(ops...)
require.NoError(suite.T(), err)
opErrs, err := ovsdb.CheckOperationResults(reply, ops)
require.NoErrorf(suite.T(), err, "%+v", opErrs)

Fails with an error:

=== RUN   TestOVSIntegrationTestSuite/TestUpdate
    ovs_integration_test.go:507: 
                Error Trace:    ovs_integration_test.go:507
                Error:          Received unexpected error:
                                1 ovsdb operations failed
                Test:           TestOVSIntegrationTestSuite/TestUpdate
                Messages:       [constraint violation: Cannot update immutable column name in table Bridge.]

The immutable fields should be removed before from the ovsdb.Row before it's sent to the server

dave-tucker added a commit to dave-tucker/libovsdb that referenced this issue Aug 3, 2021
Fixes: ovn-org#203

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
dave-tucker added a commit to dave-tucker/libovsdb that referenced this issue Aug 18, 2021
Fixes: ovn-org#203

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
dave-tucker added a commit to dave-tucker/libovsdb that referenced this issue Oct 1, 2021
Fixes: ovn-org#203

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants