allow abra to disable lint checks for service apps like backupbot #319

Closed
opened 2022-05-09 11:47:07 +00:00 by yksflip · 5 comments
Owner

there might be apps like backupbot that don't need traefik ingress routing, still abra checks them for traefik labels. I think it would be useful to disable the lint checks or some other way to deploy apps that violate the default linting...

abra -v
abra version 0.5.0-alpha-578e91e
abra app deploy -D -c -f --chaos dev-backupbot
FATA[0001] lint error in backup-bot-two configs: "traefik routing enabled" failed lint checks (R010)
`` 
there might be apps like backupbot that don't need traefik ingress routing, still abra checks them for traefik labels. I think it would be useful to disable the lint checks or some other way to deploy apps that violate the default linting... ``` abra -v abra version 0.5.0-alpha-578e91e abra app deploy -D -c -f --chaos dev-backupbot FATA[0001] lint error in backup-bot-two configs: "traefik routing enabled" failed lint checks (R010) ``
yksflip added the
enhancement
abra
labels 2022-05-09 11:47:07 +00:00
Owner

@yksflip oh i see, do you have a proposal for the command line interface for this?

I was also thinking, maybe, since we tend to use the proxy network as a naming convention for service which should have public internet access, we could just skip any service that doesn't have this network attached?

Or potentially, only scan the app service & turn this error into a warning. Which would just mean you see a warning & can continue to run stuff.

@yksflip oh i see, do you have a proposal for the command line interface for this? I was also thinking, maybe, since we tend to use the `proxy` network as a naming convention for service which should have public internet access, we could just skip any service that doesn't have this network attached? Or potentially, only scan the `app` service & turn this error into a warning. Which would just mean you see a warning & can continue to run stuff.
Author
Owner

Maybe like this?

--no-lint-checks, -L    Disable app linter checks

Scanning for the proxy network is also a great idea!

I think as long as it's possible to override checks manually I like them to fail. I tend to ignore warnings :D

Maybe like this? ``` --no-lint-checks, -L Disable app linter checks ``` Scanning for the `proxy` network is also a great idea! I think as long as it's possible to override checks manually I like them to fail. I tend to ignore warnings :D
ej-mitchell self-assigned this 2022-05-09 12:32:23 +00:00

Hey, newbie here. I'm currently adding the flag as an option. I am assuming you only want to pass this flag when you're deploying new apps, or is there another situation(s) where you would like the linter to be disabled? (UPDATE: I'm realizing the linter logic is scoped more accurately to recipes. I'll hold off from asking more questions until I've made it through this part of the codebase.)

Hey, newbie here. I'm currently adding the flag as an option. I am assuming you only want to pass this flag when you're deploying new apps, or is there another situation(s) where you would like the linter to be disabled? (UPDATE: I'm realizing the linter logic is scoped more accurately to recipes. I'll hold off from asking more questions until I've made it through this part of the codebase.)
decentral1se added this to the (deleted) project 2022-06-17 09:36:57 +00:00
Owner

Following chat in #354, seems like "no DOMAIN" could also be a decent heuristic for disabling this check.

Any preferences between that, and checking for proxy network?

#354 also revealed this is affecting swarm-cronjob, so some kinda fix could be handy 🤔

Following chat in #354, seems like "no DOMAIN" could also be a decent heuristic for disabling this check. Any preferences between that, and checking for `proxy` network? #354 also revealed this is affecting `swarm-cronjob`, so some kinda fix could be handy 🤔
Owner

@3wordchant I think the domain check is best as there are often times when you route with the proxy network but you don't have a domain attached ("headless traefik" installs)?

Adding a check in the LintFunction might be simplest. Idk if it will complicate the code much. Alternatively, we could add a Condition to 14187449a5/pkg/lint/recipe.go (L22-L28) which checks for some stuff and then does or does not run the linting rule?

@3wordchant I think the domain check is best as there are often times when you route with the proxy network but you don't have a domain attached ("headless traefik" installs)? Adding a check in the `LintFunction` might be simplest. Idk if it will complicate the code much. Alternatively, we could add a `Condition` to https://git.coopcloud.tech/coop-cloud/abra/src/commit/14187449a5c19cbcab5f9bdab84308e6d7b8e875/pkg/lint/recipe.go#L22-L28 which checks for some stuff and then does or does not run the linting rule?
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/organising#319
No description provided.