measuring software's embodied carbon; was: online meetup Wed. 20 Nov. 18h UTC | Green Coding Solutions: "Eco-CI" and "Powerletrics"

Ben Cooksley bcooksley at kde.org
Sun Dec 1 00:53:05 GMT 2024


On Sun, Dec 1, 2024 at 9:24 AM Ingo Klöcker <kloecker at kde.org> wrote:

> On Samstag, 30. November 2024 11:41:12 Mitteleuropäische Normalzeit Albert
> Astals Cid wrote:
> > El dissabte, 30 de novembre del 2024, a les 4:29:22 (Hora estàndard del
> > Centre d’Europa), Ben Cooksley va escriure:
> > > The two options I can see for resolving this are:
> > > a. Making use of the "ci.skip" Git push option when pushing a new work
> > > branch to be used in a merge request
> > > b. We set CI jobs as manual by default on work/ branches (optionally
> > > making
> > > use of a CI environment variable to allow work branches to run by
> default)
> > >
> > > I wouldn't be in favour of making the CI jobs disabled by default on
> work
> > > branches as that is non-intuitive / non-obvious behaviour, especially
> if
> > > you have to pass an environment variable to make them show up.
> >
> > How is it non-obvious? You created a "work" branch so no automatic CI for
> > you, if you want one, create a Merge Request (so you show your work to
> the
> > rest of us) or run the CI manually.
>
>
By disabled I was referring to the jobs not being generated at all - so you
would simply not receive a CI pipeline at all.
I don't think that is something we want to do, as the only way to switch it
on would be by using an environment variable.


> For the CD jobs we already do this. They are only run automatically on our
> mainline branches. Option b would merely extend this to all jobs for
> branch
> pipelines. The non-obvious part is that one has to know the KDE-specific
> CI/CD
> variable that one has to pass to change the behavior.
>

Yes, and given how much we're reliant on CI i'm reluctant to change this
behaviour too much.


>
> Option a could also be a workable solution. We could recommend to set
> ci.skip
> as default option via `git config set push.pushOption ci.skip`. This
> option
> behaves pretty sensible: "Skips only branch pipelines and not merge
> request
> pipelines." i.e. it does exactly what we want. And people should be able
> to
> trigger a branch pipeline by using `git push -o ""`, i.e. by passing an
> empty
> push option. Granted it's not super intuitive.
>
> I'm leaning toward option a because it leaves the choice to the users
> using a
> standard option offered by GitLab.
>
> I have now added this option to my KDE specific .gitconfig file which I
> include
> in the global ~/.gitconfig with
> ```
> [includeIf "gitdir:~/dev/kde/"]
>         path = ~/dev/kde/.gitconfig
> ```
>
> Another alternative would be to define an alias, e.g.
> alias.push-mr=push -o ci.skip -o merge_request.create
>

The alias seems reasonably workable / problem free from my perspective,
although it does need action on the developer side.


>
> Regards,
> Ingo
>

Cheers,
Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-community/attachments/20241201/c084ca3e/attachment.htm>


More information about the kde-community mailing list