Skip to content

Commit 67b2fc0

Browse files
authored
Issue 107.dockter.1 (#108)
* #107 Modified Load() signature * #107 Savepoint * #107 Prepare for versioned release * #107 Update Senzing version of binaries in Dockerfile * #107 Prepare for versioned release * #107 Prepare for versioned release * #107 Prepare for versioned release
1 parent 26bd70e commit 67b2fc0

File tree

7 files changed

+82
-37
lines changed

7 files changed

+82
-37
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: build-docker-container.yaml
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
jobs:
8+
buildDockerContainer:
9+
name: Build Docker container
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v3
14+
with:
15+
fetch-depth: "0"
16+
- name: git config
17+
run: |
18+
git config user.name github-actions
19+
git config user.email [email protected]
20+
- name: Print environment variables
21+
run: printenv
22+
- name: Git Merge With Main
23+
run: git merge origin/main
24+
- name: Git Update submodules
25+
run: git submodule update --init --recursive
26+
- name: Build Docker container
27+
run: make docker-build

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010

1111
-
1212

13+
## [0.4.7] - 2023-05-26
14+
15+
### Changed in 0.4.7
16+
17+
- Modified Load() to match `g2-sdk-proto/go`
18+
- In Dockerfile, update Senzing binaries to 3.5.2
19+
- Update dependencies
20+
- github.com/senzing/g2-sdk-go v0.6.4
21+
- github.com/senzing/g2-sdk-go-base v0.2.0
22+
- github.com/senzing/g2-sdk-proto/go v0.0.0-20230526140633-b44eb0f20e1b
23+
1324
## [0.4.6] - 2023-05-19
1425

1526
### Changed in 0.4.6

Dockerfile

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ ARG IMAGE_FINAL=senzing/senzingapi-runtime:3.5.2
1010
# -----------------------------------------------------------------------------
1111

1212
FROM ${IMAGE_GO_BUILDER} as go_builder
13-
ENV REFRESHED_AT=2023-05-09
13+
ENV REFRESHED_AT=2023-05-26
1414
LABEL Name="senzing/serve-grpc-builder" \
1515
Maintainer="[email protected]" \
16-
Version="0.3.6"
16+
Version="0.4.6"
1717

1818
# Build arguments.
1919

@@ -24,8 +24,8 @@ ARG GO_PACKAGE_NAME="unknown"
2424

2525
# Copy remote files from DockerHub.
2626

27-
COPY --from=senzing/senzingapi-runtime:3.4.2 "/opt/senzing/g2/lib/" "/opt/senzing/g2/lib/"
28-
COPY --from=senzing/senzingapi-runtime:3.4.2 "/opt/senzing/g2/sdk/c/" "/opt/senzing/g2/sdk/c/"
27+
COPY --from=senzing/senzingapi-runtime:3.5.2 "/opt/senzing/g2/lib/" "/opt/senzing/g2/lib/"
28+
COPY --from=senzing/senzingapi-runtime:3.5.2 "/opt/senzing/g2/sdk/c/" "/opt/senzing/g2/sdk/c/"
2929

3030
# Copy local files from the Git repository.
3131

@@ -54,10 +54,10 @@ RUN mkdir -p /output \
5454
# -----------------------------------------------------------------------------
5555

5656
FROM ${IMAGE_FINAL} as final
57-
ENV REFRESHED_AT=2023-05-09
57+
ENV REFRESHED_AT=2023-05-26
5858
LABEL Name="senzing/serve-grpc" \
5959
Maintainer="[email protected]" \
60-
Version="0.3.6"
60+
Version="0.4.6"
6161

6262
# Copy files from repository.
6363

g2configserver/g2configserver.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,10 @@ func (server *G2ConfigServer) Load(ctx context.Context, request *g2pb.LoadReques
198198
defer func() { server.traceExit(22, request, err, time.Since(entryTime)) }()
199199
}
200200
g2config := getG2config()
201-
err = g2config.Load(ctx, uintptr(request.GetConfigHandle()), (request.GetJsonConfig()))
202-
response := g2pb.LoadResponse{}
201+
result, err := g2config.Load(ctx, request.GetJsonConfig())
202+
response := g2pb.LoadResponse{
203+
Result: int64(result),
204+
}
203205
return &response, err
204206
}
205207

g2configserver/g2configserver_test.go

+16-10
Original file line numberDiff line numberDiff line change
@@ -299,17 +299,24 @@ func TestG2configserver_Load(test *testing.T) {
299299
testError(test, ctx, g2config, err)
300300
printActual(test, responseFromSave.GetResult())
301301

302+
// Close.
303+
requestToClose := &g2pb.CloseRequest{
304+
ConfigHandle: responseFromCreate.GetResult(),
305+
}
306+
_, err = g2config.Close(ctx, requestToClose)
307+
testError(test, ctx, g2config, err)
308+
302309
// Load.
303310
requestToLoad := &g2pb.LoadRequest{
304-
ConfigHandle: responseFromCreate.GetResult(),
305-
JsonConfig: responseFromSave.GetResult(),
311+
JsonConfig: responseFromSave.GetResult(),
306312
}
307-
_, err = g2config.Load(ctx, requestToLoad)
313+
responseFromLoad, err := g2config.Load(ctx, requestToLoad)
308314
testError(test, ctx, g2config, err)
315+
printActual(test, responseFromLoad.GetResult())
309316

310317
// Close.
311-
requestToClose := &g2pb.CloseRequest{
312-
ConfigHandle: responseFromCreate.GetResult(),
318+
requestToClose = &g2pb.CloseRequest{
319+
ConfigHandle: responseFromLoad.GetResult(),
313320
}
314321
_, err = g2config.Close(ctx, requestToClose)
315322
testError(test, ctx, g2config, err)
@@ -503,15 +510,14 @@ func ExampleG2ConfigServer_Load() {
503510

504511
// Example
505512
request := &g2pb.LoadRequest{
506-
ConfigHandle: responseFromCreate.GetResult(),
507-
JsonConfig: responseFromSave.GetResult(),
513+
JsonConfig: responseFromSave.GetResult(),
508514
}
509-
response, err := g2config.Load(ctx, request)
515+
responseFromLoad, err := g2config.Load(ctx, request)
510516
if err != nil {
511517
fmt.Println(err)
512518
}
513-
fmt.Println(response)
514-
// Output:
519+
fmt.Println(responseFromLoad.GetResult() > 0)
520+
// Output: true
515521
}
516522

517523
func ExampleG2ConfigServer_Save() {

go.mod

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ go 1.20
44

55
require (
66
github.com/aquilax/truncate v1.0.0
7-
github.com/senzing/g2-sdk-go v0.6.3
8-
github.com/senzing/g2-sdk-go-base v0.1.11
9-
github.com/senzing/g2-sdk-proto/go v0.0.0-20230315125947-e4aea8f381eb
7+
github.com/senzing/g2-sdk-go v0.6.4
8+
github.com/senzing/g2-sdk-go-base v0.2.0
9+
github.com/senzing/g2-sdk-proto/go v0.0.0-20230526140633-b44eb0f20e1b
1010
github.com/senzing/go-common v0.1.3
1111
github.com/senzing/go-logging v1.2.5
1212
github.com/senzing/go-observing v0.2.5
@@ -26,7 +26,7 @@ require (
2626
github.com/inconshreveable/mousetrap v1.1.0 // indirect
2727
github.com/magiconair/properties v1.8.7 // indirect
2828
github.com/mitchellh/mapstructure v1.5.0 // indirect
29-
github.com/pelletier/go-toml/v2 v2.0.7 // indirect
29+
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
3030
github.com/pmezard/go-difflib v1.0.0 // indirect
3131
github.com/russross/blackfriday/v2 v2.1.0 // indirect
3232
github.com/senzing/go-messaging v0.2.1 // indirect
@@ -35,11 +35,11 @@ require (
3535
github.com/spf13/jwalterweatherman v1.1.0 // indirect
3636
github.com/spf13/pflag v1.0.5 // indirect
3737
github.com/subosito/gotenv v1.4.2 // indirect
38-
golang.org/x/exp v0.0.0-20230519143937-03e91628a987 // indirect
38+
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect
3939
golang.org/x/net v0.10.0 // indirect
4040
golang.org/x/sys v0.8.0 // indirect
4141
golang.org/x/text v0.9.0 // indirect
42-
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
42+
google.golang.org/genproto/googleapis/rpc v0.0.0-20230526161137-0005af68ea54 // indirect
4343
google.golang.org/protobuf v1.30.0 // indirect
4444
gopkg.in/ini.v1 v1.67.0 // indirect
4545
gopkg.in/yaml.v3 v3.0.1 // indirect

go.sum

+12-13
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0V
145145
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
146146
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
147147
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
148-
github.com/pelletier/go-toml/v2 v2.0.7 h1:muncTPStnKRos5dpVKULv2FVd4bMOhNePj9CjgDb8Us=
149-
github.com/pelletier/go-toml/v2 v2.0.7/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek=
148+
github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ=
149+
github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4=
150150
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
151151
github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg=
152152
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
@@ -156,12 +156,12 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
156156
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
157157
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
158158
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
159-
github.com/senzing/g2-sdk-go v0.6.3 h1:aW8373Xb5kChHE+0ufB0VW8cqyEho1aCFDptWrIYDag=
160-
github.com/senzing/g2-sdk-go v0.6.3/go.mod h1:VLmAQ8qHT6FmSmFrI0sLLmIfkeH1oj6YIgxBakZJAaM=
161-
github.com/senzing/g2-sdk-go-base v0.1.11 h1:r5RQVmvpFjlNaHZKuJWQ0rWpTF71BanJaYKDqsWsazQ=
162-
github.com/senzing/g2-sdk-go-base v0.1.11/go.mod h1:NcwdqMjJo+lm+7iV4DSHZehhpQ/+eNfZa8ihh1dfb/E=
163-
github.com/senzing/g2-sdk-proto/go v0.0.0-20230315125947-e4aea8f381eb h1:ig302ScN/Z1u0Qv0ZAYxXrzGaZCpvCdfE/wwZuCIykM=
164-
github.com/senzing/g2-sdk-proto/go v0.0.0-20230315125947-e4aea8f381eb/go.mod h1:RZR2aUAtCQsllrxNhYAs3WlHJOdHWcBDwylqg16HvI4=
159+
github.com/senzing/g2-sdk-go v0.6.4 h1:UV9Hw0VB60V+QimFPQcWoSKBhA3FxR/NqknLaIkGpys=
160+
github.com/senzing/g2-sdk-go v0.6.4/go.mod h1:lJx9lIlhTdGo2V866elaeD7gsszddcNfo31oNHILKZA=
161+
github.com/senzing/g2-sdk-go-base v0.2.0 h1:WBIGbI7UMB8CSStniC/yZ8qxibAAMbXd+7iKC6i/z0s=
162+
github.com/senzing/g2-sdk-go-base v0.2.0/go.mod h1:X3sgd0PeZfDH9qf2Wjf/ppkpRmPaHrTrkhQp3hit9OQ=
163+
github.com/senzing/g2-sdk-proto/go v0.0.0-20230526140633-b44eb0f20e1b h1:zWttCLzWpKY1KWJETfUuAWJ3NSpPgCZuFtA3Xv+Edv0=
164+
github.com/senzing/g2-sdk-proto/go v0.0.0-20230526140633-b44eb0f20e1b/go.mod h1:xAllYm5U1m8CBnK7pkn3CZ87kd3nXxEfGt2Wims4+Ic=
165165
github.com/senzing/go-common v0.1.3 h1:vWNjO4m4HcJOO3J/2Fh50wDUJv7YcC1XoNPOr+yifbg=
166166
github.com/senzing/go-common v0.1.3/go.mod h1:kYxtQ5t4XI/OfBbx6ySs9jlQqjCKUvalNlBv2zakllw=
167167
github.com/senzing/go-logging v1.2.5 h1:BHiX2TGfRWP7esffDWEESTsqyc5lfcktRZHaiJEHHs8=
@@ -193,7 +193,6 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5
193193
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
194194
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
195195
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
196-
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
197196
github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY=
198197
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
199198
github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8=
@@ -225,8 +224,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0
225224
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
226225
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
227226
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
228-
golang.org/x/exp v0.0.0-20230519143937-03e91628a987 h1:3xJIFvzUFbu4ls0BTBYcgbCGhA63eAOEMxIHugyXJqA=
229-
golang.org/x/exp v0.0.0-20230519143937-03e91628a987/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w=
227+
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc=
228+
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w=
230229
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
231230
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
232231
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
@@ -468,8 +467,8 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D
468467
google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
469468
google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
470469
google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
471-
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A=
472-
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU=
470+
google.golang.org/genproto/googleapis/rpc v0.0.0-20230526161137-0005af68ea54 h1:wQvmPUaH4JVFCzNAL9ShNjezVoq3OhlinNMLYSAN9Vg=
471+
google.golang.org/genproto/googleapis/rpc v0.0.0-20230526161137-0005af68ea54/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA=
473472
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
474473
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
475474
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=

0 commit comments

Comments
 (0)