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

Release/2.8.1 #54

Open
wants to merge 36 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
3914c58
adding 0-padding for microseconds of timestamp in logging.h
stephen-dixon Sep 11, 2024
f5b818b
fixing initial fatclient errors trying to get help::help working thro…
stephen-dixon Oct 30, 2024
5730aef
Update github actions workflow versions and pypa/cibuildwheel
adam-parker1 Nov 20, 2024
12afedb
Add macos-15 to the build-platforms
adam-parker1 Nov 20, 2024
66220ce
Adding chunk downloading to BYTES plugin.
jholloc Dec 9, 2024
b5b35db
Not closing file in readBytesNonOptimally.cpp
jholloc Dec 9, 2024
ecf2f20
Bumping protocol version to 10 - CAPNP data is now transferred as raw…
jholloc Dec 10, 2024
f5399bd
Undoing change to client protocol version for now.
jholloc Dec 10, 2024
ace4f64
Fixing bug and reverting back to protocol 10 in client.
jholloc Dec 10, 2024
3939176
fixing issues with using UDA_TYPE_OPAQUE for returning binary data
stephen-dixon Dec 11, 2024
4a18275
Update client_installation.md: add libtirpc-dev dependency for ubuntu…
maarten-ic Dec 13, 2024
e59c0a0
Making sending BYTES plugin using xdr_opaque an option so that it wor…
jholloc Dec 13, 2024
46e236f
Updating pyuda get_file to use opaque option.
jholloc Dec 13, 2024
0acbd55
removing macos15 runner from pyuda wheels CI script
stephen-dixon Dec 16, 2024
84bad21
Merge branch '35-missing-leading-0-in-fractions-of-seconds' into develop
stephen-dixon Dec 16, 2024
5620fc1
Merge branch 'feature/fat-client' into develop
stephen-dixon Dec 16, 2024
5a8a783
trying to fix windows and mac wheel builds
stephen-dixon Dec 16, 2024
c1d4efc
Updating pyuda get_file to download files as 'opaque' type as to down…
jholloc Dec 16, 2024
b5408f5
trying to fix windows and mac wheel builds
stephen-dixon Dec 16, 2024
f497848
trying to fix windows and mac wheel builds
stephen-dixon Dec 16, 2024
ccedce6
trying to fix the macos pyuda wheel CI build
stephen-dixon Dec 16, 2024
5e899cc
trying to fix the macos pyuda wheel CI build
stephen-dixon Dec 16, 2024
b1485a9
trying to fix the macos pyuda wheel CI build
stephen-dixon Dec 16, 2024
336a6c2
trying to fix the macos pyuda wheel CI build
stephen-dixon Dec 16, 2024
9722f45
trying to fix the macos pyuda wheel CI build
stephen-dixon Dec 17, 2024
22b254e
removing python3.13 from macos wheels build due to numpy errors
stephen-dixon Dec 17, 2024
a205aa6
Merge branch 'feature/bytes_plugin' into develop
stephen-dixon Dec 17, 2024
310a5ae
Merge branch 'feature/update-wheel-actions-versions' into develop
stephen-dixon Dec 17, 2024
dbe1873
trying to add python3.13 build for macos pyuda wheels
stephen-dixon Dec 17, 2024
3568e76
removing failing python3.13 build from macos pyuda wheels
stephen-dixon Dec 17, 2024
63cf47f
Merge branch 'feature/bytes_plugin' into release/2.8.1
stephen-dixon Dec 17, 2024
6c29bc6
adding automatic plugin versioning to bytes plugin and moving CI to u…
stephen-dixon Dec 18, 2024
fa766b3
adding missing includes from updated bytes plugin
stephen-dixon Dec 18, 2024
7aab323
adding missing includes from updated bytes plugin
stephen-dixon Dec 18, 2024
253b09a
fixing minor typo in bytes plugin
stephen-dixon Dec 18, 2024
51d0c12
removing some c-style casts in bytes plugin
stephen-dixon Dec 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 21 additions & 15 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ jobs:
# which are only executed on push to tag.
# Test wheels are also generated for the other platforms (and uploaded to testpypi)
# on pushes to release branches and to main
- [ubuntu-latest, x86_64, manylinux2014_x86_64]
- [ubuntu-latest, x86_64, manylinux_2_28_x86_64]
- [ubuntu-latest, aarch64, manylinux_2_28_aarch64]
- [macos-13, x86_64, macosx_x86_64]
- [macos-14, arm64, macosx_arm64]
- [windows-latest, AMD64, win_amd64]
- [ubuntu-latest, x86_64, manylinux2014_x86_64, 0.0]
- [ubuntu-latest, x86_64, manylinux_2_28_x86_64, 0.0]
- [ubuntu-latest, aarch64, manylinux_2_28_aarch64, 0.0]
- [macos-13, x86_64, macosx_x86_64, 13.0]
- [macos-14, arm64, macosx_arm64, 14.0]
- [windows-latest, AMD64, win_amd64, 0.0]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# need git tags available for setuptools_scm to grab tags
with:
fetch-depth: 0

- uses: actions/github-script@v6
- uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
Expand Down Expand Up @@ -107,15 +107,15 @@ jobs:

- name: build windows wheels
if: runner.OS == 'Windows'
uses: pypa/cibuildwheel@v2.17.0
uses: pypa/cibuildwheel@v2.22.0
with:
package-dir: ${{github.workspace}}/install/python_installer
config-file: ${{github.workspace}}/install/python_installer/pyproject.toml
env:
CIBW_ARCHS: ${{matrix.build-platform[1]}}
CIBW_PLATFORM: windows
CIBW_BUILD: cp3*-${{matrix.build-platform[2]}}
CIBW_SKIP: cp36* cp37*
CIBW_SKIP: cp36* cp37* cp313*
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel} --add-path ${{github.workspace}}/install/lib"
CIBW_BEFORE_BUILD_WINDOWS: "pip install delvewheel"

Expand All @@ -125,7 +125,7 @@ jobs:
startswith(matrix.build-platform[2], 'manylinux2014') &&
github.event_name == 'push' &&
startsWith(github.ref, 'refs/tags/')
uses: pypa/cibuildwheel@v2.17.0
uses: pypa/cibuildwheel@v2.22.0
with:
package-dir: ./source/wrappers/python
config-file: ./source/wrappers/python/pyproject.toml
Expand Down Expand Up @@ -176,7 +176,7 @@ jobs:
startswith(matrix.build-platform[2], 'manylinux_2_28') &&
! ( startswith(matrix.build-platform[1], 'aarch64') &&
!startsWith(github.ref, 'refs/tags/') )
uses: pypa/cibuildwheel@v2.17.0
uses: pypa/cibuildwheel@v2.22.0
with:
package-dir: ./source/wrappers/python
config-file: ./source/wrappers/python/pyproject.toml
Expand All @@ -189,7 +189,7 @@ jobs:
CIBW_BEFORE_ALL: >
dnf update -y &&
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm &&
dnf install -y boost-devel openssl-devel libxml2-devel libtirpc-devel
dnf install -y boost1.78-devel openssl-devel libxml2-devel libtirpc-devel
fmt fmt-devel spdlog spdlog-devel capnproto capnproto-devel &&
cd /project &&
cmake -B build
Expand All @@ -203,6 +203,10 @@ jobs:

- name: build uda on macos
if: runner.os == 'macOS'
# note: it's recommended in cibuildwheel to build all deps from source in macos
# instead of using homebrew as this way the wheel will be back-compatible with
# other macos versions. MACOSX_DEPLOYMENT_TARGET will no longer be required if
# this change is made.
run: >
brew update-reset && brew install
git
Expand All @@ -222,18 +226,20 @@ jobs:
-DCMAKE_INSTALL_PREFIX=$PWD/install
-DCLIENT_ONLY=ON &&
cmake --build build -j --config Release --target install &&
cp -r $PWD/install/python_installer/* ${{github.workspace}}/source/wrappers/python/
cp -r $PWD/install/python_installer/* ${{github.workspace}}/source/wrappers/python/

- name: Build macos wheels
if: runner.os == 'macOS'
uses: pypa/cibuildwheel@v2.17.0
uses: pypa/cibuildwheel@v2.22.0
with:
package-dir: ./source/wrappers/python
config-file: ./source/wrappers/python/pyproject.toml
env:
CIBW_ARCHS: ${{matrix.build-platform[1]}}
CIBW_PLATFORM: macos
CIBW_SKIP: cp313*
CIBW_BUILD: cp*-${{matrix.build-platform[2]}}
MACOSX_DEPLOYMENT_TARGET: ${{matrix.build-platform[3]}}

- uses: actions/upload-artifact@v4
with:
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-22.04, windows-latest, macos-latest]
release: [Release]
ssl: [ON, OFF]
client-only: [ON, OFF]
capnp: [ON, OFF]
exclude:
- os: windows-latest
client-only: OFF
- os: ubuntu-latest
- os: ubuntu-22.04
client-only: ON
- os: macos-latest
client-only: ON
Expand All @@ -47,7 +47,7 @@ jobs:
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');

- name: Install linux dependencies
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-22.04'
run: >
sudo apt update && sudo apt install -y
git
Expand All @@ -67,7 +67,7 @@ jobs:
python3-venv

- name: Install Intel compiler
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-22.04'
run: >
sudo apt install -y wget &&
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB &&
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
spdlog

- name: Configure CMake (linux)
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-22.04'
run: >
cmake -G Ninja -B build
-DBUILD_SHARED_LIBS=ON
Expand All @@ -125,7 +125,7 @@ jobs:
-DENABLE_CAPNP=${{ matrix.capnp }}

- name: Configure CMake (linux Intel)
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-22.04'
run: >
source /opt/intel/oneapi/setvars.sh &&
CXX=icpx CC=icx cmake -G Ninja -B build-intel
Expand Down Expand Up @@ -176,7 +176,7 @@ jobs:
run: cmake --build build --config ${{ matrix.release }}

- name: Build Intel
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-22.04'
run: cmake --build build-intel --config ${{ matrix.release }}

- name: Install
Expand All @@ -188,7 +188,7 @@ jobs:
run: cmake --install build --config ${{ matrix.release }}

- name: Install pyuda
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-22.04'
run: >
cp -r /usr/local/python_installer ${{github.workspace}}/python_installer &&
python3 -m venv ${{github.workspace}}/venv &&
Expand All @@ -198,13 +198,13 @@ jobs:
pip3 install ${{github.workspace}}/python_installer

- name: Test pyuda import
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-22.04'
run: >
source ${{github.workspace}}/venv/bin/activate &&
python3 -c 'import pyuda; client=pyuda.Client()'

- name: Run non-SSL system tests
if: matrix.os == 'ubuntu-latest' && matrix.ssl == 'OFF'
if: matrix.os == 'ubuntu-22.04' && matrix.ssl == 'OFF'
run: >
sudo cp /usr/local/etc/uda.socket /usr/local/etc/uda@.service /etc/systemd/system &&
sudo systemctl start uda.socket &&
Expand All @@ -216,7 +216,7 @@ jobs:
./build/test/plugins/plugin_test_testplugin

- name: Run SSL system tests
if: matrix.os == 'ubuntu-latest' && matrix.ssl == 'ON'
if: matrix.os == 'ubuntu-22.04' && matrix.ssl == 'ON'
run: >
sudo cp /usr/local/etc/uda.socket /usr/local/etc/uda@.service /etc/systemd/system &&
sudo chown -R $USER:$USER /usr/local/etc &&
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required( VERSION 3.0 )
cmake_minimum_required( VERSION 3.12 )

########################################################################################################################
# Macro used to convert Windows path to Unix
Expand Down
1 change: 1 addition & 0 deletions docs/client_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Install dependencies from system package manager.
```sh
sudo apt update && sudo apt install -y \
git \
libtirpc-dev \
libboost-dev \
libboost-program-options-dev \
libssl-dev \
Expand Down
1 change: 1 addition & 0 deletions source/cache/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ set( SRC_FILES

include_directories(
${OPENSSL_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
${Boost_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/source
${LIBXML2_INCLUDE_DIR}
Expand Down
2 changes: 2 additions & 0 deletions source/client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
find_package( OpenSSL REQUIRED )
find_package( fmt REQUIRED )
find_package( LibXml2 REQUIRED )
find_package( Boost REQUIRED )

if( WIN32 OR MINGW )
find_package( XDR REQUIRED )
Expand Down Expand Up @@ -75,6 +76,7 @@ include_directories(
${OPENSSL_INCLUDE_DIR}
${LIBXML2_INCLUDE_DIR}
${fmt_SOURCE_DIR}/include
${Boost_INCLUDE_DIRS}
)

add_library( client-objects OBJECT ${SRC_FILES} ${HEADER_FILES} )
Expand Down
4 changes: 3 additions & 1 deletion source/client/udaClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#if !defined(FATCLIENT) || !defined(NOLIBMEMCACHED)
//static int protocol_version = 9;
#endif
int client_version = 9; // previous version
int client_version = 10; // previous version

//----------------------------------------------------------------------------------------------------------------------
// FATCLIENT objects shared with server code
Expand Down Expand Up @@ -1042,6 +1042,8 @@ int idamClient(REQUEST_BLOCK* request_block, int* indices)
}

printDataBlock(*data_block);
data_received = true;
data_block_indices[i] = data_block_idx;
}

#endif // <========================== End of FatClient Code Only
Expand Down
2 changes: 2 additions & 0 deletions source/client2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
find_package( OpenSSL REQUIRED )
find_package( LibXml2 REQUIRED )
find_package( fmt REQUIRED )
find_package( Boost REQUIRED )

if( WIN32 OR MINGW )
find_package( XDR REQUIRED )
Expand Down Expand Up @@ -73,6 +74,7 @@ include_directories(
${OPENSSL_INCLUDE_DIR}
${LIBXML2_INCLUDE_DIR}
${fmt_SOURCE_DIR}/include
${Boost_INCLUDE_DIRS}
)

add_library( client2-objects OBJECT ${SRC_FILES} ${HEADER_FILES} )
Expand Down
2 changes: 2 additions & 0 deletions source/clientserver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ find_package( fmt REQUIRED )
if( NOT CLIENT_ONLY )
find_package( LibXml2 REQUIRED )
endif()
find_package( Boost REQUIRED )

if( WIN32 OR MINGW )
find_package( XDR REQUIRED )
Expand Down Expand Up @@ -105,6 +106,7 @@ include_directories(
${OPENSSL_INCLUDE_DIR}
${LIBXML2_INCLUDE_DIR}
${fmt_SOURCE_DIR}/include
${Boost_INCLUDE_DIRS}
)

if( MINGW OR WIN32 )
Expand Down
4 changes: 2 additions & 2 deletions source/clientserver/protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ int protocol(XDR* xdrs, int protocol_id, int direction, int* token, LOGMALLOCLIS

if ((err = allocData(data_block)) != 0) break; // Allocate Heap Memory

if (!xdr_data_block2(xdrs, data_block)) {
if (!xdr_data_block2(xdrs, data_block, protocolVersion)) {
err = UDA_PROTOCOL_ERROR_62;
break;
}
Expand Down Expand Up @@ -309,7 +309,7 @@ int protocol(XDR* xdrs, int protocol_id, int direction, int* token, LOGMALLOCLIS
break;
}

if (!xdr_data_block2(xdrs, data_block)) {
if (!xdr_data_block2(xdrs, data_block, protocolVersion)) {
err = UDA_PROTOCOL_ERROR_62;
break;
}
Expand Down
4 changes: 2 additions & 2 deletions source/clientserver/protocol2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ static int handle_data_block(XDR* xdrs, int direction, const void* str, int prot

if ((err = allocData(data_block)) != 0) break; // Allocate Heap Memory

if (!xdr_data_block2(xdrs, data_block)) {
if (!xdr_data_block2(xdrs, data_block, protocolVersion)) {
err = UDA_PROTOCOL_ERROR_62;
break;
}
Expand Down Expand Up @@ -838,7 +838,7 @@ static int handle_data_block(XDR* xdrs, int direction, const void* str, int prot
break;
}

if (!xdr_data_block2(xdrs, data_block)) {
if (!xdr_data_block2(xdrs, data_block, protocolVersion)) {
err = UDA_PROTOCOL_ERROR_62;
break;
}
Expand Down
4 changes: 3 additions & 1 deletion source/clientserver/udaTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ size_t getSizeOf(UDA_TYPE data_type)
return sizeof(DCOMPLEX);
case UDA_TYPE_CAPNP:
return sizeof(char);
case UDA_TYPE_OPAQUE:
return sizeof(char);
default:
return 0;
}
Expand Down Expand Up @@ -78,4 +80,4 @@ size_t getPtrSizeOf(UDA_TYPE data_type)
default:
return 0;
}
}
}
10 changes: 8 additions & 2 deletions source/clientserver/xdrlib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ bool_t xdr_data_block1(XDR* xdrs, DATA_BLOCK* str, int protocolVersion)
return rc;
}

bool_t xdr_data_block2(XDR* xdrs, DATA_BLOCK* str)
bool_t xdr_data_block2(XDR* xdrs, DATA_BLOCK* str, int protocolVersion)
{
switch (str->data_type) {
case UDA_TYPE_FLOAT:
Expand Down Expand Up @@ -662,7 +662,13 @@ bool_t xdr_data_block2(XDR* xdrs, DATA_BLOCK* str)
return 1; // Nothing to send so retain good return code

case UDA_TYPE_CAPNP:
return xdr_vector(xdrs, str->data, (u_int)str->data_n, sizeof(char), (xdrproc_t)xdr_char);
if (protocolVersion >= 10) {
return xdr_opaque(xdrs, str->data, (u_int)str->data_n * sizeof(char));
} else {
return xdr_vector(xdrs, str->data, (u_int)str->data_n, sizeof(char), (xdrproc_t)xdr_char);
}
case UDA_TYPE_OPAQUE:
return xdr_opaque(xdrs, str->data, (u_int)str->data_n * sizeof(char));

default:
return 0;
Expand Down
2 changes: 1 addition & 1 deletion source/clientserver/xdrlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ bool_t xdr_putdata_block1(XDR* xdrs, PUTDATA_BLOCK* str);
bool_t xdr_putdata_block2(XDR* xdrs, PUTDATA_BLOCK* str);
bool_t xdr_data_block_list(XDR* xdrs, DATA_BLOCK_LIST* str, int protocolVersion);
bool_t xdr_data_block1(XDR* xdrs, DATA_BLOCK* str, int protocolVersion);
bool_t xdr_data_block2(XDR* xdrs, DATA_BLOCK* str);
bool_t xdr_data_block2(XDR* xdrs, DATA_BLOCK* str, int protocolVersion);
bool_t xdr_data_block3(XDR* xdrs, DATA_BLOCK* str);
bool_t xdr_data_block4(XDR* xdrs, DATA_BLOCK* str);
bool_t xdr_data_dim1(XDR* xdrs, DATA_BLOCK* str);
Expand Down
2 changes: 1 addition & 1 deletion source/logging/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
strftime(uix_buf, 30, "%Y:%m:%dT%H:%M:%S", uix_tm);
# define uix_printtime() { \
UIX_DEFINETIME \
printf("%s.%dZ, ", uix_buf,(int32_t)uix_tmnow.tv_usec); \
printf("%s.%06dZ, ", uix_buf,(int32_t)uix_tmnow.tv_usec); \
}
# define UDA_LOG(LEVEL, FMT, ...) do{ if (LEVEL >= udaGetLogLevel()) {UIX_DEFINETIME udaLog(LEVEL, "%s.%dZ, %s:%d >> " FMT, uix_buf, (int32_t)uix_tmnow.tv_usec, basename((char *)__FILE__), __LINE__, ##__VA_ARGS__); }} while(0)
#endif
Expand Down
1 change: 1 addition & 0 deletions source/plugins/bytes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ uda_plugin(
EXAMPLE "BYTES::read()"
LIBNAME bytes_plugin
SOURCES bytesPlugin.cpp readBytesNonOptimally.cpp md5Sum.cpp
CONFIG_FILE bytesPlugin.cfg
EXTRA_INCLUDE_DIRS
${LIBXML2_INCLUDE_DIR}
EXTRA_LINK_LIBS
Expand Down
1 change: 1 addition & 0 deletions source/plugins/bytes/bytesPlugin.cfg.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export UDA_BYTES_PLUGIN_ALLOWED_PATHS=
Loading
Loading