Skip to content

Commit eefc32a

Browse files
committed
Merge branch 'xsalonx/gaq/O2B-1365/just-gaq-views' into xsalonx/gaq/O2B-1365/disable-gaq-if-detector-is-missing
2 parents 40bb12d + b3c7e02 commit eefc32a

449 files changed

Lines changed: 9611 additions & 6186 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222
"rules": {
2323
"array-bracket-newline": [
2424
"error",
25-
{
26-
"multiline": true
27-
}
25+
"consistent"
2826
],
2927
"array-bracket-spacing": [
3028
"error",
@@ -87,7 +85,7 @@
8785
],
8886
"function-paren-newline": [
8987
"error",
90-
"multiline"
88+
"multiline-arguments"
9189
],
9290
"indent": [
9391
"error",

.github/dependabot.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,3 @@ updates:
3838
update-types: ["version-update:semver-major"]
3939
- dependency-name: "chai"
4040
update-types: ["version-update:semver-major"]
41-
reviewers:
42-
- "graduta"

.github/workflows/bookkeeping.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
- name: Setup NodeJS
9292
uses: actions/setup-node@v4
9393
with:
94-
node-version: '18.x'
94+
node-version: '22.x'
9595
- name: Installing dependencies
9696
run: npm ci
9797
- name: Running linter

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- uses: actions/checkout@v4
1313
- uses: actions/setup-node@v4
1414
with:
15-
node-version: '18.x'
15+
node-version: '22.x'
1616
registry-url: 'https://registry.npmjs.org'
1717
- name: Check released tag matches ALICE O2 naming pattern
1818
run: |
@@ -42,7 +42,7 @@ jobs:
4242
- uses: actions/checkout@v4
4343
- uses: actions/setup-node@v4
4444
with:
45-
node-version: '18.x'
45+
node-version: '22.x'
4646
registry-url: 'https://registry.npmjs.org'
4747
- name: Install production dependencies
4848
run: npm install --only=production

CHANGELOG.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,103 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [1.9.0](https://github.com/AliceO2Group/Bookkeeping/releases/tag/%40aliceo2%2Fbookkeeping%401.9.0)
6+
* Notable changes for users:
7+
* QC flags boundaries can be null and will automatically be coalesced to run boundaries
8+
* Fixed the bug of QC flags chart height increasing on every rendering
9+
* Added possibility to lock data passes
10+
* Notable changes for developers:
11+
* QcFlagsChartComponent uses qcTimeStart and qcTimeEnd as x-axis boundaries
12+
* Simplified the remote data management for QC flag creation buttons
13+
* The binding of gRPC controllers has been slightly refactored to make it easier to maintain
14+
* Added possibility to provide authenticated gRPC API
15+
16+
## [1.8.0](https://github.com/AliceO2Group/Bookkeeping/releases/tag/%40aliceo2%2Fbookkeeping%401.8.0)
17+
* Notable changes for users:
18+
* Luminosity information has been added to run details page
19+
20+
## [1.7.0](https://github.com/AliceO2Group/Bookkeeping/releases/tag/%40aliceo2%2Fbookkeeping%401.7.0)
21+
* Notable changes for users:
22+
* Clicking on button to delete a flag actually mark it as deleted and remove its effective periods instead of removing it from database
23+
* Added a button to discard all QC flags for a given data pass
24+
* Fixed de-selection of runs/detectors in runs per data-pass
25+
* Notable changes for developers:
26+
* Kafka client will retry indefinitely when retryable errors occurs
27+
28+
## [1.6.0](https://github.com/AliceO2Group/Bookkeeping/releases/tag/%40aliceo2%2Fbookkeeping%401.6.0)
29+
* Notable changes for users:
30+
* Log template `key`, `issueDescription`, `detectorOrSubsystem` can be provided in the URL when creating a log to pre-fill on-call logs
31+
* Several runs and detectors can be selected to create multiple QC flags at once
32+
* runNumber filter now accepts ranges as well
33+
* Tag colours will now update when looking at run details
34+
* Add CTP host to flp roles if CTP is enabled
35+
* Display run that started/stopped run in run details
36+
* A simplified and reusable frontend filtering system has been set-up
37+
* Radio buttons are displayed in selection dropdown when options are exclusives
38+
* Display trigger configuration in a dedicated tab in run details page
39+
* Trigger counters has been renamed to CTP trigger counters
40+
* Notable changes for developers:
41+
* Group migrations per version to avoid having too crowded directories
42+
* Improved home page frontend tests to make them more robust
43+
* Encode URI components in buildUrl utility function, to handle parameters with `=` sign in keys/values
44+
* Fixed error spamming server logs when trying to handle lost runs and envs
45+
* Fix randomly failing QC flag types tests
46+
* Custom selector can be applied in selection dropdown options for values that are not CSS valid
47+
* Refactored runs overview filters for:
48+
* detectors
49+
* run type
50+
* EoR reason
51+
* start/stop
52+
* definition
53+
* fill number
54+
* LHC period
55+
* duration
56+
* Updates min supported Node.js to 22 to cover next year of Beam Operations
57+
* Disables usage of GPU on puppeteer as it hangs on docker-alpine (known issue on their repository)
58+
* Updates docker alpine version as otherwise node 22 was not available
59+
* Updates dependencies for puppeteer as needed due to alpine update
60+
* Moves to using headless: true instead of headless: 'new' with the new puppeteer version
61+
* Improve runs overview magnets filter
62+
* Added c++ API to update runs raw trigger configuration
63+
* Improved runs inelastic interaction rate filter
64+
* Improve run numbers filters in run overview
65+
* Trigger counters has been renamed to CTP trigger counters everywhere:
66+
* triggerCounters.proto has been renamed to ctpTriggerCounters.proto
67+
* c++ API has been updated accordingly
68+
* Renamed trigger_counters to ctp_trigger_counters
69+
70+
## [1.5.0](https://github.com/AliceO2Group/Bookkeeping/releases/tag/%40aliceo2%2Fbookkeeping%401.5.0)
71+
* Notable changes for users:
72+
* Added nTF orbits to runs updated runs API endpoints accordingly
73+
* Added a global error page, displaying amongst other 404 error
74+
* Notable changes for developers:
75+
* Fixed randomly failing runs test based on timerange selection (start/stop)
76+
* Fixed randomly failing QC tests
77+
* Updated docker ca-certificate dependency
78+
* Allow to prefill of on-call template through URL parameters:
79+
* In log creation page, query parameters `templateKey`, `issueDescription`, `detectorOrSubsystem` allow
80+
respectively to pre-chose a log template and define the issue description and detector or subsystem in the
81+
case of on-call template
82+
83+
## [1.4.1](https://github.com/AliceO2Group/Bookkeeping/releases/tag/%40aliceo2%2Fbookkeeping%401.4.1)
84+
* Notable changes for developers:
85+
* Fixed the runs start/stop extraction from AliECS kafka messages
86+
* Added more logs to external service synchronization (CCDB, MonALISA)
87+
88+
## [1.4.0](https://github.com/AliceO2Group/Bookkeeping/releases/tag/%40aliceo2%2Fbookkeeping%401.4.0)
89+
* Notable changes for users:
90+
* Fixed tag color not being updated when switching to run details after updating a tag
91+
* Environment variable ENABLE_HOUSEKEEPING must be set to true (case-insensitive) to actually enable housekeeping
92+
* Use time range picker for runs start & stop filtering
93+
* Run details page has been modernized
94+
* Notable changes for developers:
95+
* Runs and QC flags timestamps now store milliseconds
96+
* Fixed users that start/stop runs not being extracted from kafka message
97+
* Fixed TF timestamps being ignored when creating QC flags
98+
* Fixed randomly failing test in FLP frontend tests
99+
* Use coalesced run time in raw SQL querries
100+
* Removed the max number of retries for kafka connection
101+
5102
## [1.3.0](https://github.com/AliceO2Group/Bookkeeping/releases/tag/%40aliceo2%2Fbookkeeping%401.3.0)
6103
* Notable changes for users:
7104
* Fixed physical constants values which resulted in wrong AVG center of mass energy

Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#
22
# ---- Base ----
3-
FROM node:18-alpine3.18 as base
3+
FROM node:22-alpine3.20 as base
44

55
# Create app directory
66
WORKDIR /usr/src/app
@@ -9,7 +9,7 @@ WORKDIR /usr/src/app
99
EXPOSE 4000
1010

1111
RUN apk add --no-cache \
12-
bash=5.2.15-r5
12+
bash=5.2.26-r0
1313

1414
#
1515
# ---- Development Dependencies ----
@@ -18,11 +18,11 @@ FROM base AS developmentdependencies
1818
# Installs Git and packages required for Puppeteer
1919
# https://pkgs.alpinelinux.org/packages
2020
RUN apk add --no-cache \
21-
chromium=119.0.6045.159-r0 \
22-
freetype=2.13.0-r5 \
23-
freetype-dev=2.13.0-r5 \
24-
harfbuzz=7.3.0-r0 \
25-
ca-certificates=20240226-r0
21+
chromium=131.0.6778.108-r0 \
22+
freetype=2.13.2-r0 \
23+
freetype-dev=2.13.2-r0 \
24+
harfbuzz=8.5.0-r0 \
25+
ca-certificates=20241121-r1
2626

2727
# Tell Puppeteer to skip installing Chrome. We'll be using the installed package.
2828
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true

cxx-client/CMakeLists.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ add_library(BookkeepingProtos OBJECT
2626
${PROTO_DIR}/run.proto
2727
${PROTO_DIR}/dplProcessExecution.proto
2828
${PROTO_DIR}/qcFlag.proto
29-
${PROTO_DIR}/triggerCounters.proto
29+
${PROTO_DIR}/ctpTriggerCounters.proto
3030
)
3131

3232
target_link_libraries(BookkeepingProtos
@@ -64,9 +64,12 @@ add_library(BookkeepingApi SHARED
6464
include/BookkeepingApi/QcFlag.h
6565
src/grpc/services/GrpcQcFlagServiceClient.cxx
6666
src/grpc/services/GrpcQcFlagServiceClient.h
67-
include/BookkeepingApi/TriggerCountersServiceClient.h
68-
src/grpc/services/GrpcTriggerCountersServiceClient.h
69-
src/grpc/services/GrpcTriggerCountersServiceClient.cxx
67+
include/BookkeepingApi/CtpTriggerCountersServiceClient.h
68+
src/grpc/services/GrpcCtpTriggerCountersServiceClient.h
69+
src/grpc/services/GrpcCtpTriggerCountersServiceClient.cxx
70+
include/BookkeepingApi/RunServiceClient.h
71+
src/grpc/services/GrpcRunServiceClient.h
72+
src/grpc/services/GrpcRunServiceClient.cxx
7073
)
7174

7275
target_include_directories(BookkeepingApi
@@ -112,7 +115,7 @@ install(FILES
112115
${PROTO_OUT_DIR}/run.pb.h
113116
${PROTO_OUT_DIR}/dplProcessExecution.pb.h
114117
${PROTO_OUT_DIR}/qcFlag.pb.h
115-
${PROTO_OUT_DIR}/triggerCounters.pb.h
118+
${PROTO_OUT_DIR}/ctpTriggerCounters.pb.h
116119
DESTINATION "include"
117120
)
118121

cxx-client/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ target_link_libraries(${EXECUTABLE_NAME} PRIVATE AliceO2::BookkeepingApi)
4848
```
4949
### C++ usage
5050

51-
The bookkeeping API's client can be requested from the provided factory by passing it the gRPC endpoint's URI:
51+
The bookkeeping API's client can be requested from the provided factory by passing it the gRPC endpoint's URI and an authentication token:
5252

5353
#### Use-case specific services
5454

5555
```cpp
5656
#include <BookkeepingApi/BkpClientFactory.h>
5757
using namespace o2::bkp::api;
5858

59-
auto client = BkpClientFactory::create("[host][:port]");
59+
auto client = BkpClientFactory::create("[host][:port]", "[token]");
6060
```
6161
6262
If you have a local bookkeeping running, the URI should be `127.0.0.1:4001` (note the **absence** of protocol such
@@ -71,7 +71,7 @@ For example to update readout FLP's counters using a local JSON file you can use
7171
#include <BookkeepingApi/BkpClientFactory.h>
7272
using namespace o2::bkp::api;
7373
74-
auto client = BkpClientFactory::create("[grpc-endpoint-url]");
74+
auto client = BkpClientFactory::create("[grpc-endpoint-url]", "[token]");
7575
client->flp()->updateReadoutCountersByFlpNameAndRunNumber("FLP-NAME", runNumber, nSubtimeframes, nEquipmentBytes, nRecordingBytes, nFairMQBytes);
7676
```
7777

cxx-client/example/exampleSpecificServices.cxx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@ using namespace o2::bkp::api;
1818
int main(int argc, char** argv)
1919
{
2020
if (argc < 2) {
21-
std::cerr << "You need to provide the gRPC URI as first argument" << std::endl;
21+
std::cerr << "You need to provide the gRPC URI as first argument and eventually authentication token as second argument" << std::endl;
2222
exit(1);
2323
}
2424

2525
try {
26-
auto client = BkpClientFactory::create(argv[1]);
26+
auto client = argc == 2
27+
? BkpClientFactory::create(argv[1])
28+
: BkpClientFactory::create(argv[1], argv[2]);
2729

2830
// Test of FLP counters update
2931
client->flp()->updateReadoutCountersByFlpNameAndRunNumber("FLP-TPC-1", 1, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF);
@@ -36,7 +38,7 @@ int main(int argc, char** argv)
3638
// Test QC flag creation
3739
auto dataPassQcFlagIds = client->qcFlag()->createForDataPass(
3840
55,
39-
"LHC22b_apass2",
41+
"skimming",
4042
"FT0",
4143
{ { 2, 1565280000000, 1565287200000, "FT0/Check" },
4244
{ .flagTypeId = 11, .origin = "FT0/task" } });
@@ -61,10 +63,14 @@ int main(int argc, char** argv)
6163
std::cout << simulationPassQcFlagIds[simulationPassQcFlagIds.size() - 1] << std::endl;
6264

6365
// Test trigger counters registration
64-
client->triggerCounters()->createOrUpdateForRun(108, "CLASS-NAME", 123, 1, 2, 3, 4, 5, 6);
66+
client->ctpTriggerCounters()->createOrUpdateForRun(108, "CLASS-NAME", 123, 1, 2, 3, 4, 5, 6);
6567
std::cout << "Successfully created trigger counters" << std::endl;
66-
client->triggerCounters()->createOrUpdateForRun(108, "CLASS-NAME", 1234, 10, 20, 30, 40, 50, 60);
68+
client->ctpTriggerCounters()->createOrUpdateForRun(108, "CLASS-NAME", 1234, 10, 20, 30, 40, 50, 60);
6769
std::cout << "Successfully updated trigger counters" << std::endl;
70+
71+
// Test run update
72+
client->run()->setRawCtpTriggerConfiguration(1, "A\nnew raw\nCTP trigger configuration");
73+
std::cout << "Successfully updated run raw CTP trigger configuration" << std::endl;
6874
} catch (std::runtime_error& error) {
6975
std::cerr << "An error occurred: " << error.what() << std::endl;
7076
exit(2);

cxx-client/include/BookkeepingApi/BkpClient.h

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
#include "FlpServiceClient.h"
1717
#include "DplProcessExecutionClient.h"
1818
#include "QcFlagServiceClient.h"
19-
#include "TriggerCountersServiceClient.h"
19+
#include "CtpTriggerCountersServiceClient.h"
20+
#include "RunServiceClient.h"
2021

2122
namespace o2::bkp::api
2223
{
@@ -35,8 +36,15 @@ class BkpClient
3536
/// Returns the client for QcFlag service
3637
virtual const std::unique_ptr<QcFlagServiceClient>& qcFlag() const = 0;
3738

38-
virtual const std::unique_ptr<TriggerCountersServiceClient>& triggerCounters() const = 0;
39+
/// Returns the client for trigger counters
40+
virtual const std::unique_ptr<CtpTriggerCountersServiceClient>& ctpTriggerCounters() const = 0;
41+
42+
/// @deprecated use `ctpTriggerCounters` instead
43+
virtual const std::unique_ptr<CtpTriggerCountersServiceClient>& triggerCounters() const = 0;
44+
45+
/// Returns the client for runs
46+
virtual const std::unique_ptr<RunServiceClient>& run() const = 0;
3947
};
4048
} // namespace o2::bkp::api
4149

42-
#endif // CXX_CLIENT_BOOKKEEPINGAPI_BKPCLIENT_H_
50+
#endif // CXX_CLIENT_BOOKKEEPINGAPI_BKPCLIENT_H_

0 commit comments

Comments
 (0)