From 4cad77ca4cf8c4178260c24f514aced7b0a91d0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kone=C4=8Dn=C3=BD?= Date: Fri, 25 Mar 2022 16:23:44 +0100 Subject: [PATCH] Add documentation for scm_request_processor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add simple markdown file and flowchart diagram in SVG format. Signed-off-by: Michal Konečný --- docs/scm_request_processor.md | 15 +++++++++++++++ docs/scm_request_processor.svg | 4 ++++ 2 files changed, 19 insertions(+) create mode 100644 docs/scm_request_processor.md create mode 100644 docs/scm_request_processor.svg diff --git a/docs/scm_request_processor.md b/docs/scm_request_processor.md new file mode 100644 index 0000000..47b24c3 --- /dev/null +++ b/docs/scm_request_processor.md @@ -0,0 +1,15 @@ +# SCM Request Processor + +SCM Request processor is toddler created from https://pagure.io/fedscm-admin/ script. It process tickets on https://pagure.io/releng/fedora-scm-requests/ , validates them and creates the branch or repository if everything is OK. + +## Accepted topics + +The SCM Request processor accepts few topics emitted by pagure. These topics allows it to process any newly created ticket or react to any ticket that is updated or commented on. + +* org.fedoraproject.*.pagure.issue.new - New issue on pagure created +* org.fedoraproject.*.pagure.issue.edit - Issue on pagure is edited +* org.fedoraporject.*.pagure.issue.comment.added - New comment is added to issue + +## Flowchart diagram + +[Flowchart diagram](./scm_request_processor.png) illustrates the code flow of the SCM Request Processor, what is being validated and what reaction is done if the validation fails. diff --git a/docs/scm_request_processor.svg b/docs/scm_request_processor.svg new file mode 100644 index 0000000..288d376 --- /dev/null +++ b/docs/scm_request_processor.svg @@ -0,0 +1,4 @@ + + + +
Message received
Message received
Yes
Yes
No
No
Project is releng/fedora-scm-requests?
Project is releng/...
Skip the message
Skip the message
Yes
Yes
No
No
Is issue open?
Is issue open?
Yes
Yes
Yes
Yes
Is json in ticket valid?
Is json in ticket...
Close the issue with comment as Invalid
Close the issue with...
No
No
Yes
Yes
Are SLAs in the json?
Are SLAs in the j...
No
No
Yes
Yes
Are provided SLAs valid?
Are provided SLAs...
No
No
Are default SLAs for the branch defined in the config?
Are default SLAs for the bra...
Close the issue with comment as Invalid
Close the issue with...
No
No
Yes
Yes
Is branch name valid?
Is branch name val...
Yes
Yes
No
No
Is monitoring setting in json?
Is monitoring setting in...
No
No
Yes
Yes
Is monitoring choice valid?
Is monitoring choice vali...
Close the issue with comment as Invalid
Close the issue with...
new_repo
new_repo
new_branch
new_branch
Other
Other
What action is in json?
What action is in json?
No
No
Yes
Yes
Are all the required keys provided in json?
Are all the required keys...
No
No
Yes
Yes
Are all the required keys provided in json?
Are all the required keys...
Close the issue with comment as Invalid
Close the issue with...
Close the issue with comment as Invalid
Close the issue with...
No
No
Yes
Yes
Is the repository name valid?
Is the repository name va...
Yes
Yes
No
No
Skip the bugzilla ticket validation?
Skip the bugzilla ticket...
Yes
Yes
No
No
Is there already a validation comment on ticket?
Is there already a vali...
Yes
Yes
No
No
Is the comment provided by maintainer of releng/fedora-scm-request repository?
Is the comment provided by mai...
Yes
Yes
No
No
Is the bugzilla ticket provided?
Is the bugzilla ticket pr...
Yes
Yes
No
No
Is this a valid bugzilla ticket?
Is this a valid bugzilla tic...
Ping the maintainers of releng/fedora-scm-requests in comment
Ping the maintainers o...
Skip the message
Skip the message
Close the issue with comment as Invalid
Close the issue with...
Yes
Yes
No
No
Is the branch requested an EPEL branch?
Is the branch requested an E...
No
No
Yes
Yes
Is the EPEL request valid?
Is the EPEL request valid?
Close the issue with comment as Invalid
Close the issue with...
No
No
Yes
Yes
Does the requester exists in dist git?
Does the requester exists in...
Yes
Yes
No
No
Does the project exists in dist git?
Does the project exists in d...
Close the issue with comment as Invalid
Close the issue with...
Let user know in comment that he needs to login to dist git first
Let user know in comment...
Yes
Yes
No
No
Is the branch name master?
Is the branch name master?
No
No
Yes
Yes
Is the namespace recognizable?
Is the namespace recognizabl...
Close the issue with comment as Invalid
Close the issue with...
Yes
Yes
No
No
Does the branch exist in PDC?
Does the branch exist in PDC?
Create the repository
and close the ticket as Processed
Create the reposito...
Yes
Yes
Does repository exists?
Does repository exists?
Yes
Yes
No
No
Is the branch requested an EPEL branch?
Is the branch requested an E...
No
No
Yes
Yes
Is the EPEL request valid?
Is the EPEL request valid?
Close the issue with comment as Invalid
Close the issue with...
Yes
Yes
No
No
Does the branch exist in PDC?
Does the branch exist in PDC?
Yes
Yes
Is the requester a maintainer of the repository?
Is the requester a mainta...
Create the branch
and close the ticket as Processed
Create the branch...
Yes
Yes
Is bugzilla ticket available?
Is bugzilla ticket availa...
Comment on the ticket
Comment on the tick...
Yes
Yes
Is bugzilla ticket available?
Is bugzilla ticket availa...
Comment on the ticket
Comment on the tick...
SCM Request Processor Flow
SCM Request Processor Flow
SLAs Validation
SLAs Validation
SLAs received
SLAs received
Yes
Yes
No
No
Are SLAs in standard SLAs?
Are SLAs in standa...
No
No
Yes
Yes
Does they correspond with the branch?
Does they correspo...
Validation error
Validation error
Validated
Validated
No
No
Yes
Yes
Is EOL date string?
Is EOL date string?
No
No
Yes
Yes
Is EOL in valid format?
Is EOL in valid fo...
Validation error
Validation error
Yes
Yes
Is EOL in future?
Is EOL in future?
Yes
Yes
Does EOL has the correct day and month?
Does EOL has the corre...
Yes
Yes
Does SLA exist in PDC?
Does SLA exist in PDC?
Bugzilla ticket validation
Bugzilla ticket validat...
Ticket received
Ticket received
No
No
Yes
Yes
Does ticket exists in Bugzilla? 
Does ticket exists in B...
Validation error
Validation error
Yes
Yes
No
No
Is namespace rpms with branch other than rawhide or main?
Is namespace rpms with branc...
No
No
Yes
Yes
Is this the epel branch? 
Is this the epel branch...
Yes
Yes
No
No
Is ticket for Fedora EPEL?
Is ticket for Fedora EP...
No
No
Yes
Yes
Is ticket for Fedora EPEL?
Is ticket for Fedora EP...
Yes
Yes
No
No
Does ticket have correct component?
Does ticket have correct com...
No
No
Yes
Yes
Is the ticket for correct package?
Is the ticket for correct pa...
Validation error
Validation error
Yes
Yes
Is the ticket assigned to anyone?
Is the ticket assigned to an...
Yes
Yes
Does ticket creator exist in FAS?
Does ticket creator exist in...
Yes
Yes
Does bugzilla ticket creator match SCM requester?
Does bugzilla ticket creator...
Yes
Yes
No
No
Is the ticket approved?
Is the ticket approved?
Yes
Yes
No
No
Does the reviewer has FAS account?
Does the reviewer has FAS ac...
Yes
Yes
Is the reviewer a packager?
Is the reviewer a packager?
Yes
Yes
Is the ticket creator a packager?
Is the ticket creator a pack...
Validation error
Validation error
Yes
Yes
Are the ticket approver and creator different users?
Are the ticket approver and...
Yes
Yes
Is ticket approved by ticket assignee?
Is ticket approved by ticket...
Yes
Yes
Is ticket approved in last 60 days?
Is ticket approved in last 6...
Yes
Yes
No
No
Is ticket name valid?
Is ticket name valid?
Validated
Validated
Epel package validation
Epel package validation
Branch received
Branch received
No
No
Yes
Yes
Is the EPEL package list retrieved succesfully?
Is the EPEL package list r...
Validation error
Validation error
Yes
Yes
No
No
Is the EPEL package available as noarch only or it's available for all arches?
Is the EPEL package available as noa...
Validation False
Validation False
Validation True
Validation True
Text is not SVG - cannot display
\ No newline at end of file