Page MenuHomeSoftware Heritage

save_origin_webhooks, class edition
AbandonedPublicDraft

Authored by vlorentz on Nov 2 2022, 10:23 AM.

Details

Reviewers
anlambert
Summary

This refactors the webhook API in D8798, using classes instead of simple functions

This removes most of the boilerplate

Diff Detail

Repository
rDWAPPS Web applications
Branch
webhook-classes
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 32660
Build 51165: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 51164: arc lint + arc unit

Event Timeline

vlorentz created this revision.
  • remove unused set_docstring

Build is green

Patch application report for D8800 (id=31711)

Rebasing onto 024da72220...

Current branch diff-target is up to date.
Changes applied before test
commit ae5f6a44cb83e93be5deb5767c9702baddde2da4
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Nov 2 10:22:24 2022 +0100

    Refactor webhook API using classes instead of simple functions
    
    This removes most of the boilerplate

commit ad5ce708c1d00251bf99f78b5a556b79ae519cc9
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Nov 2 09:44:06 2022 +0100

    save_origin_webhooks: Add push webhook receivers for popular forges
    
    Summary:
    Add new Web API endpoints accepting only POST requests coming from push
    webhooks of the following popular forges or their instances:
    
    - Bitbucket
    - Gitea
    - GitHub
    - GitLab
    - SourceForge
    
    There is one API endpoint per forge type enabling to request or update the
    archival of a repository when new commits are pushed to it through the Save
    Code Now service. Each endpoint simply processes the webhook JSON payload
    sent by a forge in order to extract the repository URL and the visit type
    in order to create a new save request for the repository.
    
    Related to T4548
    
    Reviewers: #reviewers
    
    Maniphest Tasks: T4548
    
    Differential Revision: https://forge.softwareheritage.org/D8798

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/2100/ for more details.

Build has FAILED

Patch application report for D8800 (id=31712)

Rebasing onto 024da72220...

Current branch diff-target is up to date.
Changes applied before test
commit 933f546249ad3fd4f1d6e624c1d841eba1d3a835
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Nov 2 10:24:31 2022 +0100

    remove unused set_docstring

commit ae5f6a44cb83e93be5deb5767c9702baddde2da4
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Nov 2 10:22:24 2022 +0100

    Refactor webhook API using classes instead of simple functions
    
    This removes most of the boilerplate

commit ad5ce708c1d00251bf99f78b5a556b79ae519cc9
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Nov 2 09:44:06 2022 +0100

    save_origin_webhooks: Add push webhook receivers for popular forges
    
    Summary:
    Add new Web API endpoints accepting only POST requests coming from push
    webhooks of the following popular forges or their instances:
    
    - Bitbucket
    - Gitea
    - GitHub
    - GitLab
    - SourceForge
    
    There is one API endpoint per forge type enabling to request or update the
    archival of a repository when new commits are pushed to it through the Save
    Code Now service. Each endpoint simply processes the webhook JSON payload
    sent by a forge in order to extract the repository URL and the visit type
    in order to create a new save request for the repository.
    
    Related to T4548
    
    Reviewers: #reviewers
    
    Maniphest Tasks: T4548
    
    Differential Revision: https://forge.softwareheritage.org/D8798

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/2101/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/2101/console

Harbormaster returned this revision to the author for changes because remote builds failed.Nov 2 2022, 10:34 AM
Harbormaster failed remote builds in B32661: Diff 31712!