Skip to content

Commit

Permalink
Merge pull request #546 from perftool-incubator/dev-kmr
Browse files Browse the repository at this point in the history
Dev kmr
  • Loading branch information
k-rister authored Aug 22, 2024
2 parents 6a17401 + 2ef50d3 commit 96f7d7c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions endpoints/remotehost/deprecated
Original file line number Diff line number Diff line change
@@ -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.
26 changes: 26 additions & 0 deletions rickshaw-run
Original file line number Diff line number Diff line change
Expand Up @@ -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'} .
Expand All @@ -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 (<DEPRECATION>) {
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) {
Expand Down

0 comments on commit 96f7d7c

Please sign in to comment.