Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding an example of 'date' in the README as it is required. Otherwise, it will fail #69

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

larrymou9
Copy link
Contributor

If we don't add a date, we will end up the following error.

Traceback (most recent call last): File "/root/metrics-utility/manage.py", line 6, in <module> manage() File "/root/metrics-utility/metrics_utility/__init__.py", line 28, in manage utility.execute() File "/root/metrics-utility/metrics_utility/management_utility.py", line 58, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/var/lib/awx/venv/awx/lib64/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv self.execute(*args, **cmd_options) File "/var/lib/awx/venv/awx/lib64/python3.11/site-packages/django/core/management/base.py", line 458, in execute output = self.handle(*args, **options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/metrics-utility/metrics_utility/management/commands/build_report.py", line 124, in handle extra_params=extra_params).create() ^^^^^^^^ File "/root/metrics-utility/metrics_utility/automation_controller_billing/dataframe_engine/factory.py", line 26, in create return (self._get_db_dataframe_host_metric_usage().build_dataframe(),) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/metrics-utility/metrics_utility/automation_controller_billing/dataframe_engine/db_dataframe_host_metric.py", line 24, in build_dataframe for data in self.extractor.iter_batches(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: ExtractorDirectory.iter_batches() missing 1 required positional argument: 'date'

So I have added this in the readme as an example so that people can run it without these problems

@larrymou9
Copy link
Contributor Author

@art-tapin @Ladas I made this slight change as I was following the "new" README and I was not able to properly execute renewal guidance report. Please review!

@himdel
Copy link
Collaborator

himdel commented Feb 17, 2025

We might want to revert #61 (or, parts of it)

The new README is missing most of the variables we need, and calling a convenience script meant for dev testing only.

Also, uv is NOT how a customer would run it, it's just our dev env.

@larrymou9 larrymou9 changed the title Adding an exampled of 'date' in the README as it is required. Otherwise, it will fail Adding an example of 'date' in the README as it is required. Otherwise, it will fail Feb 17, 2025
export METRICS_UTILITY_REPORT_TYPE=RENEWAL_GUIDANCE
python manage.py build_report --since=12months --ephemeral=1month
# Set extra ENV VARs for report generation purposes
export METRICS_UTILITY_SHIP_TARGET=controller_db
Copy link
Collaborator

Choose a reason for hiding this comment

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

based on above steps, this example should be generating CCSP report, not renewal guidance?

(because renewal guidance doesn't need to call the collector step now)

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.

3 participants