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: Run all Dart steps with both upgraded and downgraded dependencies #2540

Merged
merged 2 commits into from
Nov 1, 2024

Conversation

provokateurin
Copy link
Member

@provokateurin provokateurin commented Oct 2, 2024

Running the tests also ensures the code actually works and it's not just throwing no linting errors.

I only added the overrides to packages with tests as there is no way to automatically verify the overrides fix the build issues otherwise.
There seem to be some runtime issues with flutter_svg and vector_graphics, but I didn't look further into those.
This is only a step in the right direction and to verify that everything is fine with downgraded dependencies we need to have tests for every package.

@provokateurin provokateurin force-pushed the ci/dart-dependencies-upgrade-downgrade branch from ae84095 to ad2d4db Compare October 2, 2024 13:17
Copy link

codecov bot commented Oct 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 28.86%. Comparing base (eccfb2c) to head (0ba2f5f).
Report is 17 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2540      +/-   ##
==========================================
+ Coverage   28.84%   28.86%   +0.01%     
==========================================
  Files         370      370              
  Lines      136490   136544      +54     
==========================================
+ Hits        39376    39411      +35     
- Misses      97114    97133      +19     
Flag Coverage Δ *Carryforward flag
account_repository 98.47% <ø> (ø)
cookie_store 99.48% <ø> (ø) Carriedforward from eccfb2c
dashboard_app 96.05% <ø> (ø)
dynamite 31.05% <ø> (ø) Carriedforward from eccfb2c
dynamite_end_to_end_test 61.69% <ø> (ø) Carriedforward from eccfb2c
dynamite_runtime 85.40% <ø> (ø) Carriedforward from eccfb2c
interceptor_http_client 97.18% <ø> (ø) Carriedforward from eccfb2c
neon_dashboard 96.05% <ø> (ø) Carriedforward from eccfb2c
neon_framework 61.33% <ø> (ø)
neon_http_client 93.61% <ø> (-3.85%) ⬇️
neon_notifications 100.00% <ø> (ø) Carriedforward from eccfb2c
neon_storage 94.66% <ø> (ø)
neon_talk 99.45% <ø> (ø) Carriedforward from eccfb2c
nextcloud 24.33% <ø> (+0.01%) ⬆️
notifications_app 97.40% <ø> (ø)
notifications_push_repository 98.11% <ø> (ø)
sort_box 90.90% <ø> (ø) Carriedforward from eccfb2c
talk_app 98.93% <ø> (-0.01%) ⬇️

*This pull request uses carry forward flags. Click here to find out more.

see 3 files with indirect coverage changes

@Leptopoda
Copy link
Member

What is the state of this PR?
Is it ready for review? The last commit suggests that there is still work to do.
I'm not a fan of the dev overrides and am hesitant on approving them.

Other than that, great idea, and thanks for tackling this issue.

@provokateurin
Copy link
Member Author

What is the state of this PR?
Is it ready for review? The last commit suggests that there is still work to do.

It is basically ready, I just left the commit there to trigger the CI to show that it works.

I'm not a fan of the dev overrides and am hesitant on approving them.

Me neither, but it's the only way we can check that our own dependency constraints are working correctly.

@provokateurin
Copy link
Member Author

provokateurin commented Oct 20, 2024

I would at least be more comfortable with the overrides if we'd use pub workspace so we only have to define them once.

@provokateurin provokateurin force-pushed the ci/dart-dependencies-upgrade-downgrade branch from ad2d4db to b4e63e6 Compare November 1, 2024 17:51
@provokateurin
Copy link
Member Author

The overrides are now applied from a patch when running with downgraded dependencies.
They can still get outdated without us noticing it, but it will only affect CI and not development or production.

@provokateurin
Copy link
Member Author

provokateurin commented Nov 1, 2024

@provokateurin provokateurin force-pushed the ci/dart-dependencies-upgrade-downgrade branch from b4e63e6 to 0ba2f5f Compare November 1, 2024 18:13
Copy link
Member

@Leptopoda Leptopoda left a comment

Choose a reason for hiding this comment

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

Thanks a lot. I'm way more comfortable that way.

@provokateurin provokateurin merged commit 3ae067c into main Nov 1, 2024
11 checks passed
@provokateurin provokateurin deleted the ci/dart-dependencies-upgrade-downgrade branch November 1, 2024 18:57
@provokateurin
Copy link
Member Author

Eh I just realized having the pubspec.lock changes in the patch as well is probably not a good idea as it is going to need manual fixing every week when renovate tries to update it.
I had it in the patch to ensure we know if some of the lower constraints change (as then it would fail in CI), but it probably has to be removed.
I will wait until the next renovate run to see what happens in reality.

@provokateurin
Copy link
Member Author

Just as I expected it breaks right away: https://github.com/nextcloud/neon/actions/runs/11656047519/job/32451613800?pr=2629

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.

2 participants