[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: flatpak CI and stable builds - Re: KDE Gear projects with failing CI (release/23.08) (12 Septemb
From:       Ben Cooksley <bcooksley () kde ! org>
Date:       2023-09-21 7:54:59
Message-ID: CA+XidOGmq8OGJ+9mYq8LUFUM+LaZgrV7F8+bRzimwkB47fZ=kg () mail ! gmail ! com
[Download RAW message or body]

On Thu, Sep 21, 2023 at 8:35 AM Albert Astals Cid <aacid@kde.org> wrote:

> El dimecres, 20 de setembre de 2023, a les 13:17:22 (CEST), Ben Cooksley
> va
> escriure:
> > On Wed, Sep 20, 2023 at 9:42 AM Albert Astals Cid <aacid@kde.org> wrote:
> > > El dimarts, 19 de setembre de 2023, a les 22:18:40 (CEST),
> > >
> > > christoph@cullmann.io va escriure:
> > > > On 2023-09-19 21:35, Albert Astals Cid wrote:
> > > > > Please work on fixing them, otherwise i will remove the failing CI
> > > > > jobs on their 4th failing week, it is very important that CI is
> > > > > passing
> > > > > for
> > > > > multiple reasons.
> > > > >
> > > > > Bad news: We have 2 new repositories failing :/
> > > > >
> > > > > = FLATPAK FAILING =
> > > > >
> > > > > kate:
> > > > >  * https://invent.kde.org/utilities/kate/-/pipelines/484147
> > > > >
> > > > >   * This highlights a design problem, it's building markdown part
> from
> > > > >
> > > > > master
> > > > > instead of from stable branch. We can manually change the branch,
> but
> > > > > i
> > > > > would
> > > > > prefer a solution that doesn't mean changing lots and lots of
> flatpak
> > > > > manifests when we branch.
> > > >
> > > > Hmm, yes that sounds not nice.
> > > >
> > > > But not sure how that would work without that, seems
> > >
> > >
> https://invent.kde.org/utilities/kate/-/blob/master/.flatpak-manifest.json
> > > ?r>
> > > > ef_type=heads
> > > >
> > > > hard codes what to fetch.
> > > >
> > > > Given one hard codes there the
> > > >
> > > >   "runtime-version": "5.15-22.08",
> > >
> > > That one is "fine", the 22.08 here it's related to the "flatpak kde/
> > > freedesktop sdk" not to Gear stuff.
> > >
> > > Yes, we will massively have to update them on master when we decide to
> > > depend
> > > on a new one, but it won't cause problems on the stable branches like
> the
> > > oner
> > > we're experiencing here.
> > >
> > > The problem here is
> > >
> > > {
> > >
> > >   "name": "markdownpart",
> > >   "buildsystem": "cmake-ninja",
> > >   "sources": [
> > >
> > >     {
> > >
> > >       "type": "git",
> > >       "url": "https://invent.kde.org/utilities/markdownpart.git"
> > >
> > >     }
> > >
> > >   ]
> > >
> > > }
> > >
> > > This unconditionally compiles the master branch of markdownpart repo
> > >
> > > As far as i can see there's three solutions:
> > >
> > > A) If this is just "to make sure it builds CI", we don't need
> markdownpart
> > > nor
> > > konsole on the flatpak since they are just runtime dependencies. This
> is a
> > > sub-optimal solution i'd say since it makes it so that we can't offer
> the
> > > package for testing in the future and makes the diff with the flathub
> > > manifest
> > > bigger than it needs to be
> >
> > The overall intention is for the bundles produced by the Flatpak jobs to
> be
> > useful for people to locally test a project build.
> > In the not too distant future we'll have them available from a Flatpak
> > repository for actual mainline/release branches as well.
> >
> > So the answer certainly isn't (a).
> >
> > > B) Depend on released versions, i.e. a tarball in "sources" instead of
> a
> > > git
> > > repo. This is probably suboptimal too in the sense that will require
> > > constant
> > > updating on master and if we offer the resulting flatpak as "nightly"
> in
> > > the
> > > future for testing it's not "nightly" as it could be.
> >
> > Guess it depends on the nature of the dependency, but in the case of
> > software released together you probably want to build against what you
> will
> > be shipping against yes.
> >
> > > C) Add a marker in the .json like branch: "kde-same-branch" and then
> have
> > > the
> > > code in
> > >
> https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/f
> > > latpak.yml replace that "kde-same-branch" either by "master" or by
> > > the appropriate stable branch before actually compiling the flatpak. I
> > > think
> > > this would be the optimal solution but needs work.
> >
> > This is my preferred solution as well. it wouldn't be too difficult given
> > we have a Python script acting as a middle-man already.
> > In the past we did some rewriting of the .flatpak-manifest.yml already.
> >
> > Depending on our requirements it may be worth tying into the same
> > branch-rules.yml logic that the rest of the CI system uses but this is
> > probably best answered by someone who knows the various Flatpak manifests
> > we have better.
> >
> > In #flatpak:kde.org it was mentioned that this would mean that people
> > wouldn't be able to build it as easily themselves, but if we make it well
> > documented (comments in the .flatpak-manifest.yml, etc) then I think this
> > shouldn't be much of an issue.
>
> I had not thought of that and it's indeed not great.
>
> We could rename all the flatpak manifest that need this feature to .
> json.in to
> make it clear "it's not their final form" and that they need to be pre-
> processed.


> This does not help a lot to the "non CI user" if they want to actually use
> the
> manifest since they still need to pre-process it somehow :/
>

At least it would make it explicit that something is required before the
files can be utilised elsewhere.

Ultimately in the long term we are potentially looking at having release
builds we make be submitted into Flathub so this does need a solution in
some form or another.

Realistically I think we only have two choices here:
a) Have our release tooling include logic that bumps/updates the
.flatpak-manifest.yml files to have the right branch in them; or
b) Have a intermediary script like flatpak-build.py do that for us

For now the path of least resistance is probably (b) I think?


>
>
> Solution E)
>
> Since usually/mostly we have our projects be backwards API compatible it's
> usually/mostly not a problem to that kate stable uses markdown master
> (understanding the flatpaks generated by that CI are nightlies), we're
> only
> having this problem right now because of the KF6 transition.
>
> One potentially valid solution is to just disable flatpak CI in stable
> until
> this gets fixed, it's not great but it's just a few months.
>
> Cheers,
>   Albert
>

Cheers,
Ben


>
>
> >
> > > D) Something smarter I have not thought about.
> > >
> > > Cheers,
> > >
> > >   Albert
> >
> > Cheers,
> > Ben
> >
> > > > I assume one will need to hard code that, too, if one creates no own
> > > > scripting.
> > > >
> > > > But I might be wrong.
> > > >
> > > > Greetings
> > > > Christoph
> > > >
> > > > > = FAILING UNIT TESTS =
> > > > >
> > > > > konsole:
> > > > >  * https://invent.kde.org/utilities/konsole/-/pipelines/484148
> > > > >
> > > > >   * freebsd_qt515 tests are failing
>
>
>
>
>

[Attachment #3 (text/html)]

<div dir="ltr"><div dir="ltr">On Thu, Sep 21, 2023 at 8:35 AM Albert Astals Cid \
&lt;<a href="mailto:aacid@kde.org">aacid@kde.org</a>&gt; wrote:<br></div><div \
class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">El dimecres, 20 de \
setembre de 2023, a les 13:17:22 (CEST), Ben Cooksley va <br> escriure:<br>
&gt; On Wed, Sep 20, 2023 at 9:42 AM Albert Astals Cid &lt;<a \
href="mailto:aacid@kde.org" target="_blank">aacid@kde.org</a>&gt; wrote:<br> &gt; \
&gt; El dimarts, 19 de setembre de 2023, a les 22:18:40 (CEST),<br> &gt; &gt; <br>
&gt; &gt; <a href="mailto:christoph@cullmann.io" \
target="_blank">christoph@cullmann.io</a> va escriure:<br> &gt; &gt; &gt; On \
2023-09-19 21:35, Albert Astals Cid wrote:<br> &gt; &gt; &gt; &gt; Please work on \
fixing them, otherwise i will remove the failing CI<br> &gt; &gt; &gt; &gt; jobs on \
their 4th failing week, it is very important that CI is<br> &gt; &gt; &gt; &gt; \
passing<br> &gt; &gt; &gt; &gt; for<br>
&gt; &gt; &gt; &gt; multiple reasons.<br>
&gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; Bad news: We have 2 new repositories failing :/<br>
&gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; = FLATPAK FAILING =<br>
&gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; kate:<br>
&gt; &gt; &gt; &gt;   * <a \
href="https://invent.kde.org/utilities/kate/-/pipelines/484147" rel="noreferrer" \
target="_blank">https://invent.kde.org/utilities/kate/-/pipelines/484147</a><br> &gt; \
&gt; &gt; &gt;   <br> &gt; &gt; &gt; &gt;     * This highlights a design problem, \
it&#39;s building markdown part from<br> &gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; master<br>
&gt; &gt; &gt; &gt; instead of from stable branch. We can manually change the branch, \
but<br> &gt; &gt; &gt; &gt; i<br>
&gt; &gt; &gt; &gt; would<br>
&gt; &gt; &gt; &gt; prefer a solution that doesn&#39;t mean changing lots and lots of \
flatpak<br> &gt; &gt; &gt; &gt; manifests when we branch.<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; Hmm, yes that sounds not nice.<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; But not sure how that would work without that, seems<br>
&gt; &gt; <br>
&gt; &gt; <a href="https://invent.kde.org/utilities/kate/-/blob/master/.flatpak-manifest.json" \
rel="noreferrer" target="_blank">https://invent.kde.org/utilities/kate/-/blob/master/.flatpak-manifest.json</a><br>
 &gt; &gt; ?r&gt; <br>
&gt; &gt; &gt; ef_type=heads<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; hard codes what to fetch.<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; Given one hard codes there the<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt;     &quot;runtime-version&quot;: &quot;5.15-22.08&quot;,<br>
&gt; &gt; <br>
&gt; &gt; That one is &quot;fine&quot;, the 22.08 here it&#39;s related to the \
&quot;flatpak kde/<br> &gt; &gt; freedesktop sdk&quot; not to Gear stuff.<br>
&gt; &gt; <br>
&gt; &gt; Yes, we will massively have to update them on master when we decide to<br>
&gt; &gt; depend<br>
&gt; &gt; on a new one, but it won&#39;t cause problems on the stable branches like \
the<br> &gt; &gt; oner<br>
&gt; &gt; we&#39;re experiencing here.<br>
&gt; &gt; <br>
&gt; &gt; The problem here is<br>
&gt; &gt; <br>
&gt; &gt; {<br>
&gt; &gt; <br>
&gt; &gt;     &quot;name&quot;: &quot;markdownpart&quot;,<br>
&gt; &gt;     &quot;buildsystem&quot;: &quot;cmake-ninja&quot;,<br>
&gt; &gt;     &quot;sources&quot;: [<br>
&gt; &gt;     <br>
&gt; &gt;        {<br>
&gt; &gt;        <br>
&gt; &gt;           &quot;type&quot;: &quot;git&quot;,<br>
&gt; &gt;           &quot;url&quot;: &quot;<a \
href="https://invent.kde.org/utilities/markdownpart.git" rel="noreferrer" \
target="_blank">https://invent.kde.org/utilities/markdownpart.git</a>&quot;<br> &gt; \
&gt;        <br> &gt; &gt;        }<br>
&gt; &gt;     <br>
&gt; &gt;     ]<br>
&gt; &gt; <br>
&gt; &gt; }<br>
&gt; &gt; <br>
&gt; &gt; This unconditionally compiles the master branch of markdownpart repo<br>
&gt; &gt; <br>
&gt; &gt; As far as i can see there&#39;s three solutions:<br>
&gt; &gt; <br>
&gt; &gt; A) If this is just &quot;to make sure it builds CI&quot;, we don&#39;t need \
markdownpart<br> &gt; &gt; nor<br>
&gt; &gt; konsole on the flatpak since they are just runtime dependencies. This is \
a<br> &gt; &gt; sub-optimal solution i&#39;d say since it makes it so that we \
can&#39;t offer the<br> &gt; &gt; package for testing in the future and makes the \
diff with the flathub<br> &gt; &gt; manifest<br>
&gt; &gt; bigger than it needs to be<br>
&gt; <br>
&gt; The overall intention is for the bundles produced by the Flatpak jobs to be<br>
&gt; useful for people to locally test a project build.<br>
&gt; In the not too distant future we&#39;ll have them available from a Flatpak<br>
&gt; repository for actual mainline/release branches as well.<br>
&gt; <br>
&gt; So the answer certainly isn&#39;t (a).<br>
&gt; <br>
&gt; &gt; B) Depend on released versions, i.e. a tarball in &quot;sources&quot; \
instead of a<br> &gt; &gt; git<br>
&gt; &gt; repo. This is probably suboptimal too in the sense that will require<br>
&gt; &gt; constant<br>
&gt; &gt; updating on master and if we offer the resulting flatpak as \
&quot;nightly&quot; in<br> &gt; &gt; the<br>
&gt; &gt; future for testing it&#39;s not &quot;nightly&quot; as it could be.<br>
&gt; <br>
&gt; Guess it depends on the nature of the dependency, but in the case of<br>
&gt; software released together you probably want to build against what you will<br>
&gt; be shipping against yes.<br>
&gt; <br>
&gt; &gt; C) Add a marker in the .json like branch: &quot;kde-same-branch&quot; and \
then have<br> &gt; &gt; the<br>
&gt; &gt; code in<br>
&gt; &gt; <a href="https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/f" \
rel="noreferrer" target="_blank">https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/f</a><br>
 &gt; &gt; latpak.yml replace that &quot;kde-same-branch&quot; either by \
&quot;master&quot; or by<br> &gt; &gt; the appropriate stable branch before actually \
compiling the flatpak. I<br> &gt; &gt; think<br>
&gt; &gt; this would be the optimal solution but needs work.<br>
&gt; <br>
&gt; This is my preferred solution as well. it wouldn&#39;t be too difficult \
given<br> &gt; we have a Python script acting as a middle-man already.<br>
&gt; In the past we did some rewriting of the .flatpak-manifest.yml already.<br>
&gt; <br>
&gt; Depending on our requirements it may be worth tying into the same<br>
&gt; branch-rules.yml logic that the rest of the CI system uses but this is<br>
&gt; probably best answered by someone who knows the various Flatpak manifests<br>
&gt; we have better.<br>
&gt; <br>
&gt; In #flatpak:<a href="http://kde.org" rel="noreferrer" \
target="_blank">kde.org</a> it was mentioned that this would mean that people<br> \
&gt; wouldn&#39;t be able to build it as easily themselves, but if we make it \
well<br> &gt; documented (comments in the .flatpak-manifest.yml, etc) then I think \
this<br> &gt; shouldn&#39;t be much of an issue.<br>
<br>
I had not thought of that and it&#39;s indeed not great.<br>
<br>
We could rename all the flatpak manifest that need this feature to .<a \
href="http://json.in" rel="noreferrer" target="_blank">json.in</a> to <br> make it \
clear &quot;it&#39;s not their final form&quot; and that they need to be pre-<br> \
processed.  </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br>
This does not help a lot to the &quot;non CI user&quot; if they want to actually use \
the <br> manifest since they still need to pre-process it somehow \
:/<br></blockquote><div><br></div><div>At least it would make it explicit that \
something is required before the files can be utilised \
elsewhere.</div><div><br></div><div>Ultimately in the long term we are potentially \
looking at having release builds we make be submitted into Flathub so this does need \
a solution in some form or another.<br></div><div><br></div><div>Realistically I \
think we only have two choices here:</div><div>a) Have our release tooling include \
logic that bumps/updates the .flatpak-manifest.yml files to have the right branch in \
them; or</div><div>b) Have a intermediary script like flatpak-build.py do that for \
us</div><div><br></div><div>For now the path of least resistance is probably (b) I \
think?</div><div>  </div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br>
<br>
Solution E)<br>
<br>
Since usually/mostly we have our projects be backwards API compatible it&#39;s <br>
usually/mostly not a problem to that kate stable uses markdown master <br>
(understanding the flatpaks generated by that CI are nightlies), we&#39;re only <br>
having this problem right now because of the KF6 transition.<br>
<br>
One potentially valid solution is to just disable flatpak CI in stable until <br>
this gets fixed, it&#39;s not great but it&#39;s just a few months.<br>
<br>
Cheers,<br>
   Albert<br></blockquote><div><br></div><div>Cheers,</div><div>Ben</div><div>  \
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px \
solid rgb(204,204,204);padding-left:1ex"> <br>
<br>
&gt; <br>
&gt; &gt; D) Something smarter I have not thought about.<br>
&gt; &gt; <br>
&gt; &gt; Cheers,<br>
&gt; &gt; <br>
&gt; &gt;     Albert<br>
&gt; <br>
&gt; Cheers,<br>
&gt; Ben<br>
&gt; <br>
&gt; &gt; &gt; I assume one will need to hard code that, too, if one creates no \
own<br> &gt; &gt; &gt; scripting.<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; But I might be wrong.<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; Greetings<br>
&gt; &gt; &gt; Christoph<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; = FAILING UNIT TESTS =<br>
&gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; konsole:<br>
&gt; &gt; &gt; &gt;   * <a \
href="https://invent.kde.org/utilities/konsole/-/pipelines/484148" rel="noreferrer" \
target="_blank">https://invent.kde.org/utilities/konsole/-/pipelines/484148</a><br> \
&gt; &gt; &gt; &gt;   <br> &gt; &gt; &gt; &gt;     * freebsd_qt515 tests are \
failing<br> <br>
<br>
<br>
<br>
</blockquote></div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic