App
App copied to clipboard
[$250] Race condition with the CP Staging label
Coming from https://github.com/Expensify/App/pull/7255 ...
Problem
There exists a race condition when the CP Staging
is applied to a pull request after it's merged. Both of the following are possible:
- When the merged pull request is fetched here, it already has the
CP Staging
label, and is deployed to staging. - When the merged pull request is fetched in the location listed above, it does not have the
CP Staging
label, and is not deployed to staging.
In both scenarios, a comment that looks like this will be left on the pull request:
Why this is important
In the second scenario, this is confusing because the expected behavior/whether or not the pull request was CP'd to staging is unclear.
Solution
Update the warnCPLabel.yml workflow to tailor its comment based on whether or not the CP Staging
label was applied to the pull request when it was already merged.
- If the pull request not yet merged, keep the same comment.
- If the pull request is already merged, use the following comment:
-
Find the
preDeploy.yml
workflow run for the pull request. -
List jobs for that workflow run and find the
skipDeploy
job. -
If the conclusion of that job is not resolved, poll the API until it is resolved.
-
If the conclusion is
success
or something else, use the following comment:
:warning: Heads up! :warning: Since the
CP Staging
label was applied after this PR was merged, it was not CP'd to staging. If you need it to be deployed to staging, tag a member of @Expensify/mobile-deployers to CP it manually.
-
If the conclusion is
skipped
, use the following comment:
:warning: Heads up! :warning: The
CP Staging
label was applied after the PR was merged. This leads to unpredictable behavior. In this case this PR will be deployed to staging, but to guarantee this in the future be sure to apply theCP Staging
before merging the pull request.
-
No update here yet.
This is pretty low priority, no update.
Again no update.
No update – this isn't that important but would be nice polish and hopefully pretty easy.
Not a priority
No update
No update
No update
Triggered auto assignment to @mateocole (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
@roryabraham removed and re-added the bug label to get a BZ team member added who can help move this forward.
@puneetlath is this something that can be marked as external and I can make a job for in Upwork?
@mateocole no I think this will need to be handled internally by @roryabraham or someone else.
Is this actually a bug or is it a new feature? If it's a bug, is it reproducible and can it therefore be assigned to the demolition team? @mateocole can you look into this and figure out what needs to be done to push this forward?
@arielgreen looking at this from a P/S statement it looks like a feature but I'll wait for @roryabraham to clarify
Typically GitHub Actions stuff is handled internally, but in this case I think it might be fine to make external, especially since there's a pretty clear implementation plan above ^
Current assignee @mateocole is eligible for the External assigner, not assigning anyone new.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (External
)
Triggered auto assignment to @iwiznia (External
), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
It's weird that this assigned @iwiznia, since I was already assigned to the issue so should've been an eligible CME. Unassigning you @iwiznia!
Also going to remove the C+ review on this issue and PR. Because they can't really test the PR anyways, it's just not as valuable
Job posted- https://www.upwork.com/ab/applicants/1591235610161598464/job-details
Waiting for proposals
Current assignee @mateocole is eligible for the External assigner, not assigning anyone new.
Job added to Upwork: https://www.upwork.com/jobs/~0131b521e37dc4e067
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr (External
)
Triggered auto assignment to @cead22 (External
), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@cead22 taking this internal given the age of the issue as discussed here. Please try to move this forward with urgency so that we can get WAQ done!
@mollfpr sorry for the confusion. This should be Internal.
@cead22, @mateocole Whoops! This issue is 2 days overdue. Let's get this updated quick!
Started a discussion about the solution here https://expensify.slack.com/archives/C03TQ48KC/p1669054325132319
This is fixed