Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions jetstream/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
26 changes: 24 additions & 2 deletions jetstream/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,14 +269,23 @@ 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,
dataset_id,
config,
self.log_config,
None,
self.analysis_periods,
analysis_periods,
self.sql_output_dir,
)
analysis.run(
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading