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

catch issues with integrations that use oc_map.get() #1232

Merged
merged 7 commits into from
Dec 10, 2020

Conversation

arilivigni
Copy link
Contributor

@arilivigni arilivigni commented Dec 8, 2020

After making the changes for unreachable clusters there are several integrations that end up calling the OC class and specifically oc_map.get() without these fixes, these integrations get stack traces and error.

Amador found some of these issues and I also did some searching to find out all the places this method is used. These incorporate those changes.

Amador also noted that there was an issue with sql-query, but I was unable to reproduce:
I put this in my local app-interface

data/app-interface/sql-queries/app-sre/2020-12-07-dashdotdb-stage-clusters.yml

---
$schema: /app-interface/app-interface-sql-query-1.yml
labels: {}
name: 2020-12-07-dashdotdb-stage-clusters
namespace:
  $ref: /services/dashdot/namespaces/app-sre-stage-01.yml
identifier: dashdotdb-stage
output: stdout
query: |
  SELECT name from cluster;
/etc/hosts
127.0.0.1 api.app-sre-stage-0.k3s7.p1.openshiftapps.com

APP_INTERFACE_STATE_BUCKET_ACCOUNT=app-sre APP_INTERFACE_STATE_BUCKET=app-interface-production qontract-reconcile --config ../config.debug.toml --dry-run --log-level INFO sql-query

Please provide feedback since I am sure some of this can be done better.

@arilivigni arilivigni changed the title catch issues with integrations that use oc_map.get(cluster) catch issues with integrations that use oc_map.get() Dec 8, 2020
reconcile/openshift_base.py Outdated Show resolved Hide resolved
reconcile/openshift_users.py Outdated Show resolved Hide resolved
utils/openshift_resource.py Outdated Show resolved Hide resolved
Copy link
Contributor

@apahim apahim left a comment

Choose a reason for hiding this comment

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

Looks mostly good. A couple of fixes and I believe we will be good to go.

Copy link
Contributor

@apahim apahim left a comment

Choose a reason for hiding this comment

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

lgtm

@arilivigni arilivigni merged commit 297e664 into app-sre:master Dec 10, 2020
@arilivigni arilivigni deleted the oc_map-integrations branch February 22, 2021 01:21
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.

None yet

2 participants