When/how to update Firebase web SDK version number? - firebase

When you initialize Firebase hosting, it includes a comment in the header of the index.html file that is generated:
<!-- update the version number as needed -->
<script defer src="/__/firebase/7.5.2/firebase-app.js"></script>
My question has to do with "as needed;" I looked at the docs, and didn't see an explanation.
Probably this means it is supposed to be obvious -- but when you're a beginner, most things aren't!
So, to make my question more concrete:
When might updating the version make a Firebase web app break?
Relatedly, if an app is working, and one does not update for a long
time (many versions/years), does the app remain functioning? Or will it break if not kept current?
Does "as needed" imply "as needed [for access to new features]"?
Finally, is it implied that these changes should be implemented
manually -- by regularly looking up what the latest Firebase version
is, and typing a new version number in index.html -- or is there some
kind of automatic "stay current" workflow/tooling/convention that is
implied?
I realize that there are a number of sub-questions above, but they are all intended to be clarifications of "update as needed," so I think they belong in the same place.
I hope any answers will help other beginners understand the larger issue of when it is appropriate to update the services an app depends upon! Thanks.

Firebase follows what is known as semantic versioning (SemVer) rules.
From semver.org:
Given a version number MAJOR.MINOR.PATCH, increment the:
MAJOR version when you make incompatible API changes,
MINOR version when you add functionality in a backwards compatible manner, and
PATCH version when you make backwards compatible bug fixes.
That means that the API is guaranteed to stay compatible within minor version (7.x) in your case, but breaking changes may be made in major version (8.0). This means that minor versions (7.x) are used to fix problems, and sometimes add minor features that don't break existing behavior.
With that knowledge, let's see if we can answer your questions:
When might updating the version make a Firebase web app break?
Updating within the same major version (7.x, e.g. 7.5.2 -> 7.5.3, or 7.5.2 -> 7.6.0) should not break your app. There are some exceptions, such as when your code depends on buggy behavior that was fixed, or when there is a mistake in the release. The latter will typically be fixed by the Firebase team as soon as possible, while you'll typically want to roll back to the previous version and update your code in the former case.
Relatedly, if an app is working, and one does not update for a long time (many versions/years), does the app remain functioning? Or will it break if not kept current?
Once a version is published, it remains unmodified. So your app will stay working the way it did when you made it.
Does "as needed" imply "as needed [for access to new features]"?
Two main reasons for upgrading:
To get access to new features.
This is the most obvious reason to upgrade, as it allows you to add new functionality from Firebase to your app. Most often this
To get access to bug fixes.
Bugs may be discovered in the library version you use, and some of those bugs may be security holes. In that case, not updating to a more recent version means that you'll have a known security vulnerability in your app. Key to realize here is the known part: most hackers search for apps with known vulnerabilities, instead of trying to find new vulnerabilities.
Finally, is it implied that these changes should be implemented manually -- by regularly looking up what the latest Firebase version is, and typing a new version number in index.html -- or is there some kind of automatic "stay current" workflow/tooling/convention that is implied?
If you use a tool to build/pack your website, that typically has a way to automatically pull in new versions.
Many developers configure such a tool to automatically pull in new patches (7.5.x) upon every build, while some even pull in new minor release (7.x.x). But there's also a school of thought that prefers to hard-code the exact version number and only upgrade manually by regularly checking.
Either way, it's required to make a new build to upgrade, even in this case. That's a Good Thing™️, as the last thing you want is that your app breaks in production when Firebase accidentally releases a new version with a bug (a rare occurrence, but it has happened). By only including a new version in your build process, you reduce this risk, especially if you run automated tests of your app's functionality as part of the build.
There's no right or wrong answer here, as either can work just fine. It's really up to your own preference.

Related

flyway version number change issue

We have an application we inherited thats on version 500+, we are not sure why its such a high version, but so be it. We have been using Flyway for a few years on it now, and have multiple releases. Sample would be it started as 500.10.4, and we are now on 500.10.20, so 16 releases containing various flyway scripts on a lot of them, but not all.
Anyway, its been determined that for simplification we are to re-version the application to 6.0.0 in the next release. Is there an easy way to let flyway know of this change, so that if we stand up another instance when it runs through the scripts it would run the 500's first, then go back to the 6's?
Currently our flyway script files are named as such:
V500.10.20_2022.05.12.0000.1__xxxx.sql and so on. So in theory our next would be
V6.0.0_2022.05.13.0000.1__xxxx.sql
I know that flyway would see version 6 as lower than 500 and ignore it. We currently have flyway out of order set to false. Is there any other options to solve this other then to set out-of-order processing to true?
In our situation we do not have any flyway scripts pre version 500. So what we are going to attempt to do is have a manual script run that will update all the data in our xxx_db_version table to be version 5.00.xxxx instead of 500.xxxx. This way when we move to 6.0, all of the scripts would be seen as next in the sequence appropriately. While the versions in this table will then not match previous actual versions of the application this table is not used for the purposes of the actual displayed version of the system or anything, and once we move to version 6, the 500 vs 5 won't really matter. and the order/sequence will still be maintained.
If this does not work, I will post a follow up.

Qt 5.13.2.0 possible malware Variant.Adware.Kazy.795337 in qwebp.dll

today we received info from one of our customer about this malware detection:
Gen:Variant.Adware.Kazy.795337
It's only inside the qwebp.dll file attached to our project by qtdeploy process.
We're building 32-bit Qt (5.13.2.0) from the source and the same issue is reported on the same DLL no matter where it was built. We're using the latest VS 2019.
https://www.virustotal.com/gui/file/9f09c05803ad4ffcd99454c420a840e17549ee711690fb1f11fd1b59bccc3b23/detection
https://www.virustotal.com/gui/file/80c4c747d781a27c72de71c0900ccc045aefd2b4e4f17c949aaeeb3d0b7973b1/detection
When I scanned the older version (5.13.0.0) everything is ok:
Previous versions seem to be clean:
https://www.virustotal.com/gui/file/b7b7cacaef0e76439ef8c367c401524e93dfa00c9ca67a20290e829fec325a5a/detection
Also, any debug build and 64-bit builds are clean too.
Any idea what can cause this? Can anyone else please try to scan this file?
Thanks
TL;DR: It is probably nothing, but notify Qt anyway (and check your own systems).
Are you using the prebuilt Qt binaries or are you compiling the sources yourself?
If you are using the official prebuilt binaries, I'd of course expect that the Qt Devteam scans them and verifies that they don't accidently spread malware, but there is always the miniscule chance of something slipping through.
Same goes for the sources - while their review process should be thorough enough to avoid malicious code being slipped in, there is still the outside chance of either a key account being compromised or (even more unlikely) bad code being added slice-by-slice over a longer time period to avoid detection (along the lines of the underhanded C contest). Still, either case seems to be rather unlikely.
Bottom line: while this does sound like (and probably is) a false positive, you still may want to raise an issue with Qt e.g. on the their Bugtracking site or directly with Qt support (if you have a commercial license) to be sure. Also (if you didn't do that already) verify that the problem is not on your end, e.g. that your computers are clean and that you don't just randomly catch/detect your infection in that file.
Update:
A ticket concerning this issue was opened (I assume by Ludek Vodicka) on Qt bugtracker. Opened on Nov 19th and categorized as P1: Critical, but unfortunately no indication that it is actually being worked on (at least of Dec 18th).

Are there any issues when updating from PhpStorm-2016.1.2 to PhpStorm-2017.1?

I have decided to update my development PC to use PhpStorm-2017.1, but before I update, I do not want to end up wasting 1-2 days re-configuring, if there are any potential issues that can hinder my work.
Will my current license work on the new version?
Will my project settings integrate with the update? (Symfony)
Will my plugins settings be kept? (Symfony)
Any other thing I need to figure out?
Answers to your questions:
1) Yes, the new installed version will automatically pick up your current license.
2) When you update, only the software is updated. The configuration files are not touched and settings are brought across as they were on the previous version.
3) Same answer as answer # 2
4) Not really. Just download the latest version from their website and install it as you would normally.
upgrading to phpstorm 2017.1 was smooth for me, (once they released some later fixes for things like the REST tool etc)
As for your plugins, it'll depend on what plugins they are, and whether there would be BC breaks. Look up the plugin documentation and check to see if there's a version for 2017.1.
For what its worth, the symfony plugin works fine.
You can try official control panel of JetBrains https://www.jetbrains.com/toolbox/app/
Manage product updates with ease
The pace of technologies and software updates is ever-accelerating. Stay up-to-date without compromising your productivity with the Toolbox App: easily maintain several versions of the same tool, install updates, and roll them back instantly if needed.
Could be useful to patch instead of complete update:
Faster updates
When updating, Toolbox App downloads and applies a patch (or even a set of patches) instead of the full package download, thus saving you time & bandwidth.
Official response form JetBrains:
It's hard to tell whether your plugins will work with 2017.1 since there are always some changes in API that may affect some of your plugins. So it's easier just to install 2017.1 and see how it goes. Installation won't broke your existing PhpStorm 2016.2 and its settings.
I believe there have been no changes in license server so if you have right on 2017.1 there shouldn't be any problems.
P.s. Thank you every one for your responses. I will be going with the official answer.

Map Loading is Slow [duplicate]

As per title, does anyone know why it freezes every 30 seconds?
I figured that it was some sort of timer with Google Maps but cant find any such reference.
To recreate, simply copy into a local file the full html + javascript from:
https://developers.google.com/maps/documentation/javascript/examples/map-simple
Open the local html file and then just move the map around and it will freeze within 30 seconds. Once it unfreezes, it works fine until 30 seconds have elapsed.
Seems to only happen in IE (i used version 11). Note that it doesnt freeze within the Google example page above.
Any help would be appreciated.
This appears to be an issue in the experimental version, currently 3.20.
See versioning in the Developer's Guide
Versioning
The Google Maps API team will regularly update this Javascript API with new features, bug fixes, and performance improvements. All API changes will be backwards-compatible, ensuring that if you launch an application using the currently documented interfaces, that application will continue to work without modification as the API is updated. (Note: experimental features, documented in the Experimental API Reference are not covered by this guarantee. Features that are experimental will be clearly labeled in the API documentation.)
Types of Versions
You can indicate which version of the API to load within your application by specifying it using the v parameter of the Maps Javascript API bootstrap request. Three options are supported:
The experimental version, specified with v=3.exp.
The release version, specified with v=3 or v=3.19.
A numbered version, specified with v=3.18.
If you do not explicitly specify a version, you will receive the experimental version by default. Google Maps API for Work customers who specify a client ID will receive the release version by default.
The experimental version
The experimental version — currently 3.20 — contains the latest features and bug fixes as they are made publicly available. Changes made to the experimental version are not guaranteed to be feature stable. We encourage you to regularly test your applications with the experimental version, which you can do by adding v=3.20 when loading the Maps API. If you like to live on the edge, you can add v=3.exp to always receive the current experimental version with all of its latest features.
I think it has something to do with the security settings (for local files).
Because I hosted the exact same file on github, and it seems to work fine. And the only difference between the two files are their storing location.
If you open the local file, it would says something like internet explorer restricted this webpage from running scripts or activex controls, so I would say it is the security settings for local files.
If you try to run the HTML from a local drive with developer tools on you get the error 'Invalid Argument', in the function below, then you hit f5 to continue and the map eventually renders. Hope this helps.
function dn(a,b){return a.setQuery=b}function en(a,b){return a.background=b}function fn(a,b){return a.tilt_changed=b}function gn(a,b){return a.bounds_changed=b}function hn(a,b){return a.getStatus=b}function jn(a,b){return a.getQuery=b}function kn(a,b){return a.projectionBounds_changed=b}function ln(a,b){return a.border=b}

Flyway-1.7: workaround for dealing with branching? (Flyway issue 138)

Flyway is a very nice tool to automate database updates (also called migrations). However, as of version 1.7 it relies on a completely linear sequence of migrations. This assumption is immediately void if you have a production system for which you have to deliver fixes while you are already developing new stuff. The FAQ argues correctly that this is a non-issue for the production system itself, but if you have development and/or QA-systems that already on the development branch, you need to run migrations from the fixes for the production version out of band.
A solution that would allow this is pending with Issue 138, but is not done yet. Since this is pretty much a deadly problem: are there any clever workarounds if I want to use it right now?
The approach I recommend (and which becomes almost essential in a Continuous Delivery/deployment) environment is using Feature Toggles and release from HEAD, instead of using Feature or Release branches. This is then combined with backward compatible migrations to complete alleviate this problem.
If for some reason that isn't an option for you, you don't have to wait very much longer.
Flyway 1.8 (which will include the fix for 138) will be out soon.
The problem is obsolete since Flyway version 2.0: if you set the outOfOrder flag then flyway will also execute migrations with earlier version numbers that have not been applied yet. You need however to make sure that such out of band migrations can be applied in any order to the later migrations, or you will run into serious trouble.
With Flyway-1.7 you could make the following workaround. If you have a development and a production branch, you could have separate instances of flyway including separate metadata tables (say, SCHEMA_HISTORY and SCHEMA_HISTORY_DEV) for the production and the development branch. On the production server there is only the SCHEMA_HISTORY and you work as usual; for the development server you have both, and each time you run flyway you first run it on the production branch sqls with the SCHEMA_HISTORY and then on the development branch sqls with the SCHEMA_HISTORY_DEV.
When you switch branches you have to merge the SCHEMA_HISTORY_DEV into SCHEMA_HISTORY. (You need to exclude the initial revision and reset the CURRENT_VERSION on SCHEMA_HISTORY.) And when flyway-1.8 comes out, you do this merge and throw SCHEMA_HISTORY_DEV away.

Resources