You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As reported in #366 (comment), the regex-based solution for figuring out region/namespace before submitting the template to Nomad client is faulty and will treat anyregion and namespace variable as if it were setting region or namespace for the job. We need to find a better way to extract region and namespace information from the template and not rely on regular expressions for this.
The text was updated successfully, but these errors were encountered:
pkazmierczak
changed the title
Nomad-pack mistakenly treats any variables called region or namespace as Nomad region/namespace settings
nomad-pack treats any variables called region or namespace as Nomad region/namespace settings
Sep 12, 2023
Hey @slonopotamus, just FYI that we made this its own issue.
We'd like to fix this, but we just synced internally and we'll probably have to get the 0.1 release of Pack out before fixing this. It's a pretty gross issue, so sorry about the delay, but we'll have to circle back to core-Nomad for a bit after the 0.1 release, so it may sit for a bit.
I've workarounded this (by renaming my variable, huh). But I believe that the whole approach simply doesn't work. Regexes will pick up unrelated stuff. Also, as I understand, regex is ran against raw nomad-pack file. But region/namespace could be specified via variables (almost all packs in nomad-pack-community-registry do this), so again, we end up with garbage instead of region.
And please do not forget that pack can consist of multiple jobs some of which belong to different regions when redesigning a fix for this issue!
As reported in #366 (comment), the regex-based solution for figuring out region/namespace before submitting the template to Nomad client is faulty and will treat any
region
andnamespace
variable as if it were setting region or namespace for the job. We need to find a better way to extract region and namespace information from the template and not rely on regular expressions for this.The text was updated successfully, but these errors were encountered: