Removing all traces of Satellite Compatibility API#10
Draft
Conversation
Signed-off-by: Paul Wayper <paulway@redhat.com>
mhuth
approved these changes
Jul 16, 2025
Collaborator
|
Are you certain that insights-client doesn't make use of any of these paths? |
Previously, the `api/scripts/import_content.py` script was expected to run by itself and read files from the operating system. This is no longer supported. However, the legacy of this was that we tried to manually set up the Django environment, something that is now confusing parts of the WSGI loader. This manual setup can easily be removed. Signed-off-by: Paul Wayper <paulway@redhat.com>
Skip tests (rather than failing) if clowdapp.yml not available, and other minor code improvements. Signed-off-by: Paul Wayper <paulway@redhat.com>
Signed-off-by: Paul Wayper <paulway@redhat.com>
Implementing two basic CI/CD GitHub workflows on PRs. - A check that we can install the advisor-backend code and that it passes `flake8` and Django unit tests on the Advisor API, Tasks API, and Advisor service. - A check that we can build the container from the `Containerfile` using `podman` (on Ubuntu, no less!). Signed-off-by: Paul Wayper <paulway@redhat.com>
Signed-off-by: Paul Wayper <paulway@redhat.com>
For reasons as yet unknown, the logs from gunicorn include an 'args'
field that contains a dictionary with many many fields. Some are
cryptic one-letter fields like 'U' and 'h'. Others are named fields
in curly braces with a trailing letter, such as '{x-real-ip}i'. Some
are duplicated in the headers. Many we do not care about.
To preserve the same format of the logs that we currently store, we need
to copy these fields into the outer record as attributes with regular
names.
Signed-off-by: Paul Wayper <paulway@redhat.com>
Signed-off-by: Paul Wayper <paulway@redhat.com>
Signed-off-by: Paul Wayper <paulway@redhat.com>
Signed-off-by: Paul Wayper <paulway@redhat.com>
Signed-off-by: Paul Wayper <paulway@redhat.com>
Signed-off-by: Paul Wayper <paulway@redhat.com>
Signed-off-by: Paul Wayper <paulway@redhat.com>
Signed-off-by: Paul Wayper <paulway@redhat.com>
Signed-off-by: Paul Wayper <paulway@redhat.com>
Signed-off-by: Paul Wayper <paulway@redhat.com>
Signed-off-by: Paul Wayper <paulway@redhat.com>
Signed-off-by: Paul Wayper <paulway@redhat.com>
The `hide_metrics` function seems to have been failing in Stage because it assumed there were attributes of the log record which weren't there. This fixes that problem and tests the full range of paths we expect through this function. Also fixes an incorrect string split attempt on the first character of a string, and only rewrite URLs that are actually in the Tasks API Signed-off-by: Paul Wayper <paulway@redhat.com>
We can't remove the `record.args` attribute because the logger library relies on it. So instead we fill it with exactly the keys needed for the message used with `gunicorn`. Signed-off-by: Paul Wayper <paulway@redhat.com>
The 'cgroup-limits' script is not being used because it is not in the default path. We need to refer to it by absolute path. Signed-off-by: Paul Wayper <paulway@redhat.com>
For as yet unknown reasons, sometimes the gunicorn log arguments have '-' as the value of the 'U' (URL) and 'm' (method) field. So we fill those in from the 'raw_uri' and 'request_method' fields respectively. We split the raw_uri into query parameters as well if it contains a '?'. Signed-off-by: Paul Wayper <paulway@redhat.com>
In investigating why the 'summary' field in many rules is the same as the 'generic' field, I found that changes to the 'summary' field were not being tracked in trying to determine whether to update the rule model of an existing rule. This fix makes sure that fields we check and possibly modify are always included in the list of fields checked for updates. (Hopefully) fixes RHINENG-17698 Signed-off-by: Paul Wayper <paulway@redhat.com>
Signed-off-by: Paul Wayper <paulway@redhat.com>
* update pipfile.lock for hermetic-builds * pin cel-python to remove google-re2 dep
Signed-off-by: Paul Wayper <paulway@redhat.com>
Signed-off-by: Paul Wayper <paulway@redhat.com>
Signed-off-by: Paul Wayper <paulway@redhat.com>
Signed-off-by: Paul Wayper <paulway@redhat.com>
* Raise auth error early if KESSEL_ENABLED but the 'user_id' field is absent * Add some INFO-level logging to has_kessel_permission while we debug things Signed-off-by: Paul Wayper <paulway@redhat.com>
Signed-off-by: Paul Wayper <paulway@redhat.com>
…ed to Advisor at all (#35) Signed-off-by: Paul Wayper <paulway@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Satellite Compatibility API consists of three main URL paths:
/r/insights/v1//r/insights/v2//r/insights/v3/These were used by old versions of Satellite (before about 6.12) in
communicating with the Insights API in the Hybrid Cloud Console. These were
gradually phased out, so that versions beyond about 6.14 do not use any of
those API calls but use
/api/insights/v1/and/api/inventory/v1/instead.This work removes the code handling these URLs.