@@ -66,9 +66,6 @@ struct ServerOptions {
66
66
/// The configuration file used for authentication.
67
67
#[ arg( long, value_name = "PATH" , env = "AUTHN_CONFIG_PATH" ) ]
68
68
authn_config_path : PathBuf ,
69
- /// The configuration file used for compatibility.
70
- #[ arg( long, value_name = "PATH" , env = "COMPATIBILITY_CONFIG_PATH" ) ]
71
- compatibility_config_path : Option < PathBuf > ,
72
69
/// The host IP on which the server listens, defaulting to all IPv4 and IPv6 addresses.
73
70
#[ arg( long, value_name = "HOST" , env = "HOST" , default_value_t = net:: IpAddr :: V6 ( net:: Ipv6Addr :: UNSPECIFIED ) ) ]
74
71
host : net:: IpAddr ,
@@ -198,8 +195,6 @@ async fn shutdown_signal() {
198
195
enum StartupError {
199
196
#[ error( "could not read the auth config - {0}" ) ]
200
197
ReadAuth ( anyhow:: Error ) ,
201
- #[ error( "could not read the compatibility config - {0}" ) ]
202
- ReadCompatibility ( anyhow:: Error ) ,
203
198
#[ error( "failed to build engine state - {0}" ) ]
204
199
ReadSchema ( anyhow:: Error ) ,
205
200
}
@@ -353,6 +348,11 @@ impl EngineRouter {
353
348
354
349
#[ allow( clippy:: print_stdout) ]
355
350
async fn start_engine ( server : & ServerOptions ) -> Result < ( ) , StartupError > {
351
+ let metadata_resolve_configuration = metadata_resolve:: configuration:: Configuration {
352
+ allow_unknown_subgraphs : server. partial_supergraph ,
353
+ unstable_features : resolve_unstable_features ( & server. unstable_features ) ,
354
+ } ;
355
+
356
356
let expose_internal_errors = if server. expose_internal_errors {
357
357
execute:: ExposeInternalErrors :: Expose
358
358
} else {
@@ -362,10 +362,8 @@ async fn start_engine(server: &ServerOptions) -> Result<(), StartupError> {
362
362
let state = build_state (
363
363
expose_internal_errors,
364
364
& server. authn_config_path ,
365
- & server. compatibility_config_path ,
366
365
& server. metadata_path ,
367
- server. partial_supergraph ,
368
- resolve_unstable_features ( & server. unstable_features ) ,
366
+ metadata_resolve_configuration,
369
367
)
370
368
. map_err ( StartupError :: ReadSchema ) ?;
371
369
@@ -750,34 +748,14 @@ fn print_warnings<T: Display>(warnings: Vec<T>) {
750
748
fn build_state (
751
749
expose_internal_errors : execute:: ExposeInternalErrors ,
752
750
authn_config_path : & PathBuf ,
753
- compatibility_config_path : & Option < PathBuf > ,
754
751
metadata_path : & PathBuf ,
755
- allow_unknown_subgraphs : bool ,
756
- unstable_features : metadata_resolve:: configuration:: UnstableFeatures ,
752
+ metadata_resolve_configuration : metadata_resolve:: configuration:: Configuration ,
757
753
) -> Result < Arc < EngineState > , anyhow:: Error > {
758
754
// Auth Config
759
755
let raw_auth_config = std:: fs:: read_to_string ( authn_config_path) ?;
760
756
let ( auth_config, auth_warnings) =
761
757
resolve_auth_config ( & raw_auth_config) . map_err ( StartupError :: ReadAuth ) ?;
762
758
763
- // Compatibility Config
764
- let compatibility_config = match compatibility_config_path {
765
- Some ( path) => {
766
- let raw_config = std:: fs:: read_to_string ( path) ?;
767
- let compatibility_config = compatibility:: resolve_compatibility_config ( & raw_config)
768
- . map_err ( StartupError :: ReadCompatibility ) ?;
769
- Some ( compatibility_config)
770
- }
771
- None => None ,
772
- } ;
773
-
774
- // derive metadata resolve configuration using compatibility configuration
775
- let metadata_resolve_configuration = metadata_resolve:: configuration:: Configuration {
776
- allow_unknown_subgraphs,
777
- unstable_features,
778
- warnings_to_raise : compatibility:: config_to_metadata_resolve ( & compatibility_config) ,
779
- } ;
780
-
781
759
// Metadata
782
760
let raw_metadata = std:: fs:: read_to_string ( metadata_path) ?;
783
761
let metadata = open_dds:: Metadata :: from_json_str ( & raw_metadata) ?;
0 commit comments