Closed Ben10k closed 6 months ago
Hi @Ben10k, I've somehow missed this issue. I'll take a look in the following few days.
Because Telefonistka is stateless I would have to compare the current config with a pervious version to find the removed path. Then go over all currently open PRs and search for files that match the remove path, seems possible.
This is a big change (relative to size of the project) so the plan is to start with just commenting warnings(no deletion/mutation). I'll Warn in the triggering PR (PR1) when its opened/synced and the affected PRs(PR3) when PR1 is merged.
Thank you!
Having a warning pop up as a comment on PR3
once PR1
is merged would be a nice addition.
Then we would know that something is not right and then we can change the promotional PR before approving/merging it.
Automatically marking issue as stale due to lack of activity
Automatically closing this issue as stale
Automatically marking issue as stale due to lack of activity
Automatically marking issue as stale due to lack of activity
Automatically closing this issue as stale
Description
We had 2 PRs open at the same time:
PR1
: remove a stage from environment:targetPath
from the roottelefonistka.yaml
PR2
: add a new component the should be promoted to all stages defined in thetelefonistka.yaml
It happened to be that
PR2
was merged before thePR1
.After the merge of
PR2
, telefonistka kicked in and created a new promotion PR (PR3
) of the new component to all stages, including the the one that is being removed inPR2
. This is expected an correct behaviour, as at that point in time, themain
branch still had the old stage present.Then,
PR2
was merged, which removed the stage from themain
branch.But the promotional
PR3
still contained promotion to the stage that no longer exists on themain
branch.Expected Behaviour
After
PR1
was merged, I expected that telefonistka would either:PR3
to remove the promotion of the component to a no longer existing stagePR3
and create a new PR that would promote component only to existing stagesActual Behaviour
Nothing happened after
PR1
was merged.Workaround
While debugging and trying to figure out what was actually happening, we have tried redelivering the webhooks from Github to telefonistka.
PR1
pull_request_closed
. Nothing happenedPR2
pull_request_closed
. Then telefonistka raised a newPR4
to deploy the new component fromPR2
to the current existing stages intelefonistka.yaml
onmain
branch.Then we were able to close the
PR3
and merge thePR4
Affected Version
v0.1.3
Steps to Reproduce
telefonistka
enabled._WORKSPACE/component1.yaml
region1/component1.yaml
region2/component1.yaml
telefonistka.yaml
with this content:PR1
) and do NOT merge itregion2/component1.yaml
- "region2/"
fromtelefonistka.yaml
PR2
) and do NOT merge it_WORKSPACE/component2.yaml
PR2
PR3
to promote_WORKSPACE/component2.yaml
to bothregion1/component2.yaml
andregion2/component2.yaml
PR1
PR3
is still promoting_WORKSPACE/component2.yaml
to theregion2/component2.yaml
while region2 is no longer present on themain
branch.Checklist