Added future active instruments and experiments to the API responses
According to T399292:
- Added future active instruments to the API response:
/api/v1/instrumentswill also include instruments that will start in the future and are already active. - Added future active experiments to the API response:
/api/v1/experiments?format=config&authority=mediawikiwill also include experiments that will start in the future and are already active.
According to T386659:
- A new set of test cases,
api.test.jshas been created to test API responses for instruments and logged-in and logged-out experiments - An in-memory database has been used to support those test cases so they can be run in the gitlab pipeline
- A new npm script has been created,
ci-testto run what we can run in the gitlab pipeline (unit and API test cases:unit-test+api-test) and theblubber.yamlfile has been updated accordingly. Existing scripts works as before:test,unit-testandintegration-test
For now MediaWiki is not considering start and end date when parsing the response. There is a change (https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MetricsPlatform/+/1177961) to add that feature. That change is merged but not deployed yet. Once we deploy that change will be the right time to deploy this one