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/toggle variable validation detail on dev mode for compliance #934

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

Sam-tesouro
Copy link

per discussion at wundergraph/cosmo#1182

@@ -87,6 +89,11 @@ const (
pathItemKindArray
)

func devModeCheck() bool {
d := strings.ToLower(os.Getenv("DEV_MODE"))
Copy link
Member

Choose a reason for hiding this comment

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

Can we turn this into a property on the variablesVisitor that we can pass on creation?
This way, it won't depend on env vars, etc. which makes it more universally usable.

Choose a reason for hiding this comment

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

Hey @jensneuse , thanks for the suggested change. @Sam-tesouro and I were just chatting, and I'm afraid my go foo is a bit rusty so wondering how we'd pass that into the variables visitor. If you have a quick example, suggestion, or link, that'd help. We're working on it either way though. Thanks for all you do!

Copy link
Author

Choose a reason for hiding this comment

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

Implemented a thing that might be what you want, possibly.

Copy link
Author

Choose a reason for hiding this comment

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

I see the issue with being so coupled to the DEV_MODE env var, working on decoupling still. Biggest hangup currently is just figuring out how I am going to achieve test coverage.

Copy link
Member

Choose a reason for hiding this comment

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

I can help you, need to see when I find the time.

Copy link
Author

Choose a reason for hiding this comment

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

Thank you! I believe I achieved decoupling. Glad to make further modifications if you have preferences!

@Sam-tesouro Sam-tesouro requested a review from jensneuse November 4, 2024 18:23
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