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

Update GTK stack for use in CI/CD #466

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Lord-Kamina
Copy link
Contributor

Ok @cas--, you win; I'll split it.

I also opted to make a new PR that will supersede #454, to make it easier to keep track of the discussion, were there to be any.

After this, I will make another PR for unpinning pytest (I might include the change from gtkreactor to gireactor in this latter one because I genuinely think it would make everybody's lives easier, but you tell me)

This is just the bit updating the GTK stack. As you can see, I've reverted the changes to libtorrent and such (although I maintain it should be somewhat of a priority to address this sooner rather than later)

@Lord-Kamina Lord-Kamina mentioned this pull request Sep 18, 2024
@Lord-Kamina
Copy link
Contributor Author

@cas-- anything that needs to change here before this can be merged? (The CI fails should be resolved by triggering a manual run at the gvsbuild-release repo)

@cas-- cas-- added the package A label to force the CI packaging job label Feb 2, 2025
@@ -89,6 +97,24 @@ jobs:
cache: "pip"
cache-dependency-path: "requirements*.txt"

- name: Determine gvsbuild release URL
Copy link
Member

Choose a reason for hiding this comment

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

If we are not running the gtkui tests then we should not be installing gtk here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The idea is to enable the gtk tests though. I think that might have gotten cut onto another PR though.

Copy link
Member

Choose a reason for hiding this comment

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

If we are not using it let's leave it out of this PR, the code is always going to be in CD.yml. Also it doesn't address the Linux GTK tests

@@ -29,7 +29,7 @@ jobs:
run: |
pip install --upgrade pip wheel
pip install tox
sudo apt-get install enchant-2
sudo apt-get install enchant-2 libgirepository1.0-dev
Copy link
Member

Choose a reason for hiding this comment

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

Why are we installing this for docs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I honestly can't remember 100% but it is possible that it failed somewhere without it. Would have to look it up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed as well.

@@ -1,4 +1,4 @@
libtorrent
libtorrent==2.0.7
Copy link
Member

Choose a reason for hiding this comment

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

This shouldn't need pinned?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes because things in newer libtorrent made tests fail, so until tests are updated, it has to be.

Copy link
Member

Choose a reason for hiding this comment

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

So for CI we already have this pinned so this only affects local testing, perhaps there shouldn't be a difference but that is also a question about pinning the entire test/dev stack to known working dependencies. I really do want to fix the tests for libtorrent > 2.0.7 so keeping it unpinned serves as a reminder

python: ["3.9"]
libtorrent: [2.0.7, 1.2.19]
python: ["3.7", "3.10"]
libtorrent: [2.0.8, 1.2.19]
Copy link
Member

Choose a reason for hiding this comment

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

Is 2.0.8 available?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually I think this was a typo or possibly I missed this when reverting. I can't find it now so it should go back to 2.0.7 (for now)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed back to 2.0.7

@@ -36,6 +42,7 @@ jobs:

- name: Install dependencies
run: |
sudo apt-get install libcairo2-dev libgirepository1.0-dev
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't seem right to be installing these dev dependencies, everything should have been built already?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed it for now.

@@ -74,7 +81,8 @@ jobs:
runs-on: windows-2022
strategy:
matrix:
python-version: ["3.7", "3.10"]
python-version: ["3.7", "3.9", "3.10"]
Copy link
Member

Choose a reason for hiding this comment

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

Why are we including 3.9 here and removing it from package build?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm including it due to some differences in the importlib module. It's not relevant now but I think it will be to test against with some PR I've yet to submit.

Copy link
Member

Choose a reason for hiding this comment

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

Let's leave that to the other PR then

@@ -77,7 +88,6 @@ jobs:
working-directory: deluge_src
run: |
python -m pip install .
python setup.py install_scripts
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure removing this is correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope. I think it might be with something I did on another branch but I'll cross that bridge when I get there.
Reverted for now.

Comment on lines -15 to +25
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.7", "3.10"]

python-version: ["3.9", "3.10"]
os: ["ubuntu-24.04"]
include:
- os: ubuntu-22.04
python-version: 3.7
runs-on: ${{ matrix.os }}
Copy link
Member

Choose a reason for hiding this comment

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

Let's keep these Linux CI changes separate from the Windows GTK changes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That'll just prolong this whole thing. The linux changes are just: keep 22.04 (which needs an older python) and add a build on a newer version of ubuntu.

Copy link
Member

Choose a reason for hiding this comment

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

Can we keep the scope of this PR to Win GTK only please

@Lord-Kamina Lord-Kamina force-pushed the update_ci branch 7 times, most recently from 3bdf92d to 4401d33 Compare February 2, 2025 20:11
Clarified a little what this commit actually does.
@Lord-Kamina
Copy link
Contributor Author

BTW @cas-- I have pinned twisted here because of the issue with the maybe_coroutine test, until we can figure out what changed/is going on.
Other than that, I think most comments have been addressed.

Copy link
Member

@cas-- cas-- left a comment

Choose a reason for hiding this comment

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

Can we please keep PRs to a single feature/fix as outlined here: https://testing.googleblog.com/2024/07/in-praise-of-small-pull-requests.html?m=1

@@ -1,5 +1,5 @@
libtorrent
twisted[tls]>=17.1
twisted[tls]>=17.1,<=24.7
Copy link
Member

Choose a reason for hiding this comment

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

I have resolved the problem with Twisted 24.10 so this can be removed

shell: bash
run: |
test -z "${{ github.event.inputs.gvsbuild-tag }}" && tag=latest || tag="${{ github.event.inputs.gvsbuild-tag }}"
if [[ "$tag" == "latest" ]]; then URL="https://github.com/${{ github.repository_owner }}/gvsbuild-release/releases/$tag/download"; else URL="https://github.com/${{ github.repository_owner }}/gvsbuild-release/releases/download/$tag" ; fi
Copy link
Member

Choose a reason for hiding this comment

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

This should be able to split over multiple lines to make it more readable?

Comment on lines -15 to +25
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.7", "3.10"]

python-version: ["3.9", "3.10"]
os: ["ubuntu-24.04"]
include:
- os: ubuntu-22.04
python-version: 3.7
runs-on: ${{ matrix.os }}
Copy link
Member

Choose a reason for hiding this comment

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

Can we keep the scope of this PR to Win GTK only please

@@ -74,7 +81,8 @@ jobs:
runs-on: windows-2022
strategy:
matrix:
python-version: ["3.7", "3.10"]
python-version: ["3.7", "3.9", "3.10"]
Copy link
Member

Choose a reason for hiding this comment

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

Let's leave that to the other PR then

@@ -89,6 +97,24 @@ jobs:
cache: "pip"
cache-dependency-path: "requirements*.txt"

- name: Determine gvsbuild release URL
Copy link
Member

Choose a reason for hiding this comment

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

If we are not using it let's leave it out of this PR, the code is always going to be in CD.yml. Also it doesn't address the Linux GTK tests

@@ -1,4 +1,4 @@
libtorrent
libtorrent==2.0.7
Copy link
Member

Choose a reason for hiding this comment

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

So for CI we already have this pinned so this only affects local testing, perhaps there shouldn't be a difference but that is also a question about pinning the entire test/dev stack to known working dependencies. I really do want to fix the tests for libtorrent > 2.0.7 so keeping it unpinned serves as a reminder

@Lord-Kamina
Copy link
Contributor Author

Can we please keep PRs to a single feature/fix as outlined here: https://testing.googleblog.com/2024/07/in-praise-of-small-pull-requests.html?m=1

So here's my problem with this...

I understand the concept and motivation for wanting small PRs, and IMO I've been nothing if not accommodating. But other issues with it aside, this "nothing" PR has been open for months. This is not a dig on you or anyone else, because I know everyone working on this project does so as a volunteer freely contributing their time.

My point is this: These commits were meant as the first-step in getting a more modern CI pipeline as the foundation of other rather large and potentially breaking changes to deluge that require using newer versions of python (this is, dropping pkg_resources entirely and moving the plug-in system to using wheels and importlib).
That code is also already written and tested (rebasing, cleaning-up and addressing other issues aside).

And, that itself is just a preparatory step for something I've not yet done, which is make a better and easily-reproducible process for creating macOS packages and eventually, adding macOS to the CD.

With this in mind, and considering the snail pace at which this project moves (again, not a dig, but rather a fact), at some point you maybe gotta start wondering why don't you make it easier for everyone, yourself included? This was originally a much larger PR that involved fixing tests and also updating the python runtimes, which is why the there is an update on the linux workflow as well. I already split it and excluded the fixes to the testing suite, but at this point it's gone well beyond "small PRs are good". The change to the linux workflow is absolutely immaterial to the working of deluge or the CI, and is directly related to the intent of this PR.

It's incredibly frustrating because it seems like we're gettint fixated with dividing what should have been a simple task into an ever-increasing number of steps ad nauseam.

So, to recap: I understand and fully support the spirit of advocating for small PRs, but I think you're being maybe a tad excessive on this matter.

@Lord-Kamina
Copy link
Contributor Author

Can we please keep PRs to a single feature/fix as outlined here: https://testing.googleblog.com/2024/07/in-praise-of-small-pull-requests.html?m=1

And finally,

Let me quote how that same article ends:

Small pull requests are not always possible. In particular:
Frequent pull requests require reviewers to respond quickly to code review requests. If it takes multiple hours to get a pull request reviewed, developers spend more time blocked. Small pull requests often work better when reviewers are co-located (ideally within Nerf gun range for gentle reminders).

Some features cannot safely be committed in partial states. If this is a concern, try to put the new feature behind a flag.
Refactorings such as changing an argument type in a public method may require modifying many dozens of files at once.

Nonetheless, even if a pull request can’t be small, it can still be focused, e.g., fixing one bug, adding one feature or UI element, or refactoring one method.

And let me once again remind you that we're not talking here about "several hours" but rather months.

@kenstir
Copy link
Contributor

kenstir commented Feb 12, 2025

And let me once again remind you that we're not talking here about "several hours" but rather months.

To pile on just a little here, this project feels "stale" to me, a word which here means

  • PRs are not reviewed promptly. This one is obviously a redo of an old one, and it took 4 months to get a comment.
  • Releases are not packaged routinely. The last release was 2 years ago, and the previous one 2 years before that.
  • Prospective developers are not encouraged. I asked for help on Discord getting the tests passing on Ubuntu and didn't get help. I am an experienced developer and I offered my help with anything. I was answered with, "you can always clone the git repo", which of course I had already because I submitted a PR.

So as not only to complain, let me make some specific proposals:

  1. Add developers to the project. Not me, but people you trust. Allow them to do a preliminary (and timely) review of PRs and if necessary ask them not to merge for now if you want to maintain control.
  2. Create a new #dev-general channel on Discord for development support. Autobrr does this and it was helpful to me when I was submitting my first PRs. If you aren't in that channel regularly, designate some specific and regular time to be present in that channel.
  3. Decide what it is you want help with and what you want to control. For instance, you might want help with migrating the bug database from Trac. Write it up in an Issue and announce in #dev-general. I could help here. Maybe you want help with macOS packaging. I could help here. I wouldn't enjoy it, but I would be willing to do it if I knew it would at least be reviewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package A label to force the CI packaging job
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants