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

NB_IS_FEDERATION_API is not parsed correctly #84

Closed
rmanaem opened this issue Mar 12, 2024 · 5 comments · Fixed by #88
Closed

NB_IS_FEDERATION_API is not parsed correctly #84

rmanaem opened this issue Mar 12, 2024 · 5 comments · Fixed by #88
Assignees
Labels
released This issue/pull request has been released.

Comments

@rmanaem
Copy link
Contributor

rmanaem commented Mar 12, 2024

The NB_IS_FEDERATION_API is currently being parsed as a string which in JS/TS as long as it is not an empty string is considered a truthy value therefore even when the env var is set to false it will be parsed as true.

export const isFederationAPI: string =
import.meta.env.NB_IS_FEDERATION_API === undefined ? true : import.meta.env.NB_IS_FEDERATION_API;

@surchs
Copy link
Contributor

surchs commented Mar 13, 2024

I feel like this has come up before. Maybe in the API URL parsing?

@rmanaem
Copy link
Contributor Author

rmanaem commented Mar 13, 2024

Not in this tool. I believe we had an issue with Vue being opinionated about the capitalization of props.

@rmanaem rmanaem changed the title NB_IS_FEDERATION_API is not parsed appropriately NB_IS_FEDERATION_API is not parsed correctly Mar 13, 2024
@rmanaem rmanaem self-assigned this Mar 13, 2024
@rmanaem rmanaem moved this to Implement - Active in Neurobagel Mar 13, 2024
@surchs
Copy link
Contributor

surchs commented Mar 13, 2024

No, I meant reading in ENV variables and having to deal with any string evaluating true. I can't remember where that was - but regardless, we can probably figure out a reasonable solution again.

@rmanaem
Copy link
Contributor Author

rmanaem commented Mar 13, 2024

No, I meant reading in ENV variables and having to deal with any string evaluating true. I can't remember where that was - but regardless, we can probably figure out a reasonable solution again.

Sounds familiar but I don't recall that.
I think this is a simple fix https://stackoverflow.com/a/264037

@rmanaem rmanaem moved this from Implement - Active to Implement - Done in Neurobagel Mar 13, 2024
@surchs surchs moved this from Implement - Done to Review - Active in Neurobagel Mar 17, 2024
@github-project-automation github-project-automation bot moved this from Review - Active to Review - Done in Neurobagel Mar 18, 2024
@surchs
Copy link
Contributor

surchs commented Apr 11, 2024

🚀 Issue was released in v0.2.0 🚀

@surchs surchs added the released This issue/pull request has been released. label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This issue/pull request has been released.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants