Skip to content

[rush] filter specific warnings during CI #3938

Open

Description

Just started using the new Next.js app directory in our Rush repo. The feature is listed as "experimental" in Next.js, and they emit this warning during builds:
Screen Shot 2023-01-29 at 8 25 42 PM

Because of the warning, our Rush CI build now starts to fail. There's an upstream issue tracking this, but obviously not predictable when it'll be addressed. We obviously could use Rush's allowWarningsInSuccessfulBuild as an escape hatch here, but I'd rather not sacrifice the integrity of our entire job based on one warning in one dependency.

It would be cool if there was a way to filter out / allow specific warnings during the job. There's obviously a balance here because the reason the setting exists in the first place is to prevent developers from ignoring warnings, but there is a difference between warnings you're fine with / have accepted risks for (i.e. this one in our case) and warnings you're seeing for the first time which should actually fail your job. The practical alternative of turning off warnings for the entire repo seems worse here, and assuming there were some configuration file for allowed warnings, a team could use CODEOWNERS to add technical controls against accepting every warning, and could leave comments that explain the reason for filtering the warning and tracking upstream issues.

Intuitively seems like something that could/should be delivered as a Rush plugin (related in spirit to this open Heft plugin PR). This won't actually work (couldn't find a real way to plug into the Terminal for a Rush session on first glance) but would imagine code looking something like this:
Screen Shot 2023-01-29 at 8 23 57 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    design proposalA new direction that is complex enough to have open questions but specific enough to implementeffort: mediumNeeds a somewhat experienced developerhelp wantedIf you're looking to contribute, this issue is a good place to start!

    Type

    No type

    Projects

    • Status

      General Discussions

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions