Open shafreenAnfar opened 4 years ago
@ThisaruGuruge @Maninda @BuddhiWathsala @niveathika do let me know if I have missed anything.
Note: Since all the modules depends the ballerina-lang, all the modules are required to subscribe for build events on ballerina-lang
We don't need to subscribe all the modules to the ballerina-lang, but the level 0 and the level 1 modules. Then the subsequent builds will trigger automatically right? Or am I missing something here?
Yeah, you are right. Just wanted to keep it simple at the expense of redundant builds due to two reasons.
1) Each module owner do not need to worry about the level
their module belongs to.
2) Centralize the responsibility to each module owner. In case their module didn't get triggered, it is simply because (s)he didn't subscribe to it. Other module owners has nothing to do with it.
The long term solution
can address all these things in a better way.
With the PR ballerina-platform/ballerina-lang#26083 we are now at the following state:
ballerina-lang
is now publishing the SNAPSHOT
artifacts to the Github on an event of pushing a commit to the master branch. (This is done via Publish Ballerina Snapshot
workflow in ballerina-lang
).ballerina-lang
SNAPSHOT
is published to the Github, another workflow will be triggered to publish all the standard library module SNAPSHOT
artifacts to the Github. (This is done via Publish Stdlid Snapshots
workflow in ballerina-lang
).master
branch of a stdlib module, the module will be built, and the SNAPSHOT
artifact will be published to the respective repository.Publish Stdlid Snapshots
workflow in ballerina-lang
).@shafreenAnfar Shall we close this, as it no longer valid?
Background
At the moment each standard library module has it is own repository and the health of the each module is tested by running daily builds against the master. This daily build get triggered on a preconfigured cron expression.
Further, since there are standard libraries which depends on other standard libraries, each module must be built in certain order. Therefore, in order to decide When to build What, we have come up with a
level
system. Each module belongs to certainlevel
starting from 0 to N.Problem
Even though this allows us to check the status of the each module, this has some drawbacks such as,
The short term solution
As the short term, it was decided to move from cron based daily builds to pub-sub style of builds. Idea is quite simple,
completed
on master.What this means in terms of github actions is each module needs to have a final step which triggers a build on interested parties. Each interested party needs to have configured
repository_dispatch
event in their daily build workflow.Note: Since all the modules depends the
ballerina-lang
, all the modules are required to subscribe for build events onballerina-lang
Issues with the short term solution
Even though this solves the aforementioned problems, it does have it is own problems such as,
The long term solution
Centralized build pipeline is needed to solve this problem properly. Something similar to the
release pipeline
. Following is the high level idea,Note: This centralized build pipeline can be made smarter and smarter. For instance, it can be improved to automatically update the dependency entry of each modules by walking each repo.
This solution is complex compared to the
the short term solution
but has no drawbacks.