Skip to content

Add --no-cache global flag to bypass Drupal.org CDN caching#325

Merged
mglaman merged 3 commits intomainfrom
copilot/fix-latest-comments-fetch
Mar 20, 2026
Merged

Add --no-cache global flag to bypass Drupal.org CDN caching#325
mglaman merged 3 commits intomainfrom
copilot/fix-latest-comments-fetch

Conversation

Copy link
Contributor

Copilot AI commented Mar 19, 2026

issue:show --with-comments --format=llm returns stale data when Drupal.org's CDN serves a cached response, making it impossible for agents to see recently-posted comments. The skill docs also listed a drupalorg cache:clear command that doesn't exist, actively causing agent failures.

Changes

  • Client::__construct(bool $noCache = false) — when set, adds Cache-Control: no-cache, no-store, must-revalidate + Pragma: no-cache to all Guzzle requests
  • Application::getDefaultInputDefinition() — injects --no-cache as a Symfony Console global option; available on every command with no per-command changes required
  • Command::initialize() — reads --no-cache via $input->hasOption() and passes it to Client
  • skills/drupalorg-cli/SKILL.md — removes the non-existent cache:clear entry; adds a ## Cache Bypass section documenting --no-cache
# Fetch fresh issue data, bypassing CDN cache
drupalorg issue:show 3578142 --with-comments --format=llm --no-cache

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/caseyamcl/guzzle_retry_middleware/zipball/17c9299cde438b00bbeb099c6480319a81636a60
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/consolidation/self-update/zipball/714b09fdf0513f83292874bb12de0566066040c2
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/czproject/git-php/zipball/1f1ecc92aea9ee31120f4f5b759f5aa947420b0a
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/dg/rss-php/zipball/18f00ab1828948a8cfe107729ca1f11c20129b47
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/doctrine/deprecations/zipball/d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/guzzle/guzzle/zipball/b51ac707cfa420b7bfd4e4d5e510ba8008e822b4
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/guzzle/promises/zipball/481557b130ef3790cf82b713667b43030dc9c957
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/guzzle/psr7/zipball/21dc724a0583619cd1652f673303492272778051
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/jolicode/JoliNotif/zipball/a10a7cb3bf6dbf8833d1d1f1f0554506cb1d9eaa
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/modelcontextprotocol/php-sdk/zipball/1f5f7e16a3af23dd43ec0a5c972d7aa8e8429024
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/nikic/PHP-Parser/zipball/dca41cd15c2ac9d055ad70dbfd011130757d1f82
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/opis/json-schema/zipball/8458763e0dd0b6baa310e04f1829fc73da4e8c8a
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/opis/string/zipball/3e4d2aaff518ac518530b89bb26ed40f4503635e
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/opis/uri/zipball/0f3ca49ab1a5e4a6681c286e0b2cc081b93a7d5a
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/php-fig/http-server-handler/zipball/84c4fb66179be4caaf8e97bd239203245302e7d4
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/php-fig/http-server-middleware/zipball/c1481f747daaa6a0782775cd6a8c26a1bf4a3829
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/php-http/discovery/zipball/82fe4c73ef3363caed49ff8dd1539ba06044910d
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/5cee1d3dfc2d2aa6599834520911d246f656bcb8
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/92a98ada2b93d9b201a613cb5a33584dde25f195
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/phpstan/extension-installer/zipball/85e90b3942d06b2326fba0403ec24fe912372936
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/phpstan/phpdoc-parser/zipball/a004701b11273a26cd7955a61d67a7f1e525a45a
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/a22b36b955a2e9a3d39fe533b6c1bb5359f9c319
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/b21c03d4f6f3a446e4311155f4be9d65048218e6
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/phpstan/phpstan-symfony/zipball/7e78605a699d183f5a6936cf91904f4c16ca79b2
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/phpstan/phpstan/zipball/fcf8b71aeab4e1a1131d1783cef97b23a51b87a9
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/c34583b87e7b7a8055bf6c450c2c77ce32a24084
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/comparator/zipball/55dfef806eb7dfeb6e7a6935601fef866f8ca48d
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2e
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/environment/zipball/8074dbcd93529b357029f5cc5058fd3e43666984
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/exporter/zipball/0735b90f4da94969541dac1da743446e276defa6
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7e308268858ed6baedc8704a304727d20bc07c77
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3f7dd5066ebde5809296a81f0b19e8b00e5aab49
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/47e34210757a2f37a97dcd207d032e1b01e64c7a
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/symfony/console/zipball/0bc2199c6c1f05276b05956f1ddc63f6d7eb5fc3
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/symfony/filesystem/zipball/441c6b69f7222aadae7cbf5df588496d5ee37789
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/symfony/finder/zipball/9590e86be1d1c57bfbb16d0dd040345378c20896
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/symfony/polyfill-uuid/zipball/21533be36c24be3f4b1669c4725c7d1d2bab4ae2
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/symfony/process/zipball/c46e854e79b52d07666e43924a20cb6dc546644e
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/symfony/service-contracts/zipball/45112560a3ba2d715666a509a0bc9521d10b6c43
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/symfony/string/zipball/50590a057841fa6bf69d12eceffce3465b9e32cb
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/symfony/uid/zipball/6b973c385f00341b246f697d82dc01a09107acdd
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/theseer/tokenizer/zipball/b7489ce515e168639d17feec34b8847c326b0b3c
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/webmozarts/assert/zipball/9be6926d8b485f55b9229203f962b51ed377ba68
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/ELTx8V /usr/bin/composer install --quiet (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>drupalorg issue:show --format=llm unable to find latest comments</issue_title>
<issue_description>Genuinely started using the skill you announced at https://mglaman.dev/blog/drupalorg-cli-080-gitlab-issue-fork-and-merge-request-commands — thanks so much! 🙏

Context

Problem

That is when I observed an inability to fetch this new comment, which is impairing real-time human-in-the-loop collaboration.

Output

Let me check the latest comment on the issue:
# Fetch latest issue comments
$ drupalorg issue:show 3578142 --with-comments --format=llm

then it did

The issue still shows the same comments I read before — the API cache might be stale. Let me try clearing the cache and fetching again:
# Clear cache and re-fetch issue
$ drupalorg cache:clear && drupalorg issue:show 3578142 --with-comments --format=llm
There are no commands defined in the "cache" namespace.

😂

Then:

# Fetch issue without cache
$ drupalorg issue:show 3578142 --with-comments --format=llm --no-cache 2>/dev/null || drupalorg issue:show 3578142 --with-comments --format=text

Finally:

The issue still shows the same 5 comments. Let me check the issue page directly via web fetch to see if there's a newer comment:
% WebFetch https://www.drupal.org/project/canvas/issues/3578142
Found it. Comment mglaman/drupalorg-cli#6 mentions the upstream issue mglaman/drupalorg-cli#3001284: Allow plugin derivers to specify cache tags for their definitions. And the issue summary was updated to include:

It's totally possible that d.o's HTTP API caching is what's getting in the way, but I think this repo's skill would be the ideal place to standardize some strategy to handle this.</issue_description>

Comments on the Issue (you are @copilot in this section)

@mglaman I bet it's the http caching on D.o, I removed all internal caching here (but the AI seems to think it exists! Something must have snuck into a skill).

I wonder if there's a comments endpoint to filter by issue ID that is busted faster. But I guess the problem would also exist for issue summary updates on the issue </comment_new>
<comment_new>@mglaman
Yeah, or something like --bypass-cache or even --fresh</comment_new>


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Co-authored-by: mglaman <3698644+mglaman@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue with fetching latest comments in drupalorg-cli Add --no-cache global flag to bypass Drupal.org CDN caching Mar 19, 2026
Copilot AI requested a review from mglaman March 19, 2026 21:53
@mglaman mglaman marked this pull request as ready for review March 20, 2026 00:30
@mglaman mglaman requested a review from Copilot March 20, 2026 00:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a global CLI switch to bypass Drupal.org’s CDN/Varnish caching so agents can fetch fresh issue/comment data, and updates the agent skill docs to stop referencing a non-existent cache command.

Changes:

  • Add global --no-cache Symfony Console option available to all commands.
  • Thread the flag through command initialisation into the Drupal.org API Client.
  • Update skills/drupalorg-cli/SKILL.md to remove cache:clear and document cache bypass usage.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/Cli/Command/Command.php Reads --no-cache from input and passes it into the API client.
src/Cli/Application.php Registers --no-cache as a global console option.
src/Api/Client.php Adds request headers when cache bypass is enabled.
skills/drupalorg-cli/SKILL.md Documents --no-cache and removes invalid cache:clear guidance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 25 to +42
@@ -31,16 +31,22 @@ public function __construct()
'default_retry_multiplier' => 1.5,
]), 'retry');

$headers = [
'User-Agent' => 'DrupalOrgCli/0.0.1',
'Accept' => 'application/json',
'Accept-Encoding' => '*',
];
if ($noCache) {
$headers['Cache-Control'] = 'no-cache, no-store, must-revalidate';
$headers['Pragma'] = 'no-cache';
}
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new --no-cache behavior is user-facing and implemented in the HTTP client constructor, but there’s no test asserting that new Client(true) actually sets the expected request headers on the underlying Guzzle client. Since the repo has PHPUnit coverage for actions, please add a small unit test for Client that inspects the Guzzle client config/handler to verify the headers are applied when the flag is enabled (and absent when disabled).

Copilot uses AI. Check for mistakes.
Comment on lines +169 to +171
`--no-cache` sends `Cache-Control: no-cache, no-store, must-revalidate` and
`Pragma: no-cache` headers so the upstream CDN returns a fresh response.

Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs state --no-cache sends Cache-Control: no-cache, no-store, must-revalidate, but must-revalidate isn’t a request directive and may be ignored. Update this section to reflect the actual (standards-aligned) request headers that will be sent after adjusting the client header value.

Suggested change
`--no-cache` sends `Cache-Control: no-cache, no-store, must-revalidate` and
`Pragma: no-cache` headers so the upstream CDN returns a fresh response.
`--no-cache` sends a `Cache-Control: no-cache` request header so the upstream CDN will revalidate and return a fresh response where supported.

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mglaman mglaman merged commit e655423 into main Mar 20, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

drupalorg issue:show --format=llm unable to find latest comments

3 participants