Fix flakey time-sensitive move slash command with unauthorized project
What does this MR do?
EE MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6124
Fix flakey time-sensitive move slash command with unauthorized project
Found while working on https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6051, failing test: https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/74649299
Are there points in the code the reviewer needs to double check?
As a note, we don't show Commands applied
when the project doesn't exist, see this rspec test
Should we fix the slash command to not return Commands applied
with an unauthorized project? (let's create a follow-up issue)
root/waefeweaf
is a valid project but the slash command user isn't authorized
# `root/unauthorized` is a valid project but unauthorized to move to that project
POST <namespace>/<project>/notes?target_id=336&target_type=issue with `note[note]: /move root/waefeweaf`
{
"commands_changes": {
"target_project": {
// ...
}
},
"valid": false,
"errors": {
"commands_only": [
"Commands applied"
]
}
}
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary- Not a user-facing change
-
Tests added for this feature/bug - Conform by the code review guidelines
-
Has been reviewed by a Backend maintainer
-
-
Conform by the merge request performance guides -
Conform by the style guides -
If you have multiple commits, please combine them into a few logically organized commits by squashing them -
Internationalization required/considered -
End-to-end tests pass ( package-and-qa
manual pipeline job)
What are the relevant issue numbers?
Edited by Eric Eastwood