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

fix: reconcile error handling #1080

Merged
merged 2 commits into from
Sep 23, 2024
Merged

fix: reconcile error handling #1080

merged 2 commits into from
Sep 23, 2024

Conversation

yashmehrotra
Copy link
Member

@yashmehrotra yashmehrotra commented Sep 22, 2024

We were getting empty errors as json.Marshal always marshals error type as {} due to it being an interface

To do: Also if summary.Error is non nil, job history returns success since we do not update error count, this needs to be fixed in mission-control

Have fixed this, but UI is now having an issue rendering it
image

Error details:

{
  "errors": "job_history: failed to push job_history to upstream: upstream server returned error status[500]: Internal Server Error; ",
  "summary": {
    "checks": {
      "success": 25
    },
    "components": {
      "success": 103
    },
    "job_history": {
      "error": "failed to push job_history to upstream: upstream server returned error status[500]: Internal Server Error"
    },
    "config_items": {
      "success": 28
    },
    "check_statuses": {
      "success": 81
    },
    "config_changes": {
      "success": 35
    },
    "config_relationships": {
      "success": 12
    },
    "component_relationships": {
      "success": 3
    },
    "config_component_relationships": {
      "success": 1
    }
  }
}

@adityathebe
Copy link
Member

I think we can make ReconcileSummary.Error a string instead of a adding a new type.

@yashmehrotra
Copy link
Member Author

yashmehrotra commented Sep 23, 2024

@adityathebe I was thinking about doing that first, but thought we might need to use that error later ?

I'm okay to do it either way

@moshloop
Copy link
Member

@adityathebe / @yashmehrotra - I think we should just use the OopsError type which has custom JSON marshaller

@yashmehrotra
Copy link
Member Author

@moshloop Updated to use oops

@moshloop moshloop enabled auto-merge (rebase) September 23, 2024 07:58
@moshloop moshloop merged commit ee1de5f into main Sep 23, 2024
6 checks passed
@moshloop moshloop deleted the fix-reconcile-err-handling branch September 23, 2024 08:00
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