AzBuilder / terrakube

Open source IaC Automation and Collaboration Software.
https://docs.terrakube.io
Apache License 2.0
523 stars 44 forks source link

Provisions Count in Registry is including/counting views of the module's Registry page #1482

Open fishfacemcgee opened 2 weeks ago

fishfacemcgee commented 2 weeks ago

Bug description 🐞

The provisions count for a module's listing in the Registry is counting page views.

Screenshot 2024-10-31 at 4 23 56 PM

This module has never been used, and it increments every time I refresh the page. Because the module has never been used, I'm not sure whether the bug is that page views are being added to module downloads, or if provisions is only displaying page views.

I'm currently running Terrakube 2.23.2

Steps to reproduce

  1. Publish a module in the registry in a Terrakube Workspace
  2. View the module
  3. Note the provision count
  4. Refresh the page
  5. Note the increased provision count

Additionally, it appears the count increases even when viewing/refreshing the top level Registry page.

Expected behavior

Only the number of time the module has been downloaded to a workspace is displayed.

Example repository

No response

Anything else?

No response

alfespa17 commented 2 weeks ago

The UI is using the same registry endpoint so if you see the registry in the UI it will be the same as downloading when using the terraform CLI that is why the count change