Skip to content

fix: verify Flatpak bundles during release - #31

Open
Aaqibhafeezkhan wants to merge 1 commit into
openapi:mainfrom
Aaqibhafeezkhan:fix/24-flatpak-build
Open

Aaqibhafeezkhan wants to merge 1 commit into
openapi:mainfrom
Aaqibhafeezkhan:fix/24-flatpak-build

Conversation

@Aaqibhafeezkhan

Copy link
Copy Markdown

Closes #24

@francescobianco francescobianco left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you @Aaqibhafeezkhan for this contribution, and for picking up two issues at once!

Removing continue-on-error and installing the bundle with flatpak install --bundle + flatpak info means a broken .flatpak can no longer end up silently attached to a release. Passing --runtime-repo also lets users install the bundle without adding Flathub by hand first.

You are now part of the Openapi® ecosystem, and we'd love to see you in our contributors registry: https://github.com/openapi/contributors. Fork it, add your row (main project: openapi/gknowledge), open a PR, and you can put the Openapi® Contributor badge on your profile README.

Openapi® Contributor

@francescobianco

Copy link
Copy Markdown
Member

@Aaqibhafeezkhan a few details on where #24 stands, so you can take it all the way if you like:

The original error is already gone. The appstreamcli compose failure showed up in v0.1.0 (the flatpak-bundle job failed and no .flatpak was attached). From v0.2.x the job passes and v0.2.2 ships gknowledge-v0.2.2.flatpak (166 KB). What we still don't know is whether that bundle actually works. Your install + flatpak info step is the first real check, so here is what's left to close #24 for good:

  1. Prove the workflow on your fork. Push a throwaway tag (e.g. v0.0.0-test1) to your fork and link the green run here. Without continue-on-error, a red job would now block releases, so we want to see it pass at least once before merging.
  2. pypdf is missing from the Flatpak. pyproject.toml lists pypdf as an optional extra and parsers._extract_pdf silently returns "" when it can't import it. Inside the sandbox, PDFs would therefore import as empty sources without any error. Adding a python3-pypdf module to the manifest (e.g. generated with flatpak-pip-generator) would fix it.
  3. Portals have never been tested in a real run. The manifest has no --filesystem access, so everything goes through Gtk.FileDialog and the document portal. Please check with flatpak run io.gknowledge.Gknowledge: creating and reopening a project folder after a restart (SQLite and knowledge/ live inside it), Import files / Import folder, and the ChatGPT login, which opens the browser with webbrowser.open (providers/chatgpt.py).
  4. Optional: flatpak-builder-lint manifest and flatpak-builder-lint repo repo. Whatever it reports is our to-do list for Flathub.

Points 2 and 3 can go in this PR or in a follow-up, whichever you prefer. A few lines in the PR description with what you reproduced and tested would be enough.

And once again: you'd be very welcome in the Openapi® contributors registry → https://github.com/openapi/contributors (add your row with openapi/gknowledge as main project). Thank you! 🙌

@Aaqibhafeezkhan

Copy link
Copy Markdown
Author

Points 2 and 3 can go in this PR or in a follow-up, whichever you prefer. A few lines in the PR description with what you reproduced and tested would be enough.

I can do them in a follow up?

@francescobianco francescobianco left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Aaqibhafeezkhan yes, absolutely: a follow-up is perfectly fine. Feel free to open separate PRs for points 2 (pypdf in the Flatpak) and 3 (portal testing); they will be reviewed and merged just like this one.

One small reminder: to be officially recognised as a contributor, please add yourself to our official contributors list. Fork https://github.com/openapi/contributors, add your row with openapi/gknowledge as main project, and open a PR there. Once it's merged you'll show up in the registry and can use the Openapi® Contributor badge on your profile. 🙌

Approving this one, thanks again!

This branch has not been deployed

No deployments
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.

Fix the Flatpak build (appstreamcli compose fails)

2 participants