From 39e4166c11dd371b4b8eb9511e82f3107f8c496b Mon Sep 17 00:00:00 2001 From: Karl Rister Date: Thu, 22 Aug 2024 09:41:30 -0500 Subject: [PATCH 1/2] add endpoint deprecation framework --- rickshaw-run | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/rickshaw-run b/rickshaw-run index 0d5a3396..966fd595 100755 --- a/rickshaw-run +++ b/rickshaw-run @@ -1926,10 +1926,20 @@ sub validate_endpoints() { my $job_queue = new Thread::Queue; my %endpoint_outputs : shared; my $collectors_present = 0; + my %deprecated_endpoints; printf "Confirming the endpoints will satisfy the benchmark requirements:\n"; # enqueue one validation job per endpoint foreach my $endpoint (@endpoints) { + debug_log(sprintf "Checking %s endpoint for deprecation\n", $$endpoint{'type'}); + my $deprecation_file = $rickshaw_project_dir . "/endpoints/" . $$endpoint{'type'} . "/deprecated"; + if (-e $deprecation_file) { + debug_log(sprintf "The %s endpoint is deprecated\n", $$endpoint{'type'}); + if (! exists $deprecated_endpoints{$$endpoint{'type'}}) { + debug_log(sprintf "The %s endpoint has not previously been queued for deprecation announcement so doing so\n", $$endpoint{'type'}); + $deprecated_endpoints{$$endpoint{'type'}} = $deprecation_file; + } + } my %job = ( 'endpoint' => $$endpoint{'label'}, 'command' => $rickshaw_project_dir . "/endpoints/" . $$endpoint{'type'} . "/" . $$endpoint{'type'} . @@ -1949,6 +1959,22 @@ sub validate_endpoints() { $job_queue->enqueue(\%job); } + if ((keys %deprecated_endpoints) > 0) { + print "#################################################################################\n"; + foreach my $key (keys %deprecated_endpoints) { + printf "ATTENTION: The %s endpoint is deprecated. The endpoint's deprecation message is:\n", $key; + if (open(DEPRECATION, "<", $deprecated_endpoints{$key})) { + while () { + print $_; + } + } else { + printf "ERROR: Failed to open deprecation message file '%s' for endpoint '%s'!\n", $deprecated_endpoints{$key}, $key; + exit 1; + } + } + print "#################################################################################\n"; + } + my $num_threads = $available_cpus; my @threads; if ($num_threads > $job_queue->pending) { From 2ef50d3790b491a502d9d33904b8531ebb94f89c Mon Sep 17 00:00:00 2001 From: Karl Rister Date: Thu, 22 Aug 2024 09:42:09 -0500 Subject: [PATCH 2/2] deprecate the remotehost endpoint --- endpoints/remotehost/deprecated | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 endpoints/remotehost/deprecated diff --git a/endpoints/remotehost/deprecated b/endpoints/remotehost/deprecated new file mode 100644 index 00000000..774fa6d1 --- /dev/null +++ b/endpoints/remotehost/deprecated @@ -0,0 +1,3 @@ + The remotehost endpoint is being replaced by the remotehosts endpoint. + Please migrate to remotehosts as soon as possible since the remotehost + endpoint will be removed at the end of 2024.