Improvements in log output, consistency in syntax, alignment with D7

Created on 10 April 2025, 8 days ago

Problem/Motivation

This issue gathers together several changes to the main.yml and main-d7.yml file that should not affect the functioning of any jobs. They relate to presentation of log output, syntax, organisation within the files and forgotten alignment/backports to the D7 template. There are six proposed changes.

Proposed Changes

  1. The wrapping of the symlink into a collapsed section was done in D10, but needs to be replicated for D7.
  2. Wrap composer install and *require-drush into a collapsed section. This is a big part of the log, but very often we have to scroll over to find the details we are looking for. Having it in a collapsed section makes the log more easily navigable.
  3. Remove the deletion of 'parallel' in test-only changes for D7. This was done for D10, but forgotten and not backported to main-d7.yml.
  4. The jobs in the file are generally grouped by their stage, we have all the build jobs, then the validate jobs then the test jobs. 'upgrade status' is a test job, it extends 'testing-job-base', but is placed in the middle of the validation jobs. This needs to be moved in the file.
  5. Consistency in 'extends:' and 'needs:' syntax. There are 38 "extends:" in the main file which have the full value on the same on same line, which helps when seaching a file to highlight every 'extends:' as you can see what element it extends. There are just 5 which have the syntax split over two lines, which means your editor's 'find all' does not show what the job is extending. Similarly for the "needs:" syntax, some are on one line, some are split over two lines.
  6. .check-composer-end-code does not need to print the exit code when all is ok and the code is 0. Only print it when there is a problem.

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Component

gitlab-ci

Created by

🇬🇧United Kingdom jonathan1055

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @jonathan1055
  • 🇬🇧United Kingdom jonathan1055

    These changes have the potential to conflict with existing MRs but apart from the documentation MR there are currently only 3 other open and active MRs (where active = worked on in the last month) so now is a good time to do this. Those other earlier MRs will already be out of date and probably have conflicts.

    I will make the changes in sequence, and keep them in separate commits for easier reviewing.

  • 🇬🇧United Kingdom jonathan1055

    The first one was actually already done (I had not updated my notes). So there are only five proposed changes.

  • Pipeline finished with Success
    8 days ago
    Total: 300s
    #470473
  • 🇬🇧United Kingdom jonathan1055

    First three changes done.

  • Pipeline finished with Success
    8 days ago
    Total: 6401s
    #470521
  • 🇪🇸Spain fjgarlin

    Good improvements here. Thanks for working on them.

  • 🇬🇧United Kingdom jonathan1055

    Thanks. I have pushed changes for items 4 and 5 and this is ready for review and feedback.

    Just to note (I'm sure you knew this already) that the syntax needs: [composer (next minor)] if perfectly valid without the quotes even when there are multiple words. So I did not add quotes, just to keep it cleaner, but if you don't like the look of it I can add them. ESlint/Prettier demands no spaces between [ and the first character, and if using quotes they have to be singles not doubles.

  • 🇬🇧United Kingdom jonathan1055

    The D7 downstream pipeline yesterday failed for phpcs and phpunit, but the problem seems to be in the Composer jobs (but not anything changed in this MR). We get an odd error when trying the symlink

    $ php symlink_project.php "$CI_PROJECT_NAME" "$DRUPAL_PROJECTS_PATH"
    Retry later

    See https://git.drupalcode.org/project/gitlab_templates_downstream/-/jobs/49...
    I note that we do not have a $COMPOSER_END_CODE check in D7 like we do for D10, so I think this needs to be added. It would highlight this error in the Composer job, and not give misleading info about phpcs or phpunit failures. But that is for another issue, as it will need separate testing.

  • 🇪🇸Spain fjgarlin

    Thanks for the changes. I'm fine with not having quotes if it's valid syntax.
    Rest of the downstream pipelines: https://git.drupalcode.org/issue/gitlab_templates-3518579/-/pipelines/47...

    Everything seems ok and it should not change anything really in the outcome of jobs, so I'll merge this shortly.

  • Pipeline finished with Skipped
    8 days ago
    #471070
  • Pipeline finished with Success
    8 days ago
    Total: 2282s
    #471008
  • 🇪🇸Spain fjgarlin

    Merged!

  • 🇬🇧United Kingdom jonathan1055

    Wow, that was one of the quickest MR commits. I was about to upload this screenshot to demonstrate what I meant about the 'find all'. So here it is, just for the record. Thanks for the merge.

  • 🇪🇸Spain fjgarlin

    🙂

    I knew perfectly what you meant by that, I usually do these type of searches as well and then need to iterate to see the detail, so this is really helpful to see the context straightaway.

Production build 0.71.5 2024