Skip to content
Snippets Groups Projects

New "Config validatability" GitLab CI job

Closes #3422641

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Fran Garcia-Linares
  • Wim Leers added 1 commit

    added 1 commit

    Compare with previous version

  • Wim Leers added 1 commit

    added 1 commit

    Compare with previous version

  • Wim Leers resolved all threads

    resolved all threads

  • 454 - MR.json
    455 script:
    456 # Revert back to the tip of the branch this MR started from.
    457 - git checkout $CI_MERGE_REQUEST_DIFF_BASE_SHA
    458 # Composer-install Drush & the Config Inspector module.
    459 - composer require drush/drush drupal/config_inspector
    460 # Install Drupal's Standard install profile + the config inspector module.
    461 - vendor/bin/drush site-install standard --yes --quiet --db-url=sqlite://sites/default/files/.ht.sqlite
    462 - vendor/bin/drush pm:install config_inspector --yes --quiet
    463 # Compute config validatability statistics for HEAD.
    464 - vendor/bin/drush config:inspect --statistics > HEAD.json
    465 # Return to the MR commit being tested, conditionally install updates, always rebuild the container.
    466 - git checkout $CI_COMMIT_SHA
    467 - git diff $CI_MERGE_REQUEST_DIFF_BASE_SHA $CI_COMMIT_SHA --name-only | grep -q '.install$\|.post_update\.php$' && echo '🤖 Installing DB updates…' && vendor/bin/drush updatedb --yes --quiet
    468 - vendor/bin/drush cr --quiet
    469 # Compute config validatability statistics for HEAD.
  • Wim Leers added 1 commit

    added 1 commit

    Compare with previous version

  • Wim Leers changed title from First PoC :fingers_crossed: to New "Config validatability" GitLab CI job

    changed title from First PoC :fingers_crossed: to New "Config validatability" GitLab CI job

  • 453 - HEAD.json
    454 - MR.json
    455 # This job must pass, but must also not disrupt Drupal core's CI if dependencies are not core-compatible.
    456 allow_failure:
    457 exit_codes:
    458 # `composer require …` fails (implies no version available compatible with Drupal core)
    459 - 100
    460 # `drush pm:install config_inspector …` fails (implies failure during module installation)
    461 - 101
    462 script:
    463 # Revert back to the tip of the branch this MR started from.
    464 - git checkout $CI_MERGE_REQUEST_DIFF_BASE_SHA
    465 # Composer-install Drush & the Config Inspector module.
    466 - composer require drush/drush drupal/config_inspector || exit 100
    467 # Install Drupal's Standard install profile + the config inspector module.
    468 - vendor/bin/drush site-install standard --yes --quiet --db-url=sqlite://sites/default/files/.ht.sqlite
    • So any modules that are not part of standard are not validated? So there will be things that are missed? And also there will be times this runs and it will not actually validate the changes?

      This is why we've done config validate according to schema as part of the regular test infra. There'll be some much config that core can generate that this job misses.

    • Author Developer

      So any modules that are not part of standard are not validated? So there will be things that are missed?

      Correct.

      And also there will be times this runs and it will not actually validate the changes?

      Do you mean that if config/config schema that is changed in a MR that is not part of the Standard install profile, that this would be blissfully unaware? If so, the answer is "yes", for the same reason as above.

      :bulb: But we could change this to install all core modules. That's probably better indeed.

      On it!

    • Author Developer

      Done: 93dd0265

    • Wim Leers changed this line in version 16 of the diff

      changed this line in version 16 of the diff

    • Please register or sign in to reply
  • Dave Long
  • Wim Leers added 73 commits

    added 73 commits

    Compare with previous version

  • Wim Leers added 1 commit

    added 1 commit

    • 93dd0265 - @alexpott review: install all core modules, so we test all config schema + all default config.

    Compare with previous version

  • Wim Leers added 1 commit

    added 1 commit

    • 2aa33212 - @alexpott review: Intentionally removing constraints from the `media` module...

    Compare with previous version

  • Wim Leers added 1 commit

    added 1 commit

    • ee607c0d - :white_check_mark: That worked! Restoring `media.type.*` validation constraint.

    Compare with previous version

  • Wim Leers added 122 commits

    added 122 commits

    Compare with previous version

  • Wim Leers added 1 commit

    added 1 commit

    • a0c6d80e - Try to work around #3425198 by not using `drush site-install` but `core/scripts/drupal install`.

    Compare with previous version

  • Wim Leers added 1 commit

    added 1 commit

    • 7b84194c - Revert all changes outside of `.gitlab-ci.yml`.

    Compare with previous version

  • Wim Leers added 1 commit

    added 1 commit

    Compare with previous version

  • closed

  • Please register or sign in to reply
    Loading