Problem/Motivation

I maintain a bunch of modules including Sitemap, and have spent quite a bit of time recently trying to figure out how to optimize my (very limited) contribution time. To this end, I've found a bunch of tools and developed a bunch of best-practices to make it easier for me to jump into maintaining a module. (Admittedly, some of this productivity comes from consistency with other modules I maintain, so there is some level of self-interest in this issue.)

Also, I've found that defining a "recommended" way to set up a development environment makes it easier to write documentation, and also make writing "Steps to reproduce" in issues easier (i.e.: because they can start from a defined starting point.

Therefore, I would like to propose the following changes to the code in the 8.x-2.x branch:

  1. Update the GitLab CI config for consistency and to take advantage of the community's latest changes
  2. Update ddev/ddev-drupal-contrib for consistency and to take advantage of the community's latest changes
  3. Fix some eslint issues identified in my development environment

Proposed resolution

  1. Update .gitlab-ci.yml. Note the latest version at time-of-writing is 1.15.0.
  2. Update ddev/ddev-drupal-contrib. Note the latest version at time-of-writing is ddev/ddev-drupal-contrib 1.1.5.
  3. Run ddev eslint --fix in the ddev-drupal-contrib environment to have it fix issues

Remaining tasks

  1. Merge request - merge request !61 created by @mparker17 in #2
  2. Community review - skipped by @mparker17 in #5
  3. Commit - merged by @mparker17 in #6
  4. Release - released by @mparker17 in 8.x-2.6

User interface changes

None.

API changes

None.

Data model changes

None.

Issue fork sitemap-3587215

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mparker17 created an issue. See original summary.

mparker17’s picture

Issue summary: View changes
Status: Active » Needs review

I've created merge request !61.

All tests are passing, so this is ready for review from the community (and/or other maintainers).

mparker17’s picture

Since ddev doesn't install add-ons automatically, I just pushed a commit to delete .ddev/addon-metadata/ddev-drupal-contrib/manifest.yaml so it doesn't show up as "changed" every time someone sets up the development environment.


On that note, I should post the steps to test (which I will turn into a documentation page similar to a docs page I wrote for Elasticsearch Connector)...

First-time setup:

  1. Clone the module
    Before this issue is merged, you have to run:
    git clone --branch '3587215-make-maintenance-easier' git@git.drupal.org:issue/sitemap-3587215.git sitemap && cd sitemap
    

    But once this issue is merged, this step becomes simpler:

    git clone --branch '8.x-2.x' git@git.drupal.org:project/sitemap.git && cd sitemap
    
  2. Ask ddev to set itself up using the config.yml file committed in this MR: ddev config --auto
  3. Download the add-on we need: ddev add-on get ddev/ddev-drupal-contrib
  4. Start ddev: ddev start
  5. Allow Drupal to install test modules (optional but recommended so we can install our test sub-modules): echo '$settings["extension_discovery_scan_tests"] = TRUE;' | tee -a web/sites/default/settings.php

Before working on an issue:

  1. git switch to whatever branch/issue fork that I want to work on
  2. Install php dependencies: ddev poser (this step is copied from the ddev-drupal-contrib Install instructions)
  3. Make sure all files in the project are symlinked into the webroot properly ddev symlink-project (this step is copied from the ddev-drupal-contrib Install instructions)
  4. Install Drupal: ddev drush -y si standard
  5. Install Sitemap by installing our test modules: ddev drush -y en sitemap_custom_plugin_test sitemap_vocabulary_api_test
  6. Get a login link: ddev drush -y uli
  7. Start testing Sitemap immediately by going to https://sitemap.ddev.site/sitemap

After making changes in an issue...

  1. Run PHP lints: ddev phpcs, ddev phpstan
  2. Run tests: ddev phpunit
  3. Before I can run eslint or stylelint, I have to install npm packages: ddev exec "cd web/core && yarn install"
    We could make this part of the "Before working on an issue" setup
  4. Then I can run eslint and stylelint: ddev eslint, ddev stylelint
mparker17’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

I haven't heard any feedback in about a month, so I'm going to merge this.

  • mparker17 committed 25a49114 on 8.x-2.x
    feat: #3587215 Make maintenance easier: tooling updates
    
    By: mparker17...
mparker17’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Merged! I will update this issue when this change has been released.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

mparker17’s picture

Issue summary: View changes

The changes in this issue have been released in sitemap-8.x-2.6.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.