fix(growth): make active source canary idempotent
Some checks failed
CD Pipeline / deploy (push) Has been cancelled
Some checks failed
CD Pipeline / deploy (push) Has been cancelled
This commit is contained in:
@@ -797,6 +797,27 @@ def test_targeted_marketplace_canary_activates_and_rollback_quarantines(monkeypa
|
||||
assert yahoo["has_runtime_data"] is True
|
||||
assert yahoo["write_enabled"] is True
|
||||
|
||||
one_candidate_readback = readback_external_offer_candidates(
|
||||
engine,
|
||||
candidates[:1],
|
||||
source_code="yahoo_shopping",
|
||||
ingestion_method="public_product_jsonld",
|
||||
)
|
||||
idempotent_activation = (
|
||||
canary_service.activate_external_market_source_after_canary(
|
||||
engine,
|
||||
source_code="yahoo_shopping",
|
||||
candidates=candidates[:1],
|
||||
independent_readback=one_candidate_readback,
|
||||
identity=identity,
|
||||
minimum_verified_count=2,
|
||||
)
|
||||
)
|
||||
assert idempotent_activation["status"] == "already_active_verified"
|
||||
assert idempotent_activation["applied"] is True
|
||||
assert idempotent_activation["state_changed"] is False
|
||||
assert idempotent_activation["writes_database_count"] == 0
|
||||
|
||||
rollback = canary_service.rollback_external_market_source_canary(
|
||||
engine,
|
||||
source_code="yahoo_shopping",
|
||||
|
||||
Reference in New Issue
Block a user