Hey! :smile: Do you folks have any recommendations...
# ask-questions
m
Hey! 😄 Do you folks have any recommendations on how we are supposed to handle only applying a feature to a certain version of the app? If we pass in our current version and it is 1.1.12 and we apply it to everyone that has 1.1.5 or lower then it will still apply to the ones having 1.1.12 since it does not seem to use semver for semantic versioning comparison by default so we get that the feature is enabled when it should not be because of JS behaviour I guess…
Copy code
console.log('1.1.5' > '1.1.12'); // true, with Semver this would be false
r
Our official support hours are 6:30am - 5pm Pacific Time, Monday through Friday. You may occasionally hear from us outside of these hours. Your support request has been logged in our system. Our support team will get back to you very soon!
s
Hi Anton, AFAIK we do support semantic version targeting in our feature targeting conditions. Let me see if I can find some helpful docs/screenshots for you.
m
Ah thanks Adnan! This is what I tried to use but when I have 1.1.12 and it is set to 1.1.5 or lower it’s still truthy.
s
For that to work, you need to edit your appVersion attribute under SDK Configuration > Attributes in the sidebar. Once there, edit the attribute and set the 'String Format' to 'Version string'
m
@swift-helmet-3648 That is not an option?
s
Are you on an older version of GrowthBook? I'm not sure why your screen looks different than mine.
m
We are running it self hosted so either it’s that or it’s something somewhat recently added? Do you know if it’s available for self hosted? (If so it might be worth upgrading for us) Most our other projects vill use cloud version but for this project we had to use self hosted due to strict requirements.
s
It's available on self-hosted and was introduced in version 2.2
(Latest is 2.6)
m
Ah perfect, thanks a lot! 😄 Do you happen to know if there’s anything more than setting up a persistent volume that we need to do to ensure we keep our data in our instance if we update to a newer version?
s
Everything app-wise is stored in mongo so as long as you keep the volume around you should be good.
🙌 1
m
@swift-helmet-3648 Thanks a lot it seems to work now after update. Do you happen to know which Growthbook version for the React SDK is required for it to work with version string? We are on 0.16 right now.
"<@U052WVA1MH6>/growthbook-react": "0.16.0",
s
You'd have to check - it was the 2.2 release that this was introduced, I'm not sure what the SDK version was at that time. Should be available on GitHub