Skip to content

Commit

Permalink
Merge branch 'main' into minor-improvements-to-formatting-output
Browse files Browse the repository at this point in the history
  • Loading branch information
aantn committed Jun 15, 2024
2 parents 06867ee + ab85be8 commit c44f8f9
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 47 deletions.
40 changes: 0 additions & 40 deletions .github/workflows/update-code-version.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ _View instructions for: [Seeing recommendations in a UI](#free-ui-for-krr-recomm

- **No Agent Required**: Run a CLI tool on your local machine for immediate results. (Or run in-cluster for weekly [Slack reports](#slack-integration).)
- **Prometheus Integration**: Get recommendations based on the data you already have
- **Explainability**: Understand how recommendations were calculated
- **Explainability**: [Understand how recommendations were calculated with explanation graphs](#free-krr-ui-on-robusta-saas)
- **Extensible Strategies**: Easily create and use your own strategies for calculating resource recommendations.
- **Free SaaS Platform**: See why KRR recommends what it does, by using the [free Robusta SaaS platform](https://platform.robusta.dev/signup/?utm_source=github&utm_medium=krr-readme).
- **Future Support**: Upcoming versions will support custom resources (e.g. GPUs) and custom metrics.
Expand All @@ -109,7 +109,7 @@ Read more about [how KRR works](#how-krr-works)
| Immediate Results ⚡ | ✅ Gets results immediately (given Prometheus is running) | ❌ Requires time to gather data and provide recommendations |
| Reporting 📊 | ✅ Json, CSV, Markdown, [Web UI](#free-ui-for-krr-recommendations), and more! | ❌ Not supported |
| Extensibility 🔧 | ✅ Add your own strategies with few lines of Python | :warning: Limited extensibility |
| Explainability 📖 | ✅ See graphs explaining the recommendations | ❌ Not supported |
| Explainability 📖 |[See graphs explaining the recommendations](#free-krr-ui-on-robusta-saas) | ❌ Not supported |
| Custom Metrics 📏 | 🔄 Support in future versions | ❌ Not supported |
| Custom Resources 🎛️ | 🔄 Support in future versions (e.g., GPU) | ❌ Not supported |
| Autoscaling 🔀 | 🔄 Support in future versions | ✅ Automatic application of recommendations |
Expand Down
2 changes: 1 addition & 1 deletion robusta_krr/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .main import run

__version__ = "1.8.2-dev"
__version__ = "dev"
__all__ = ["run", "__version__"]
32 changes: 28 additions & 4 deletions robusta_krr/utils/version.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,36 @@
import robusta_krr
import requests
import asyncio
from typing import Optional
import os
import subprocess
import sys
from concurrent.futures import ThreadPoolExecutor
from typing import Optional

import requests

import robusta_krr


def get_version() -> str:
return robusta_krr.__version__
# the version string was patched by a release - return __version__ which will be correct
if robusta_krr.__version__ != "dev":
return robusta_krr.__version__

# we are running from an unreleased dev version
try:
# Get the latest git tag
tag = subprocess.check_output(["git", "describe", "--tags"]).decode().strip()

# Get the current branch name
branch = subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"]).decode().strip()

# Check if there are uncommitted changes
status = subprocess.check_output(["git", "status", "--porcelain"]).decode().strip()
dirty = "-dirty" if status else ""

return f"{tag}-{branch}{dirty}"

except Exception:
return robusta_krr.__version__


# Synchronous function to fetch the latest release version from GitHub API
Expand Down

0 comments on commit c44f8f9

Please sign in to comment.