Loading
Task #3626937: Enable GitLab CI and add a CHANGELOG.md
Closes #3626937
Changes
GitLab CI and CHANGELOG
.gitlab-ci.yml: standard Drupal Association GitLab Templates, with these variables:OPT_IN_TEST_NEXT_MAJOR: '1'adds a Drupal 12 (main-dev) variant, started manually from the pipeline page._LENIENT_ALLOW_LIST: 'entity,leaflet'lets that variant install Entity API and Leaflet, which do not declare^12yet._ALL_VALIDATE_ALLOW_FAILURE: '0'makes PHPCS, PHPStan, ESLint, stylelint and cspell fail the pipeline, so new findings block a merge request._CSPELL_IGNORE_PATHS: 'LICENSE': the templates only skip license files that have an extension.
composer.json: declaresdrupal/entity,drupal/geofieldanddrupal/leaflet. Without it, the CI composer step does not install the contrib dependencies from the info file.CHANGELOG.md: Keep a Changelog format, with entries for 1.0.0-alpha1 to 1.0.0-alpha3 reconstructed from the git history, and an Unreleased section.
Fixes found by the first pipeline
The first pipeline failed with 4 PHPUnit errors. Neither cause showed up locally, because the local test database is PostgreSQL and the local site runs at the web root.
- 64-bit IDs on MySQL. Core builds the
entity_id/revision_idcolumns of dedicated field tables, and thetarget_idcolumn of entity reference fields, as 32-bit integers regardless of the referenced ID field'ssize: big. Mapillary IDs are 15-17 digits, so on MySQL saving field values of real Mapillary entities failed withNumeric value out of range. This is a production bug for every MySQL/MariaDB site, not just a test failure.- New
MapillaryStorageSchemastorage schema handler on all five Mapillary content entity types widens those columns to 64-bit.target_idis widened only when the target has a 64-bit ID, socamera_type(taxonomy terms) stays 32-bit. - Update hooks
mapillary_entity_update_11107,mapillary_detection_update_11102,mapillary_map_feature_update_11102andmapillary_organization_update_11103widen existing tables and sync the stored field schema data and entity type definition. - New kernel test
DedicatedIdColumnsTestcovers a fresh install and the update path.
- New
SecurityTokenExposureTest: CI serves the site from a subdirectory, wheredrupalGet('/')builds the malformed URIbase://. It now usesdrupalGet('<front>').
Validation clean-up
All findings of the validation jobs are fixed: PHPCS 30 errors and 6 warnings, ESLint 60 problems, cspell 186 issues.
- PHPCS (Drupal standard): doc comments, line lengths, member variable docs, a doc comment attached to the wrong function in
mapillary_field.install, and an unusedusestatement.mapillary_entity_install()andmapillary_entity_uninstall()move frommapillary_entity.moduletomapillary_entity.install. - ESLint: prettier formatting, and a
/* global L */directive for the Leaflet global. It also surfaced two real bugs:mapillary-viewer.jsused an undefinedNULLinstead ofnull, aReferenceErrorwhenever the behavior context has noquerySelector().- The
mapillary_field/mapillary_viewerlibrary had an emptydependencieskey; it now declarescore/drupalandcore/drupalSettings.
- cspell: domain words (
geofield,pano,latlng, ...) go in.cspell-project-words.txt, test fixture IDs use a file-levelcspell:ignore, and misspellings are corrected.
Pipeline behaviour
- PHPUnit runs automatically on the current stable core (11.4.x) for every push and MR.
- All validation jobs must pass.
- A comment in
.gitlab-ci.ymlrecords what to revisit once Drupal 12 is stable. At that point the templates move the current variant to 12 and next major to 13, so Drupal 11 would needOPT_IN_TEST_PREVIOUS_MAJOR.
Testing
- The MySQL failure reproduces locally without the fix.
- With all changes, the full suite passes on MySQL 8.0 via
run-tests.sh(57 test classes). - On PostgreSQL, all kernel and unit tests pass (39 files).
- PHPCS, PHPStan, ESLint, stylelint and cspell pass locally with the same configuration and tools as the templates.
- Update hooks were run on a PostgreSQL site holding 52,039 detections: no pending entity updates remain, and IDs up to 28028610433389099 load correctly.
composer validate --strictpasses.
Edited by Orkut Murat Yılmaz