Skip to content

Commit

Permalink
Merge pull request #15 from SolaceDev/dev
Browse files Browse the repository at this point in the history
Release v1.5.0
  • Loading branch information
cjwmorgan-sol authored Jan 22, 2024
2 parents 339b370 + 1907c77 commit a0760fb
Show file tree
Hide file tree
Showing 189 changed files with 2,493 additions and 1,354 deletions.
32 changes: 30 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,32 @@ on: [push, pull_request, workflow_dispatch]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
# This workflow contains multiple jobs
# this job sets up the oldest version of go to check lang compatibility
CompatibilityCheck:
runs-on: ubuntu-20.04
#Steps for the compatiblity test
steps:
- uses: actions/checkout@v2
- name: Setup Go Environment
uses: actions/setup-go@v4
with:
go-version: '1.17.0'
- name: Check Go Version
run: go version
- name: Compiles
run: go build ./...
- name: Runs unit tests
if: ${{ success() }}
run: go test -coverprofile ./unitcoverage.out ./...
- name: Uploads artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
path: |
./unitcoverage.out
# this job runs linux based tests
Linux:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
Expand All @@ -17,7 +42,10 @@ jobs:
- name: Setup Go environment
uses: actions/[email protected]
with:
go-version: '1.20'
go-version: '1.21'
check-latest: true
- name: Check Go Version
run: go version
- name: Compiles
run: go build ./...

Expand Down
30 changes: 26 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// pubsubplus-go-client
//
// Copyright 2021-2023 Solace Corporation. All rights reserved.
// Copyright 2021-2024 Solace Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -22,6 +22,28 @@ currentBuild.rawBuild.getParent().setQuietPeriod(0)

library 'jenkins-pipeline-library@main'

stage('Build') {
builder.goapi()
}
/*
Go Version examples:
auto-v1.17.x: Latest patch of 1.17 release
auto-v1.17.2: Specific patch of 1.17 release
auto-v1.17.0: First release of 1.17 (Despite go versioning this as 1.17)
auto-latest: Most recent patch version of latest minor release
auto-previous: Most recent patch version of previous minor release
auto-2previous: Most recent patch version of second last minor release
Adoption of new versions into these may be delayed.
*/

builder.goapi([
"buildCheckGoVer": 'auto-v1.17.x',
"validationGoVer": 'auto-v1.17.x',
"getTestPermutations": {
List<List<String>> permutations = []
for (platform in [builder.LINUX_ARM, builder.LINUX_X86_64, builder.LINUX_MUSL, builder.DARWIN_X86_64, builder.DARWIN_ARM]) {
for (gover in ['auto-latest', 'auto-previous']) {
permutations << [platform, gover]
}
}
return permutations
}
])
2 changes: 1 addition & 1 deletion NOTICE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pubsubplus-go-client

Copyright 2021-2023 Solace Corporation. All rights reserved.
Copyright 2021-2024 Solace Corporation. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ https://solace.com/support
- The [Solace Developer Portal](https://dev.solace.com)
- Understanding [Solace technology](https://solace.com/products/tech/)

Copyright 2021-2023 Solace Corporation. All rights reserved.
Copyright 2021-2024 Solace Corporation. All rights reserved.
2 changes: 1 addition & 1 deletion doc.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// pubsubplus-go-client
//
// Copyright 2021-2023 Solace Corporation. All rights reserved.
// Copyright 2021-2024 Solace Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion internal/ccsmp/ccsmp_callbacks.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// pubsubplus-go-client
//
// Copyright 2021-2023 Solace Corporation. All rights reserved.
// Copyright 2021-2024 Solace Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion internal/ccsmp/ccsmp_container.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// pubsubplus-go-client
//
// Copyright 2021-2023 Solace Corporation. All rights reserved.
// Copyright 2021-2024 Solace Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion internal/ccsmp/ccsmp_core.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// pubsubplus-go-client
//
// Copyright 2021-2023 Solace Corporation. All rights reserved.
// Copyright 2021-2024 Solace Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion internal/ccsmp/ccsmp_endpoint_prop_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/ccsmp/ccsmp_flow.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// pubsubplus-go-client
//
// Copyright 2021-2023 Solace Corporation. All rights reserved.
// Copyright 2021-2024 Solace Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion internal/ccsmp/ccsmp_flow_event_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion internal/ccsmp/ccsmp_flow_prop_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/ccsmp/ccsmp_generate.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// pubsubplus-go-client
//
// Copyright 2021-2023 Solace Corporation. All rights reserved.
// Copyright 2021-2024 Solace Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion internal/ccsmp/ccsmp_global_prop_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/ccsmp/ccsmp_helper.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// pubsubplus-go-client
//
// Copyright 2021-2023 Solace Corporation. All rights reserved.
// Copyright 2021-2024 Solace Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions internal/ccsmp/ccsmp_helper.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// pubsubplus-go-client
//
// Copyright 2021-2023 Solace Corporation. All rights reserved.
// Copyright 2021-2024 Solace Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -49,4 +49,4 @@ typedef struct solClient_errorInfo_wrapper
void *
uintptr_to_void_p(solClient_uint64_t ptr);

#endif
#endif
2 changes: 1 addition & 1 deletion internal/ccsmp/ccsmp_log_level_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions internal/ccsmp/ccsmp_message.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// pubsubplus-go-client
//
// Copyright 2021-2023 Solace Corporation. All rights reserved.
// Copyright 2021-2024 Solace Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -538,8 +538,8 @@ func SolClientMessageSetTimeToLive(messageP SolClientMessagePt, timeToLive int64

// Utility functions

const defaultMsgDumpBufferSize = 1000
const msgDumpMultiplier = 5
// Set the default message dump buffer size to accommodate
// the Distributed Tracing properties in the message dump, SOL-107974
const maxDumpSize = 10000

// SolClientMessageDump function
Expand Down Expand Up @@ -587,11 +587,9 @@ func SolClientMessageDump(messageP SolClientMessagePt) string {
}
}

bufferSize := C.ulong(defaultMsgDumpBufferSize + payloadSize*msgDumpMultiplier)
// Truncate the message after 10,000 characters, SOL-62945
if bufferSize > maxDumpSize {
bufferSize = maxDumpSize
}
// removed the dynamic calculation of buffer size as defaultMsgDumpBufferSize{1000} + (payloadSize * msgDumpMultiplier{5})
bufferSize := C.ulong(maxDumpSize)
buffer := (*C.char)(C.malloc(bufferSize))
defer C.free(unsafe.Pointer(buffer))

Expand Down
Loading

0 comments on commit a0760fb

Please sign in to comment.