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

Ecosystem testing #320

Merged
merged 77 commits into from
Dec 5, 2024
Merged

Ecosystem testing #320

merged 77 commits into from
Dec 5, 2024

Conversation

mosuem
Copy link
Member

@mosuem mosuem commented Nov 15, 2024

Workflow for testing a package upgrade against the ecosystem.

See for example mosuem/i18n#2 (comment)


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

@github-actions github-actions bot added the type-infra A repository infrastructure change or enhancement label Nov 15, 2024
Copy link

github-actions bot commented Nov 15, 2024

PR Health

Breaking changes ✔️
Package Change Current Version New Version Needed Version Looking good?
Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

Coverage ✔️
File Coverage

This check for test coverage is informational (issues shown here will not fail the PR).

API leaks ✔️

The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.

Package Leaked API symbols
License Headers ✔️
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Files
no missing headers

All source files should start with a license header.

Copy link
Member

@devoncarew devoncarew left a comment

Choose a reason for hiding this comment

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

A few in-line comments, mostly to help me get context on the PR.

I hadn't considered this mechanism - a re-usable workflow. With this, any repo could set up a mini-corpus to test what a package upgrade might do to their apps under test.

I think another - perhaps less flexible solution - would be thuswise:

  • have a standalone repo for testing package upgrades (this would be useful for testing highly used packages, but not general packages)
  • have a corpus of apps defined declaratively
  • have a PR somehow indicate which package upgrade to test (modifying a specific file?) the system would likely use this to generate dependency override files
  • attempt to shard the PR's workflow into multiple jobs, one per app in the corpus. then failure of a specific corpus app is easier to investigate
  • have the workflow collate all job status info into a markdown table that it appends to the PR; this might show info like which apps changed state from 'pub get' working to 'pub get' failing; similarly for analysis and test

The markdown table lets you see at a glance which apps were adversely affected by the package upgrade.

Thoughts?

.github/repos.txt Outdated Show resolved Hide resolved
.github/workflows/ecosystem_test.yaml Show resolved Hide resolved
.github/workflows/ecosystem_test.yaml Outdated Show resolved Hide resolved
pkgs/quest/bin/quest.dart Show resolved Hide resolved
pkgs/quest/bin/quest.dart Outdated Show resolved Hide resolved
@mosuem
Copy link
Member Author

mosuem commented Nov 20, 2024

A few in-line comments, mostly to help me get context on the PR.

Yeah, sorry for the complete lack of documentation - this is not ready for review yet.

@mosuem
Copy link
Member Author

mosuem commented Nov 20, 2024

I hadn't considered this mechanism - a re-usable workflow. With this, any repo could set up a mini-corpus to test what a package upgrade might do to their apps under test.

Yes, that's the idea. This way, any package might have "their" set of packages they care about, so we could

I think another - perhaps less flexible solution - would be thuswise:

  • have a standalone repo for testing package upgrades (this would be useful for testing highly used packages, but not general packages)
  • have a corpus of apps defined declaratively
  • have a PR somehow indicate which package upgrade to test (modifying a specific file?) the system would likely use this to generate dependency override files

So I would have to file a PR with that repo in addition to the PR in the repo of the package-to-be-upgraded?

  • attempt to shard the PR's workflow into multiple jobs, one per app in the corpus. then failure of a specific corpus app is easier to investigate

I originally had in mind to create multiple jobs, but could not find a way to collapse the list of jobs in the Github action view, the"Some checks were not successful"-thing. If run in a separate repository as you are proposing here, that is fine, but running it together with other checks would not work, as it would produce dozens of checks.

  • have the workflow collate all job status info into a markdown table that it appends to the PR; this might show info like which apps changed state from 'pub get' working to 'pub get' failing; similarly for analysis and test

Yes, that would also be added here, kind of instead of having multiple Github jobs. That way the user still gets to see which app failed easily. For debugging, we could output the logs to different workflow artifacts, and link those - that would make it very easy to investigate.

The markdown table lets you see at a glance which apps were adversely affected by the package upgrade.

Thoughts?

I think (IIUC) that filing a separate PR in another repo might be more work than running this reusable workflow "on command", either by hand or by labeling the PR with something like ecosystem-<packagename>-upgrade.

Copy link

github-actions bot commented Nov 28, 2024

Package publishing

Package Version Status Publish tag (post-merge)
package:firehose 0.10.0 ready to publish firehose-v0.10.0
package:dart_flutter_team_lints 3.2.1 already published at pub.dev

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

@mosuem mosuem marked this pull request as ready for review December 3, 2024 13:28
@mosuem mosuem requested a review from devoncarew December 3, 2024 14:34
Copy link
Member

@devoncarew devoncarew left a comment

Choose a reason for hiding this comment

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

lgtm, though I would verify that all references to mosuem/ecosystem and such are intentional (not holdovers from where this tool was prototyped).

.github/workflows/ecosystem_test.yaml Outdated Show resolved Hide resolved
pkgs/quest/README.md Outdated Show resolved Hide resolved
pkgs/quest/README.md Outdated Show resolved Hide resolved
pkgs/quest/README.md Outdated Show resolved Hide resolved
pkgs/quest/README.md Outdated Show resolved Hide resolved
pkgs/quest/README.md Outdated Show resolved Hide resolved
@mosuem mosuem merged commit 10fb2c0 into dart-lang:main Dec 5, 2024
13 checks passed
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Dec 9, 2024
Revisions updated by `dart tools/rev_sdk_deps.dart`.

core (https://github.com/dart-lang/core/compare/abcf992..7f9f597):
  7f9f597e  2024-12-03  Devon Carew  update the pubspec version of package:collection (dart-lang/core#730)

ecosystem (https://github.com/dart-lang/ecosystem/compare/248b180..b4b2a43):
  b4b2a43  2024-12-06  Moritz  Unsubmit donotsubmit (dart-lang/ecosystem#324)
  8749a2b  2024-12-06  Moritz  Updates to `health.yaml` (dart-lang/ecosystem#310)
  10fb2c0  2024-12-05  Moritz  Ecosystem testing (dart-lang/ecosystem#320)

test (https://github.com/dart-lang/test/compare/2096773..dc0f8ea):
  dc0f8ea4  2024-12-04  Nate Bosch  Fix hang after multiple precompiled browser tests (dart-lang/test#2422)

tools (https://github.com/dart-lang/tools/compare/1c5b8b9..223daf5):
  223daf53  2024-12-05  Ben Konyi  Update `package:vm_service` constraints to >=12.0.0 <16.0.0 (dart-lang/tools#1205)

vector_math (https://github.com/google/vector_math.dart/compare/433fb6c..bd4b574):
  bd4b574  2024-12-09  Plague Fox  Partial fix for benchmarks (google/vector_math.dart#337)

Change-Id: Ie5ce1e95647ac19af1dcfd1d5ee495659052ddc9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/399701
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
@mosuem mosuem mentioned this pull request Dec 12, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ecosystem-test-intl type-infra A repository infrastructure change or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants