Commit e3516eef authored by Leo Gordon's avatar Leo Gordon
Browse files

Ported the versioning code to version/2.0 branch, added the branch description to Changelog

parents 8c1bc771 781ef4ae
Version 2.0 - a major 'coreless' release of Hive code
===========
* Removed dependencies from EnsEMBL core code. You don't need to install Ensembl core to run non-Ensembl pipelines.
* Moved Ensembl-specific configuration to EnsemblGeneric_conf, from which all Ensembl pipelines should now inherit.
Version 1.9 - largely a maintenance release + preparations for separation from Ensembl core
===========
* Various preparations to make the code more GitHub-friendly
* A better class hierarchy with less depenencies from Ensembl core code
* At last we have a proper code version test: "use Bio::EnsEMBL::Hive::Version 1.9;" works, but "use Bio::EnsEMBL::Hive::Version 2.0" currently fails.
* "beekeeper --version", "runWorker.pl --version" and "db_cmd.pl --version" report both code version and Hive database schema version
* Multiple bug fixes
---------------------[before EnsEMBL rel.75]---------------------------------------------------------------------------
* Wed Dec 11 12:55:58 2013 +0000 | Leo Gordon | updated schema diagram (PNG) and description (HTML)
......@@ -35,8 +57,7 @@
* Tue Sep 10 01:20:28 2013 +0100 | Matthieu Muffato | Only gnuplot has to know about the filtered analysis, the CSV file should still contain all the data
* Tue Sep 10 00:51:55 2013 +0100 | Matthieu Muffato | First version of a script to generate the analysis profile of a pipeline
* Mon Nov 25 16:57:37 2013 +0000 | Leo Gordon | schema_change: detect and register RELOCATED events that used to mess up things on LSF 9.0 ("job rescheduled" in LSF parlance)
* Mon Nov 25 16:54:11 2013 +0000 | Leo Gordon | be more careful with fetch_overdue_workers (Use 5sec threshold to avoid checking recently active Workers. Do not use it at all when perf
orming -all_dead.)
* Mon Nov 25 16:54:11 2013 +0000 | Leo Gordon | be more careful with fetch_overdue_workers (Use 5sec threshold to avoid checking recently active Workers. Do not use it at all when performing -all_dead.)
* Mon Nov 25 16:47:35 2013 +0000 | Leo Gordon | bugfix: last_check_in should only be updated by register_worker_death if the Worker is burying itself
* Mon Nov 25 16:35:16 2013 +0000 | Leo Gordon | cosmetic: added (commented out) warning messages for every external system() call that LSF module runs - simplifies debugging a lot
* Mon Nov 25 14:08:52 2013 +0000 | Leo Gordon | ranked claiming technology: added support for both sqlite and pgsql drivers
......
......@@ -54,10 +54,12 @@ use strict;
use warnings;
use Carp ('confess');
use Data::Dumper;
use Bio::EnsEMBL::Hive::Version;
use Bio::EnsEMBL::Hive::DBSQL::SqlSchemaAdaptor;
#use Bio::EnsEMBL::Hive::DBSQL::DBConnection; # causes warnings that all exported functions have been redefined
use Exporter 'import';
our @EXPORT_OK = qw(stringify destringify dir_revhash parse_cmdline_options find_submodules load_file_or_module script_usage url2dbconn_hash go_figure_dbc throw);
our @EXPORT_OK = qw(stringify destringify dir_revhash parse_cmdline_options find_submodules load_file_or_module script_usage url2dbconn_hash go_figure_dbc report_versions throw);
no warnings ('once'); # otherwise the next line complains about $Carp::Internal being used just once
$Carp::Internal{ (__PACKAGE__) }++;
......@@ -332,6 +334,12 @@ sub go_figure_dbc {
}
sub report_versions {
print "CodeVersion\t".Bio::EnsEMBL::Hive::Version->get_code_version()."\n";
print "CompatibleHiveDatabaseSchemaVersion\t".Bio::EnsEMBL::Hive::DBSQL::SqlSchemaAdaptor->get_code_sql_schema_version()."\n";
}
sub throw {
my $msg = pop @_;
......@@ -340,5 +348,6 @@ sub throw {
confess $msg;
}
1;
=pod
=head1 NAME
Bio::EnsEMBL::Hive::Version
=head1 SYNOPSIS
use Bio::EnsEMBL::Hive::Version 2.0;
=head1 DESCRIPTION
Version number of the Hive code.
=head1 LICENSE
Copyright [1999-2014] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.
=head1 CONTACT
Please subscribe to the Hive mailing list: http://listserver.ebi.ac.uk/mailman/listinfo/ehive-users to discuss Hive-related questions or to be notified of our updates
=cut
package Bio::EnsEMBL::Hive::Version;
use strict;
use warnings;
our $VERSION = '2.0';
sub get_code_version {
return $VERSION;
}
1;
......@@ -14,7 +14,7 @@ BEGIN {
use Getopt::Long;
use File::Path 'make_path';
use Bio::EnsEMBL::Hive::Utils ('script_usage', 'destringify');
use Bio::EnsEMBL::Hive::Utils ('script_usage', 'destringify', 'report_versions');
use Bio::EnsEMBL::Hive::Utils::Config;
use Bio::EnsEMBL::Hive::DBSQL::DBAdaptor;
use Bio::EnsEMBL::Hive::Queen;
......@@ -32,7 +32,8 @@ sub main {
# the globals into a nice '$self' package
my $self = {};
my $help;
my $help = 0;
my $report_versions = 0;
my $loopit = 0;
my $sync = 0;
my $local = 0;
......@@ -107,11 +108,12 @@ sub main {
'submit_log_dir=s' => \$self->{'submit_log_dir'},
# other commands/options
'h|help' => \$help,
'sync' => \$sync,
'dead' => \$check_for_dead,
'h|help!' => \$help,
'v|versions!' => \$report_versions,
'sync!' => \$sync,
'dead!' => \$check_for_dead,
'killworker=i' => \$kill_worker_id,
'alldead' => \$all_dead,
'alldead!' => \$all_dead,
'balance_semaphores'=> \$balance_semaphores,
'no_analysis_stats' => \$self->{'no_analysis_stats'},
'worker_stats' => \$show_worker_stats,
......@@ -125,6 +127,11 @@ sub main {
if ($help) { script_usage(0); }
if($report_versions) {
report_versions();
exit(0);
}
my $config = Bio::EnsEMBL::Hive::Utils::Config->new(); # will probably add a config_file option later
if($run or $run_job_id) {
......@@ -490,6 +497,7 @@ __DATA__
=head2 Other commands/options
-help : print this help
-versions : report both Hive code version and Hive database schema version
-dead : detect all unaccounted dead workers and reset their jobs for resubmission
-alldead : tell the database all workers are dead (no checks are performed in this mode, so be very careful!)
-balance_semaphores : set all semaphore_counts to the numbers of unDONE fan jobs (emergency use only)
......
......@@ -13,11 +13,11 @@ BEGIN {
use Getopt::Long;
use Bio::EnsEMBL::Hive::Utils::URL;
use Bio::EnsEMBL::Hive::Utils ('script_usage');
use Bio::EnsEMBL::Hive::Utils ('script_usage', 'report_versions');
sub main {
my ($reg_conf, $reg_type, $reg_alias, $url, $sqlcmd, $extra, $to_params, $verbose, $help);
my ($reg_conf, $reg_type, $reg_alias, $url, $sqlcmd, $extra, $to_params, $verbose, $help, $report_versions);
GetOptions(
# connect to the database:
......@@ -33,13 +33,20 @@ sub main {
'verbose!' => \$verbose,
'help!' => \$help,
'v|versions!' => \$report_versions,
);
my $dbc_hash;
if($help) {
script_usage(0);
} elsif($report_versions) {
report_versions();
exit(0);
} elsif($reg_alias) {
script_usage(1) if $url;
......
......@@ -13,7 +13,7 @@ BEGIN {
use Getopt::Long;
use Bio::EnsEMBL::Hive::Utils ('script_usage');
use Bio::EnsEMBL::Hive::Utils ('script_usage', 'report_versions');
use Bio::EnsEMBL::Hive::DBSQL::DBAdaptor;
use Bio::EnsEMBL::Hive::Queen;
use Bio::EnsEMBL::Hive::Valley;
......@@ -21,7 +21,7 @@ use Bio::EnsEMBL::Hive::Valley;
my ($url, $reg_conf, $reg_type, $reg_alias, $nosqlvc); # Connection parameters
my ($resource_class_id, $resource_class_name, $analysis_id, $logic_name, $job_id, $force); # Task specification parameters
my ($job_limit, $life_span, $no_cleanup, $no_write, $hive_log_dir, $worker_log_dir, $retry_throwing_jobs, $can_respecialize); # Worker control parameters
my ($help, $debug);
my ($help, $report_versions, $debug);
GetOptions(
......@@ -52,11 +52,17 @@ GetOptions(
# Other commands
'h|help' => \$help,
'v|versions' => \$report_versions,
'debug=i' => \$debug,
);
if ($help) { script_usage(0); }
if($report_versions) {
report_versions();
exit(0);
}
my $hive_dba;
if($url or $reg_alias) {
......@@ -188,6 +194,7 @@ __DATA__
=head2 Other options:
-help : print this help
-versions : report both Hive code version and Hive database schema version
-debug <level> : turn on debug messages at <level>
-analysis_stats : show status of each analysis in hive
......
#!/usr/bin/env perl
use strict;
use warnings;
use Bio::EnsEMBL::Hive::Version 2.0;
print "Hello, world! We are using Hive version ".Bio::EnsEMBL::Hive::Version->get_code_version."\n";
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment