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

when json is invalid mirrord just fails without any descriptive error #261

Closed
aviramha opened this issue Apr 26, 2024 · 9 comments
Closed
Assignees

Comments

@aviramha
Copy link
Member

{
  "operator": true,
  "target": {
    "path": "deployment/X",
    "namespace": "X"
  },
  "feature": {
    "network": {
      "incoming": {
        "mode": "steal",
        "port_mapping": [
          [
            8077,
            8080
          ]
        ],
        "http_filter": {
          "header_filter": "x-X-subject: {{ get_env(name='X_USER_ID') }}",
          "port": [8080, 8077]
        }
      }
    },
    "fs": "read",
    "env": {
      "include": "SECURITY_JWT_*;SPRING_DATASOURCE_*"
    }
  }
}
@meowjesty
Copy link
Member

image

It actually shows 3 errors, but this one is the most relevant.

I'll work on improving the message, using the new message API we have.

@meowjesty
Copy link
Member

image

Better (this should apply to both intellij and vscode)?

@aviramha
Copy link
Member Author

aviramha commented May 3, 2024

Important to note that the user had the env set, so it wasn't a templating error (it was port instead of ports)
so maybe we have more than one issue here?

@meowjesty
Copy link
Member

image

What I got when setting X_USER_ID=boo in the env vars. Am I still missing something?

@aviramha
Copy link
Member Author

aviramha commented May 3, 2024

maybe old extension then :@

@aviramha
Copy link
Member Author

aviramha commented May 3, 2024

or maybe the mirrord failed error took over and somehow this was hidden? the error wasn't 'validation failed' nor 'line ..' like you mentioned. Just mirrord failed

@meowjesty
Copy link
Member

mirrord failed error took over

Yeah, I think this might be it. When a config error happens I see 3 error dialogs popping up. So maybe the more interesting ones closed before the user saw those?

@meowjesty
Copy link
Member

It would be nice to have this just use the new messages API, where we can control all of this from the cli, and thus just show 1 error, but as this is ran as part of verify-config it's a bit more troublesome than just taking the progress output.

@meowjesty
Copy link
Member

Could not really reproduce this.

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

No branches or pull requests

2 participants