diff --git a/jetstream/analysis.py b/jetstream/analysis.py index 985fdaaf..a222d24e 100644 --- a/jetstream/analysis.py +++ b/jetstream/analysis.py @@ -856,11 +856,10 @@ def _create_subset_metric_table_query_covariate( ) if not self.bigquery.table_exists(covariate_table_name): - normalized_slug = bq_normalize_name(self.config.experiment.normandy_slug) logger.warning( f"Covariate adjustment table {covariate_table_name} does not exist, falling back to unadjusted inferences", # noqa:E501 extra={ - "experiment": normalized_slug, + "experiment": self.config.experiment.normandy_slug, "metric": metric.name, "analysis_basis": analysis_basis.value, "segment": segment, diff --git a/jetstream/cli.py b/jetstream/cli.py index 0455ca16..d492f375 100644 --- a/jetstream/cli.py +++ b/jetstream/cli.py @@ -269,6 +269,15 @@ def execute( else: dataset_id = self.dataset_id + # `do_rerun`` experiment should only run OVERALL + analysis_periods = self.analysis_periods + if config.experiment.do_rerun: + analysis_periods = [AnalysisPeriod.OVERALL] + logger.warning( + "`do_rerun` experiment: skipping non-overall periods.", + extra={"experiment": config.experiment.normandy_slug}, + ) + # run the analysis analysis = self.analysis_class( self.project_id, @@ -276,7 +285,7 @@ def execute( config, self.log_config, None, - self.analysis_periods, + analysis_periods, self.sql_output_dir, ) analysis.run( @@ -483,7 +492,7 @@ def _experiment_configs_to_analyse( for e in experiments.ended_after_or_live(ended_threshold) .of_type(RECOGNIZED_EXPERIMENT_TYPES) .experiments - if not e.is_rollout + if not e.is_rollout and not e.do_rerun ] launched_configs = self._experiments_to_configs(launched_experiments, config_getter) @@ -1317,6 +1326,19 @@ def rerun_config_changed( experiments_with_updated_defaults + [conf.slug for conf in updated_configs] ) + # get the experiments from Experimenter API that are explicitly marked for rerun + # and are out of date + all_experiments = ExperimentCollection.from_experimenter() + rerun_experiments = [exp for exp in all_experiments if exp.do_rerun] + client = BigQueryClient(project_id, dataset_id) + for exp in rerun_experiments: + first_updated = client.experiment_table_first_updated(exp.normandy_slug) + # if exp was never run (has no results tables) or was last run before new rerun trigger + if first_updated is None or ( + exp.do_rerun_timestamp is not None and first_updated < exp.do_rerun_timestamp + ): + experiment_slugs.add(exp.normandy_slug) + # update the table timestamps which indicate whether a experiment needs to be rerun client = BigQueryClient(project_id, dataset_id) for slug in experiment_slugs: diff --git a/requirements.in b/requirements.in index a85caacf..33162337 100644 --- a/requirements.in +++ b/requirements.in @@ -190,7 +190,7 @@ mizani==0.14.4 # via plotnine mozanalysis==2026.4.1 # via mozilla-jetstream -mozilla-metric-config-parser==2026.4.4 +mozilla-metric-config-parser==2026.6.1 # via # mozanalysis # mozilla-jetstream diff --git a/requirements.txt b/requirements.txt index 9eb3a49e..5794d554 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1284,8 +1284,8 @@ mizani==0.14.4 \ mozanalysis==2026.4.1 \ --hash=sha256:642b479ad6191dc0980de0a16062c02c67495ad654ceea012342cb52f23319d2 # via -r requirements.in -mozilla-metric-config-parser==2026.4.4 \ - --hash=sha256:76e64aa99636cb325e8105bb5364cf5b4dbc793ef78a810c0c8a9c94e9667f31 +mozilla-metric-config-parser==2026.6.1 \ + --hash=sha256:9ab77d6d5556fe31fd1f897a922d24c41306cd25d98d2168b99d667b93157fa5 # via # -r requirements.in # mozanalysis