project-lux / lux-marklogic

Code, issues, and resources related to LUX MarkLogic
Other
3 stars 2 forks source link

Emit data constant generator messages in Gradle console #129

Closed brent-hartwig closed 1 month ago

brent-hartwig commented 1 month ago

After encountering a required runtime data constant that was not defined, elected to continue having the data constants generator write messages to server logs but to also emit them below the summary table, in the Gradle console. This should make it easier to detect an issue sooner.

brent-hartwig commented 1 month ago

After modifying the generator to emit non-fatal messages to the Gradle console and treating zero values for a data constant as a warning, one may now expect the likes of the following. This output is from deploy release1.15's modules to the LUX by Unit DEV tenant, moments ago.

> Task :generateDataConstants

Generating the data constants...

Duration | Constants | Query URIs
-------- | --------- | ----------
      47 |         1 | /runDuringDeployment/dataConstants/queries/IRIs/animalSpecimens.json
      35 |         1 | /runDuringDeployment/dataConstants/queries/IRIs/widthConcept.json
      37 |         1 | /runDuringDeployment/dataConstants/queries/IRIs/collectionItem.json
      35 |         1 | /runDuringDeployment/dataConstants/queries/IRIs/copyrightLicensingStatement.json
      36 |         1 | /runDuringDeployment/dataConstants/queries/IRIs/curatorship.json
      36 |         1 | /runDuringDeployment/dataConstants/queries/IRIs/department.json
      36 |         1 | /runDuringDeployment/dataConstants/queries/IRIs/depthConcept.json
      35 |         1 | /runDuringDeployment/dataConstants/queries/IRIs/female.json
     728 |        66 | /runDuringDeployment/dataConstants/queries/IRIs/fieldCounts.json
   17027 |         0 | /runDuringDeployment/dataConstants/queries/IRIs/first.json
      41 |         1 | /runDuringDeployment/dataConstants/queries/IRIs/fossil.json
      39 |         1 | /runDuringDeployment/dataConstants/queries/IRIs/biologicalSpecimens.json
      36 |         1 | /runDuringDeployment/dataConstants/queries/IRIs/heightConcept.json
   17015 |         0 | /runDuringDeployment/dataConstants/queries/IRIs/intersexual.json
      39 |       118 | /runDuringDeployment/dataConstants/queries/IRIs/languages.json
      36 |         1 | /runDuringDeployment/dataConstants/queries/IRIs/male.json
      36 |         1 | /runDuringDeployment/dataConstants/queries/IRIs/nationality.json
      35 |         1 | /runDuringDeployment/dataConstants/queries/IRIs/occupation.json
   17095 |         0 | /runDuringDeployment/dataConstants/queries/IRIs/plantSpecimens.json
      40 |         1 | /runDuringDeployment/dataConstants/queries/IRIs/primaryName.json
      36 |         1 | /runDuringDeployment/dataConstants/queries/IRIs/typeOfWork.json
      35 |         1 | /runDuringDeployment/dataConstants/queries/IRIs/visitors.json
      35 |         1 | /runDuringDeployment/dataConstants/queries/IRIs/gender.json
-------- | --------- | ----------
   52570 |       202 | 23 queries

Messages:

INFO: Generating data constants within /lib/dataConstants.mjs
WARN: The /runDuringDeployment/dataConstants/queries/IRIs/first.sparql query returned zero results.
WARN: The /runDuringDeployment/dataConstants/queries/IRIs/intersexual.sparql query returned zero results.
WARN: The /runDuringDeployment/dataConstants/queries/IRIs/plantSpecimens.sparql query returned zero results.

Data constants generator done.
brent-hartwig commented 1 month ago

Addressed in PR https://github.com/project-lux/lux-marklogic/pull/130 and merged into release1.16.