OpenPecha / Requests

RFWs and RFCs for all OpenPecha repositories
0 stars 0 forks source link

[RFC0025] Pipeline to automate view update #97

Open 10zintopjor opened 1 year ago

10zintopjor commented 1 year ago

Work Planning

Details

Table of Contents

- [Housekeeping](#housekeeping) - [Named Concepts](#named-concepts) - [Summary](#summary) - [Reference-Level Explanation](#reference-level-explanation) - [Alternatives](#alternatives) * [Rationale](#rationale) - [Drawbacks](#drawbacks) - [Useful References](#useful-references) - [Unresolved questions](#unresolved-questions) - [Parts of the system affected](#parts-of-the-system-affected) - [Future possibilities](#future-possibilities) - [Infrastructure](#infrastructure) - [Testing](#testing) - [Documentation](#documentation) - [Version History](#version-history) - [Recordings](#recordings) - [Work Phases](#work-phases)

Housekeeping

*Please add ref in specified format into `RFC` title, e.g `[RFC9999]` if corresponding RFW is `[RFW9999]`.* *Please add into this `RFC` and related `PR's` titles `[RFC_id]` e.g `[RFC_9999]`.* ALL BELOW FIELDS ARE REQUIRED

Named Concepts

**Collection** : Collection in openpecha can be collection of opfs(pecha), opa(alignment) and collection. **Github Action** : Continuous integration and Continuous delivery (CI/CD) platform that allows you to automate your build, test, and deployment pipeline. **WebHook**: A webhook is an HTTP-based callback function that allows lightweight, event-driven communication between 2 application programming interfaces (APIs).

Summary

A pipeline that automatically updates a collection's view when its associated OPFS has been updated.

Reference-Level Explanation

A Github Action associated with a collection will be triggered via webhook when changes are made to the source OPFS upon opening of an issue. Utilizing the data contained within the issue, which consists of the Pecha IDs, the action will create a new view and update the collection.

Alternatives

Embedding actions in each repository is possible, but free GitHub organizations have certain limitations, such as the lack of an Organization Secret for storing GitHub Tokens.

Rationale

- Why the currently proposed design was selected over alternatives? We dont have to buy the enteprise version. - What would be the impact of going with one of the alternative approaches? No need of webhook.

Drawbacks

Have to maintain the server.

Useful References

*Describe useful parallels and learnings from other requests, or work in previous projects.* - What similar work have we already successfully completed?:None - Is this something that have already been built by others?:None - What other related learnings we have?:Github Action - Are there useful academic literature or other articles related with this topic? (provide links):None - Have we built a relevant prototype previously?:No - Do we have a rough mock for the UI/UX?:No - Do we have a schematic for the system?:No

Unresolved Questions

- What is there that is unresolved (and will be resolved as part of fulfilling this request)? - Are there other requests with same or similar problems to solve?:No

Parts of the System Affected

- Which parts of the current system are affected by this request?:OPC - What other open requests are closely related with this request?:RFW0027 - Does this request depend on fulfillment of any other request?:No - Does any other request depend on the fulfillment of this request?:RFW0027

Future possibilities

*How do you see the particular system or part of the system affected by this request be altered or extended in the future.*

Infrastructure

- Server to listen to OpenPecha-Data - Github Action to do the automation. - Openpecha to create the views.

Testing

The testing procedure can be done in the following steps: - Check if the action runs when a new issue is opened with certain label. - Assert the new views to the expected views. - Test whether the new views are pushed in the collection repository.

Documentation

- Developer Documentation - Embedding the action in the collection

Version History

v 0.0.1

Recordings

*Links to audio recordings of related discussion.*

Work Phases

Planning

Keep original naming and structure, and keep as first section in Work phases section

Implementation

Completion

kaldan007 commented 1 year ago

@jungtop in case of pecha collection i don't see any issue with current workflow. But when it comes to alignment collections, i think we need to keep our alignment files synced with associated opfs and we can then listen to updates in alignment files and trigger the view updates. As despite knowing changes in opfs, if our alignments are not updated we can't serialise the views.

10zintopjor commented 1 year ago

@kaldan007 oh it is right,for opa the action should listen to the changes in the opa.Also there should be another github action for opa which updates the opa when there is a change in the source opfs of opa.

10zinten commented 1 year ago

lgtm

ngawangtrinley commented 1 year ago

@jungtop please download Grammarly and proofread the English of your RFC.

10zintopjor commented 1 year ago

Waiting for Web hook from @10zinten