move bucket setCurrent logic to bucket pipeline