Skip to content

Allow maintainers to opt-out of tests #981

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

Open
gbaz opened this issue Oct 16, 2021 · 5 comments
Open

Allow maintainers to opt-out of tests #981

gbaz opened this issue Oct 16, 2021 · 5 comments

Comments

@gbaz
Copy link
Contributor

gbaz commented Oct 16, 2021

Some tests are prohibitive to run on hackage, or require special resources or packages not available. It would be nice to allow maintainers to choose to opt out of such things.

P.S. (2022-03-25 by @andreasabel):
As of today, you can opt out by uploading the documentation (via cabal upload -d) before the build/tests have run (#1037).

@andreasabel
Copy link
Member

So what is the proposed design? Spinning some ideas:

  1. Maybe a field:

    x-hackage-run-tests: False
    

    There could be other x-hackage fields like this: -build, -build-tests to opt out of building or building the tests.

  2. Or just opt out of the banners:

    x-hackage-banner-build: False  
    x-hackage-banner-tests: False
    
  3. Or flag-style:

    -- build and doc only
    x-hackage-banners: +build +doc      
    
    -- everything but tests
    x-hackage-banners: +all -tests
    

    (You get the idea.)

  4. The same could be done for opting out of services (build, test, doc) altogether:

    x-hackage-service: +all -tests -doc
    

(Maybe there should be aliases for singular/plural: test == tests, doc = docs, x-hackage-service = x-hackage-services.)

@gbaz
Copy link
Contributor Author

gbaz commented Feb 16, 2022

I'm not sure if we want to use a x- cabal field for such things. We currently don't let much of anything be driven by such fields, and also this means that maintainers can only alter things after the fact via a revision.

I would prefer we just add metadata state to packages which maintainers can set from the "maintainers corner".

@andreasabel
Copy link
Member

I would prefer we just add metadata state to packages which maintainers can set from the "maintainers corner".

How does this metadata state work? Where/how is it stored and modified? Could you point me to some source locations?
(I searched a bit for similar features, like deprecation and preferred versions, but my search was not conclusive. Also, opting out of services or banners would likely be a bit more lightweight, as it does not affect cabal.)

@gbaz
Copy link
Contributor Author

gbaz commented Feb 17, 2022

State is stored using Acid-state in a number of distinct state components. I think the "preferred" path is probably a decent one to follow here -- create a new component storing this data (and perhaps some other data we anticipate letting maintainers set on packages while we're at it -- state migrations are possible but slightly irritating, so better to have more of what you want all at once on the first merge), then use acid-state to derive the storage methods for it, initialize the component on server startup, and allow it to be modified from the maintainers' corner., and consulted by hackage-server when it generates the page and also when the api is called that asks "ok, what do you want me (the builder) to build".

@gbaz
Copy link
Contributor Author

gbaz commented Jan 4, 2023

PR #1124 lets us turn off tests for individual versions of a package. better still would also be allowing turning off tests for a package altogether.

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

No branches or pull requests

2 participants