10000 Feature/dump environment (#21710) · arangodb/arangodb@af0d6ce · GitHub
[go: up one dir, main page]

Skip to content

Commit af0d6ce

Browse files
dothebartjbajicKVS85Simran-B
authored
Feature/dump environment (#21710)
* only set the respective instrumentation * only set the respective instrumentation * add facility to get to know the current environment * lint * lint * fix include * fix include * add environment feature * add environment feature * add environment feature * add environment feature * on extremeVerbosity dump the environment of sub commands * lint * hook feature to all binaries * hook feature to all binaries * lint * lint * Fix lambda capture * rename * rename * Fix compile issues * Fix client tools * forward arangosh args * forward arangosh args * forward arangosh args * forward arangosh args * forward arangosh args * forward arangosh args * forward arangosh args * forward arangosh args * forward arangosh args * forward arangosh args * forward arangosh args * forward arangosh args * forward arangosh args * forward arangosh args * forward arangosh args * forward arangosh args * forward arangosh args * forward arangosh args * forward arangosh args * forward arangosh args * forward arangosh args * forward arangosh args * forward arangosh args * forward arangosh args * forward arangosh args * head * make it maintainer only * lint * Remove long description * Update lib/ApplicationFeatures/ProcessEnvironmentFeature.cpp Co-authored-by: Jure Bajic <jure.bajic94@gmail.com> * lint * author --------- Co-authored-by: Jure Bajic <jure.bajic94@gmail.com> Co-authored-by: Vadim Kondratev <vadim@arangodb.com> Co-authored-by: Simran Spiller <simran@arangodb.com>
1 parent 34c3d1c commit af0d6ce

File tree

19 files changed

+202
-4
lines changed

19 files changed

+202
-4
lines changed

arangod/RestServer/arangod.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ constexpr auto kNonServerFeatures =
4747
#endif
4848
ArangodServer::id<GeneralServerFeature>(),
4949
ArangodServer::id<GreetingsFeature>(),
50+
#ifdef ARANGODB_ENABLE_MAINTAINER_MODE
51+
ArangodServer::id<ProcessEnvironmentFeature>(),
52+
#endif
5053
ArangodServer::id<HttpEndpointProvider>(),
5154
ArangodServer::id<LogBufferFeature>(),
5255
ArangodServer::id<ServerFeature>(),
@@ -94,6 +97,11 @@ static int runServer(int argc, char** argv, ArangoGlobalContext& context) {
9497
return std::make_unique<GreetingsFeaturePhase>(server,
9598
std::false_type{});
9699
},
100+
#ifdef ARANGODB_ENABLE_MAINTAINER_MODE
101+
[&name](auto& server, TypeTag<ProcessEnvironmentFeature>) {
102+
return std::make_unique<ProcessEnvironmentFeature>(server, name);
103+
},
104+
#endif
97105
[&ret](auto& server, TypeTag<CheckVersionFeature>) {
98106
return std::make_unique<CheckVersionFeature>(server, &ret,
99107
kNonServerFeatures);

arangod/RestServer/arangod.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ class RocksDBIndexCacheRefillFeature;
143143
class RocksDBOptionFeature;
144144
class RocksDBRecoveryManager;
145145
class VectorIndexFeature;
146+
class ProcessEnvironmentFeature;
146147

147148
namespace transaction {
148149

@@ -257,6 +258,7 @@ using ArangodFeaturesList = TypeList<
257258
ReplicationTimeoutFeature,
258259
SchedulerFeature,
259260
VectorIndexFeature,
261+
ProcessEnvironmentFeature,
260262
#ifdef USE_V8
261263
ScriptFeature,
262264
#endif

arangod/RestServer/arangod_includes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include "ApplicationFeatures/FileSystemFeature.h"
3838
#include "ApplicationFeatures/GreetingsFeature.h"
3939
#include "ApplicationFeatures/GreetingsFeaturePhase.h"
40+
#include "ApplicationFeatures/ProcessEnvironmentFeature.h"
4041
#include "ApplicationFeatures/LanguageFeature.h"
4142
#include "ApplicationFeatures/LazyApplicationFeatureReference.h"
4243
#include "ApplicationFeatures/OptionsCheckFeature.h"

client-tools/Backup/arangobackup.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include "ApplicationFeatures/ShellColorsFeature.h"
3636
#include "ApplicationFeatures/ShutdownFeature.h"
3737
#include "ApplicationFeatures/VersionFeature.h"
38+
#include "ApplicationFeatures/ProcessEnvironmentFeature.h"
3839
#include "Backup/BackupFeature.h"
3940
#include "Basics/ArangoGlobalContext.h"
4041
#include "FeaturePhases/BasicFeaturePhaseClient.h"
@@ -75,6 +76,12 @@ int main(int argc, char* argv[]) {
7576
return std::make_unique<GreetingsFeaturePhase>(server,
7677
std::true_type{});
7778
},
79+
#ifdef ARANGODB_ENABLE_MAINTAINER_MODE
80+
[&](ArangoBackupServer& server, TypeTag<ProcessEnvironmentFeature>) {
81+
return std::make_unique<ProcessEnvironmentFeature>(
82+
server, context.binaryName());
83+
},
84+
#endif
7885
[&](ArangoBackupServer& server, TypeTag<ConfigFeature>) {
7986
return std::make_unique<ConfigFeature>(server, context.binaryName());
8087
},

client-tools/Benchmark/arangobench.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include "ApplicationFeatures/ConfigFeature.h"
3636
#include "ApplicationFeatures/FileSystemFeature.h"
3737
#include "ApplicationFeatures/GreetingsFeaturePhase.h"
38+
#include "ApplicationFeatures/ProcessEnvironmentFeature.h"
3839
#include "ApplicationFeatures/OptionsCheckFeature.h"
3940
#include "ApplicationFeatures/ShellColorsFeature.h"
4041
#include "ApplicationFeatures/ShutdownFeature.h"
@@ -78,6 +79,12 @@ int main(int argc, char* argv[]) {
7879
return std::make_unique<GreetingsFeaturePhase>(server,
7980
std::true_type{});
8081
},
82+
#ifdef ARANGODB_ENABLE_MAINTAINER_MODE
83+
[&](ArangoBenchServer& server, TypeTag<ProcessEnvironmentFeature>) {
84+
return std::make_unique<ProcessEnvironmentFeature>(
85+
server, context.binaryName());
86+
},
87+
#endif
8188
[&](ArangoBenchServer& server, TypeTag<ConfigFeature>) {
8289
return std::make_unique<ConfigFeature>(server, context.binaryName());
8390
},

client-tools/Dump/arangodump.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include "ApplicationFeatures/ConfigFeature.h"
3333
#include "ApplicationFeatures/FileSystemFeature.h"
3434
#include "ApplicationFeatures/GreetingsFeaturePhase.h"
35+
#include "ApplicationFeatures/ProcessEnvironmentFeature.h"
3536
#include "ApplicationFeatures/OptionsCheckFeature.h"
3637
#include "ApplicationFeatures/ShellColorsFeature.h"
3738
#include "ApplicationFeatures/ShutdownFeature.h"
@@ -90,6 +91,13 @@ int main(int argc, char* argv[]) {
9091
return std::make_unique<GreetingsFeaturePhase>(server,
9192
std::true_type{});
9293
},
94+
#ifdef ARANGODB_ENABLE_MAINTAINER_MODE
95+
[&context](ArangoDumpServer& server,
96+
TypeTag<ProcessEnvironmentFeature>) {
97+
return std::make_unique<ProcessEnvironmentFeature>(
98+
server, context.binaryName());
99+
},
100+
#endif
93101
[&context](ArangoDumpServer& server, TypeTag<ConfigFeature>) {
94102
return std::make_unique<ConfigFeature>(server, context.binaryName());
95103
},

client-tools/Export/arangoexport.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include "ApplicationFeatures/ConfigFeature.h"
3232
#include "ApplicationFeatures/FileSystemFeature.h"
3333
#include "ApplicationFeatures/GreetingsFeaturePhase.h"
34+
#include "ApplicationFeatures/ProcessEnvironmentFeature.h"
3435
#include "ApplicationFeatures/OptionsCheckFeature.h"
3536
#include "ApplicationFeatures/ShellColorsFeature.h"
3637
#include "ApplicationFeatures/ShutdownFeature.h"
@@ -78,6 +79,13 @@ int main(int argc, char* argv[]) {
7879
return std::make_unique<GreetingsFeaturePhase>(server,
7980
std::true_type{});
8081
},
82+
#ifdef ARANGODB_ENABLE_MAINTAINER_MODE
83+
[&context](ArangoExportServer& server,
84+
TypeTag<ProcessEnvironmentFeature>) {
85+
return std::make_unique<ProcessEnvironmentFeature>(
86+
server, context.binaryName());
87+
},
88+
#endif
8189
[&context](ArangoExportServer& server, TypeTag<ConfigFeature>) {
8290
return std::make_unique<ConfigFeature>(server, context.binaryName());
8391
},

client-tools/Import/arangoimport.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include "ApplicationFeatures/ConfigFeature.h"
3232
#include "ApplicationFeatures/FileSystemFeature.h"
3333
#include "ApplicationFeatures/GreetingsFeaturePhase.h"
34+
#include "ApplicationFeatures/ProcessEnvironmentFeature.h"
3435
#include "ApplicationFeatures/OptionsCheckFeature.h"
3536
#include "ApplicationFeatures/ShellColorsFeature.h"
3637
#include "ApplicationFeatures/ShutdownFeature.h"
@@ -78,6 +79,12 @@ int main(int argc, char* argv[]) {
7879
return std::make_unique<GreetingsFeaturePhase>(server,
7980
std::true_type{});
8081
},
82+
#ifdef ARANGODB_ENABLE_MAINTAINER_MODE
83+
[&](ArangoImportServer& server, TypeTag<ProcessEnvironmentFeature>) {
84+
return std::make_unique<ProcessEnvironmentFeature>(
85+
server, context.binaryName());
86+
},
87+
#endif
8188
[&](ArangoImportServer& server, TypeTag<ConfigFeature>) {
8289
return std::make_unique<ConfigFeature>(server, context.binaryName());
8390
},

client-tools/Restore/arangorestore.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include "ApplicationFeatures/ConfigFeature.h"
3333
#include "ApplicationFeatures/FileSystemFeature.h"
3434
#include "ApplicationFeatures/GreetingsFeaturePhase.h"
35+
#include "ApplicationFeatures/ProcessEnvironmentFeature.h"
3536
#include "ApplicationFeatures/OptionsCheckFeature.h"
3637
#include "ApplicationFeatures/ShellColorsFeature.h"
3738
#include "ApplicationFeatures/ShutdownFeature.h"
@@ -82,6 +83,12 @@ int main(int argc, char* argv[]) {
8283
return std::make_unique<GreetingsFeaturePhase>(server,
8384
std::true_type{});
8485
},
86+
#ifdef ARANGODB_ENABLE_MAINTAINER_MODE
87+
[&](ArangoRestoreServer& server, TypeTag<ProcessEnvironmentFeature>) {
88+
return std::make_unique<ProcessEnvironmentFeature>(
89+
server, context.binaryName());
90+
},
91+
#endif
8592
[&](ArangoRestoreServer& server, TypeTag<ConfigFeature>) {
8693
return std::make_unique<ConfigFeature>(server, context.binaryName());
8794
},

client-tools/Shell/arangosh.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include "ApplicationFeatures/ConfigFeature.h"
3232
#include "ApplicationFeatures/FileSystemFeature.h"
3333
#include "ApplicationFeatures/GreetingsFeaturePhase.h"
34+
#include "ApplicationFeatures/ProcessEnvironmentFeature.h"
3435
#include "ApplicationFeatures/LanguageFeature.h"
3536
#include "ApplicationFeatures/OptionsCheckFeature.h"
3637
#include "ApplicationFeatures/ShellColorsFeature.h"
@@ -89,6 +90,12 @@ int main(int argc, char* argv[]) {
8990
return std::make_unique<GreetingsFeaturePhase>(server,
9091
std::true_type{});
9192
},
93+
#ifdef ARANGODB_ENABLE_MAINTAINER_MODE
94+
[&](ArangoshServer& server, TypeTag<ProcessEnvironmentFeature>) {
95+
return std::make_unique<ProcessEnvironmentFeature>(
96+
server, context.binaryName());
97+
},
98+
#endif
9299
[&](ArangoshServer& server, TypeTag<ConfigFeature>) {
93100
return std::make_unique<ConfigFeature>(server, context.binaryName());
94101
},

0 commit comments

Comments
 (0)
0