Uploaded image for project: 'Puppet Server'
  1. Puppet Server
  2. SERVER-3015

Environment_classes endpoint will not cache data if given accurate etag

    XMLWordPrintable

Details

    • Froyo
    • Froyo - 05/19/2021
    • Needs Assessment
    • Bug Fix
    • Users of the environment and transport info endpoints may have seen the cache bypassed (and additional work on the server) even though a 304 Not Modified response was received.
    • Needs Assessment

    Description

      As part of a refactor in SERVER-2471 a bug was introduced where if the etag cache has been evicted but the requester submits a still valid etag the server will compute the class info for an environment (because the cache was empty) then check the computed etag value against requested etag and return a 304, but not cache the newly computed etag.

       

      This means if there's a deploy that evicts an environment but doesn't change the class info for that environment, the cache will not be updated (despite returning 304) until a deploy where the environment changes its class content.

      A work around for this exists, users may submit a request to the environment_classes endpoint without the etag. This will trigger the correct caching behavior. However, the console (the consumer of the environment_classes endpoint in PE) will always submit an etag for an environment if it has one.

       

      Attachments

        Activity

          People

            justin Justin Stoller
            justin Justin Stoller
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support