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

HPCC-30610 Include the tagging timestamp in the WUCheckFeatures response #17947

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions build-config.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@
#define BUILD_VERSION_POINT ${HPCC_POINT}
#endif

#ifndef BUILD_MATURITY
#define BUILD_MATURITY "${HPCC_MATURITY}"
#endif

#ifndef BUILD_TAG_TIMESTAMP
#define BUILD_TAG_TIMESTAMP "${HPCC_TAG_TIMESTAMP}"
#endif

#ifndef BASE_BUILD_TAG
#cmakedefine BASE_BUILD_TAG "${BASE_BUILD_TAG}"
#endif
Expand Down
7 changes: 7 additions & 0 deletions esp/scm/ws_workunits_req_resp.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,7 @@ ESPresponse [exceptions_inline] WUCreateZAPInfoResponse

ESPrequest [nil_remove] WUCheckFeaturesRequest
{
boolean IncludeFullVersion(false);
};

ESPresponse [exceptions_inline] WUCheckFeaturesResponse
Expand All @@ -945,6 +946,12 @@ ESPresponse [exceptions_inline] WUCheckFeaturesResponse
int BuildVersionPoint;
unsigned maxRequestEntityLength;
ESPStruct DeploymentFeatures Deployment;
//The following fields are only generated if IncludeFullVersion is set. Normally the fields would be versioned,
//but this change is applied to a much earlier version and the version number has been incremented several times,
//so that approach cannot be used.
string BuildVersion;
string BuildMaturity;
string BuildTagTimestamp;
};

ESPrequest [nil_remove] WUGetStatsRequest
Expand Down
7 changes: 7 additions & 0 deletions esp/services/ws_workunits/ws_workunitsService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5068,6 +5068,13 @@ bool CWsWorkunitsEx::onWUCheckFeatures(IEspContext &context, IEspWUCheckFeatures
resp.setBuildVersionMajor(hpccBuildInfo.buildVersionMajor);
resp.setBuildVersionMinor(hpccBuildInfo.buildVersionMinor);
resp.setBuildVersionPoint(hpccBuildInfo.buildVersionPoint);
//This does not check version because a consistent version could not be used for all the places it was included
if (req.getIncludeFullVersion())
{
resp.setBuildVersion(hpccBuildInfo.buildTag);
resp.setBuildMaturity(hpccBuildInfo.buildMaturity);
resp.setBuildTagTimestamp(hpccBuildInfo.buildTagTimestamp);
}
resp.setMaxRequestEntityLength(maxRequestEntityLength);
resp.updateDeployment().setUseCompression(true);
return true;
Expand Down
2 changes: 2 additions & 0 deletions system/jlib/jutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ static void initBuildVars()
hpccBuildInfo.buildVersionMinor = BUILD_VERSION_MINOR;
hpccBuildInfo.buildVersionPoint = BUILD_VERSION_POINT;
hpccBuildInfo.buildVersion = estringify(BUILD_VERSION_MAJOR) "." estringify(BUILD_VERSION_MINOR) "." estringify(BUILD_VERSION_POINT);
hpccBuildInfo.buildMaturity = BUILD_MATURITY;
hpccBuildInfo.buildTagTimestamp = BUILD_TAG_TIMESTAMP;

hpccBuildInfo.dirName = DIR_NAME;
hpccBuildInfo.prefix = PREFIX;
Expand Down
2 changes: 2 additions & 0 deletions system/jlib/jutil.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@ struct HPCCBuildInfo
unsigned buildVersionMinor;
unsigned buildVersionPoint;
const char *buildVersion;
const char *buildMaturity;
const char *buildTagTimestamp;
};

extern jlib_decl HPCCBuildInfo hpccBuildInfo;
Expand Down
2 changes: 1 addition & 1 deletion vcpkg
Submodule vcpkg updated 7049 files
1 change: 1 addition & 0 deletions version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ set ( HPCC_MINOR 12 )
set ( HPCC_POINT 65 )
set ( HPCC_MATURITY "closedown" )
set ( HPCC_SEQUENCE 0 )
set ( HPCC_TAG_TIMESTAMP "1970-01-01T01:00:00Z" )
###