Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: More flatpak ci fixes #824

Closed
wants to merge 1 commit into from
Closed

Conversation

cgwalters
Copy link
Member

We need our make install to override the ostree RPM, so do it all in one txn.
This sort of thing is where a more rigorous model like rdgo/gcontinuous use
becomes better, but we'll hack it with shell for now.

@jlebon
Copy link
Member

jlebon commented May 2, 2017

Yup, makes sense! Though there are still some failures it seems. 😢
Feel free to merge if you mean to investigate this in a separate PR.

@jlebon
Copy link
Member

jlebon commented May 2, 2017

ERROR: tests/test-run.sh
========================
...
+ /tmp/tmp.SrvEsn2GNT/flatpak/tests/test-webserver.sh repos
cmp: EOF on /var/tmp/tap-test.FIEWHd/httpd-port
++ cat httpd-port
+ port=
++ cat httpd-pid
+ FLATPAK_HTTP_PID=29889
+ flatpak remote-add --user --gpg-import=/var/tmp/test-flatpak-1CsUdX/gpghome/pubring.gpg test-repo http://127.0.0.1:/test
+ install_repo
+ flatpak --user install test-repo org.test.Platform master
error: Could not connect: Connection refused

Not sure what happened there. Seems like the web server couldn't get started?

All the other failures are variations of:

++ echo 'Couldn'\''t find '\''/var/tmp/test-flatpak-UQW869/system/exports/share/applications/mimeinfo.cache'\'''
Couldn't find '/var/tmp/test-flatpak-UQW869/system/exports/share/applications/mimeinfo.cache'

@cgwalters
Copy link
Member Author

It looks like this got a lot closer...we possibly got OOM killed?

bot, retest this please

@cgwalters
Copy link
Member Author

bot, retest this please

cgwalters added a commit to cgwalters/flatpak that referenced this pull request May 5, 2017
I was seeing this when trying to run flatpak's tests in ostree's CI:
ostreedev/ostree#824

The race here is that the python process can still be writing to the output
while sed is reading it, and hence we'll find a difference on the next line.
Fix this by making a tmp copy of the file, which then both sed and cmp will
read consistently.

I'm not *entirely* sure this will fix the problem as I couldn't easily reproduce
the race locally, but I believe it at least fixes *a* race.
@cgwalters
Copy link
Member Author

I think this is flatpak/flatpak#772

@cgwalters
Copy link
Member Author

bot, retest this please

alexlarsson pushed a commit to flatpak/flatpak that referenced this pull request May 8, 2017
I was seeing this when trying to run flatpak's tests in ostree's CI:
ostreedev/ostree#824

The race here is that the python process can still be writing to the output
while sed is reading it, and hence we'll find a difference on the next line.
Fix this by making a tmp copy of the file, which then both sed and cmp will
read consistently.

I'm not *entirely* sure this will fix the problem as I couldn't easily reproduce
the race locally, but I believe it at least fixes *a* race.
@cgwalters
Copy link
Member Author

Ah yep, RAM was the problem. This should be GTG.

ci/flatpak.sh Outdated
dnf builddep -y ostree flatpak
dnf install -y flatpak && rpm -e flatpak
# From the current flatpak builds
dnf install -y gcc sudo which attr fuse gjs parallel clang libubsan gnome-desktop-testing 'pkgconfig(fuse)' 'pkgconfig(gio-unix-2.0)' 'pkgconfig(gobject-introspection-1.0)' 'pkgconfig(json-glib-1.0)' 'pkgconfig(libarchive)' 'pkgconfig(libelf)' 'pkgconfig(libsoup-2.4)' 'pkgconfig(ostree-1)' 'pkgconfig(polkit-gobject-1)' 'pkgconfig(libseccomp)' 'pkgconfig(xau)' 'bubblewrap' docbook-dtds docbook-style-xsl intltool libattr-devel libcap-devel libdwarf-devel elfutils systemd ostree gpgme-devel /usr/bin/xmlto /usr/bin/xsltproc redhat-rpm-config /usr/bin/update-mime-database /usr/bin/update-desktop-database /usr/bin/gtk-update-icon-cache
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we just fetch it from the YAML file after we clone it, e.g. something like:

python3 -c 'import yaml; y = list(yaml.load_all(open(".redhat-ci.yml")))[0]; print("\n".join(y["packages"]))' | xargs dnf install -y

?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, done (though I had to use NUL rather than newline separated to make e.g. pkgconfig(gobject-introspection-1.0) >= 1.40.0 work).

That said the reason I didn't do this is I think at least for flatpak we should switch upstream to do privcontainer rather than host as we are here - and that circles back to enhancing rhci for this, or prototyping it outside perhaps.

We need our `make install` to override the ostree RPM, so do it all in one txn.
This sort of thing is where a more rigorous model like rdgo/gcontinuous use
becomes better, but we'll hack it with shell for now.
@cgwalters
Copy link
Member Author

OK, rebased and squashed.

@jlebon
Copy link
Member

jlebon commented May 9, 2017

Nice!
@rh-atomic-bot r+ 8aa7556

@rh-atomic-bot
Copy link

⌛ Testing commit 8aa7556 with merge 7c88161...

@rh-atomic-bot
Copy link

☀️ Test successful - status-atomicjenkins
Approved by: jlebon
Pushing 7c88161 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants