Skip to content

Commit

Permalink
Merge pull request #17947 from ghalliday/issue30610
Browse files Browse the repository at this point in the history
HPCC-30610 Include the tagging timestamp in the WUCheckFeatures response

Reviewed-By: Anthony Fishbeck <[email protected]>
Reviewed-by: Gordon Smith <[email protected]>
Merged-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday authored Nov 2, 2023
2 parents 0962afd + 8a0c01e commit 646eb31
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 1 deletion.
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" )
###

0 comments on commit 646eb31

Please sign in to comment.