When building a new version of my application, it's possible that files that were needed in a previous version are no longer needed. I would like these to be cleaned up during an upgrade. My ideas so far:
I considered using the InstallDelete, but this would require the current build to know what files the previous build contained. The build process is automated, and I'd prefer that the build didn't have to check in anything. (It makes tagging and the like rather messy.)
I also considered running an uninstall, but this would mean that the upgrade could not be fully rolled back (since the application would have been uninstalled).
Is there a way to detect files that were present in the old install but not the new one during the install and to have Inno delete them in a way that could be rolled back (or that happens only if the install was successful)?
Related
I just cloned our remote repo on my new system that I just installed Node/npm on. Then I ran npm install to get all the packages installed. Was this not the right command?
VSCode is showing me huge differences in the lock file. The lockFileVersion changed from 1 to 2 and there many, perhaps hundreds, of changes in this huge file. Why would that happen and what is the potential impact of checking this in?
It looks like the changes are mostly related to node modules. example:
"node_modules/css-declaration-sorter/node_modules/chalk/node_modules/supports-color": {}
Where that entry wasn't there in the existing repo.
Or am I making a big deal out of nothing?
Your package.json file specifies limits and ranges of acceptable versions, while the lock file specifies the exact versions you are using, taking into account all the dependency resolutions that were available the last time you ran install.
In general, if your code builds and runs, you want to publish the lock file to your repository. This will ensure the production build will use the exact versions you have built with.
General: I develop an Azure DevOps extension with tasks and pipeline decorators. Testing on local Azure DevOps Server instance. Extension loaded through manage extensions from local hard drive. Let's say that I installed the extension first time with version 1.0.0 and a node_modules dependency "3rdPartyDep" with version 2.0.0, which has transitive dependencies with vulnerabilities.
Scenario:
Upgrade "3rdPartyDep" to version 3.0.0 with fixed vulnerabilities. Build new version of my extension, say 1.0.1. Create the .vsix, update the extension in the Azure DevOps Server.
Run a pipeline, which fails because I did not check the "3rdPartyDep" changes and there are breaking changes and the extension fails to run.
Rollback the "3rdPartyDep" library to 2.0.0 because I have no time now to check what is broken in there right now as I have other things to debug and implement, repackage the extension, increase version to 1.0.2, update extension in Azure DevOps Server.
Run the pipeline. It fails with the same exception, as if I didn't rollback. I look into the agent taks folder and I see that the node_modules with the "3rdPartyDep" library is pointing to 3.0.0, which is wrong because I rolled back the version.
I open the generated .vsix archive and check that the node_modules inside contains the correct 2.0.0 version, so no problems of packaging or building from my side.
I make a conclusion that Azure DevOps stores somewhere a cached version of the extension with the node_modules including the wrong version of the "3rdPartyDep". I search that cache folder over internet to find out where it is, and I also search with a search tool all my machine, including words in file. Nowhere to be found. There is no location on my machine with such node_modules containing the 3.0.0 version. It might be stored in some encrypted DB?
I uninstall completely the extension, and install it back. I see that Azure DevOps has a history for the extension, and the cache is not cleared. Any pipeline fails, even if my .vsix does not contain this dependency.
I'm stuck.
Questions:
Where extensions are actually cached inside Azure DevOps Server?
Why updating, uninstalling and installing does not fix the problem?
Is there any way to fix this? What can I do? I do not want to reinstall the server completely. Moreover, this raises concerns about how node_modules are managed and cached and what happens at the clients and the cloud.
You could try the following items:
Try to clean the browser cache, and check whether you have increase the version number in the task.json.
Try to perform Delete task -- Save definition -- add task again process.
Delete Azure DevOps Server cache, which can be followed in this link.
Uninstall the extension from CollectionSettings, remove the extension from local Manage Extensions. Then upload again the extension and install it in the collection.
A while back I generated a project with JHipster Registry, among other things (let's call it conf1). After a few months I realized I don't need it and changed everything I need to so my project would work properly (this one will be conf2) and it work as expected.
Now, every time I want to upgrade my project, JHipster generates everything based on config1 instead of config2, which means my changes to get rid of anything I don't want, for instance JHipster Registry, get overridden by the upgrade.
So my question is: what do I need to change so that every time I upgrade to a new JHipster version, I don't get it done based on config1?
Deleting the jhipster_upgrade branch solved the issue.
How to integrate a branch back to trunk when files in the trunk have been moved or renamed while files in the branch have been changed?
The question Integrating moved files in perforce explains similar issue in reverse order, i.e. integrating trunk into branch where files have been moved. However, the answer does not help.
I am unable to use p4 integrate -3 in my scenario, and perforce always asks to specify -D or -Dt flag, which if specified, always creates new files instead of merging them into the existing moved files. Note that I am using latest Perforce client 2014.1.
If at all possible I'd recommend upgrading your server; I'm inferring from the fact that you're unable to use "p4 integrate -3" that you're on a fairly old release. With the latest server release the "integrate -3" functionality is enabled by default, without having to use an extra flag or anything, per this blog post:
http://www.perforce.com/blog/130806/quality-life-improvements-renamed-files
Having this functionality is a pretty big deal since it makes the scenario you describe "just work" -- all you have to do is integrate and resolve as normal.
Without that functionality, you have to do some work -- either modify a branchspec to line the current versions of the files up and use that to integrate the content, or manually recreate the same rename operations in the branch so that the files line up normally.
Note that this functionality requires a new server in addition to a new client, so a 2014.1 client on its own (with an old server) won't do the trick -- a server upgrade is necessary. If you're on an old release you'll need to do a restore from checkpoint as part of the upgrade, per the instructions in the administrator's guide:
http://www.perforce.com/perforce/doc.current/manuals/p4sag/chapter.install.html#d0e1167
but I would recommend you don't let that deter you; you'll be getting a lot of improvements. :)
I've been playing around with how I want to setup my upgrades for an application install I'm creating using Installshield, using basic MSI projects.
I don't support any additional features/components and most of the upgrades will just be files/folders being added/removed from the default component.
I seem to be having difficulty in removing files/folders when creating an upgrade. I create my upgrade by copy/pasting the original setup.ism (i.e Version 1 of my install), so that I have all the files/folders of the original install, and then I just add/remove any changes. Is this correct? or should the upgrade.ism only contain newly added/removed files folders?
I first tried a Minor upgrade. I figured out how to remove files (right click - delete, and then add an entry to the RemoveFiles editor), but I haven't figured out how to remove folders. I don't want to have to manually add each file to the RemoveFiles table as there is likely to be hundreds of them. How can I have an upgrade remove a folder and all its children?
I've also tried the Major upgrade, which is very easy as I don't have to worry about removing files/folders due to it uninstalling first. But then I don't get the dialog that informs the user that it is actually an upgrade.
You can use your Action property defined in the UpgradeTable to detect if a major upgrade is occurring a present different UI elements to your user.
Most people will never need minor upgrades and/or patches. For most applications the major upgrade is the simplest approach to maintain and the downside of shipping the entire package is minimal. It's only for really large installers shipped to thousands or millions of customers this becomes an issue.
To remove a file during a minor upgrade you need to 'puncture' the component. You author it as transitive (InstallShield condition reevaluate=true) and give it an expression that always returns false. Checkout:
Uninstall a component during minor upgrade
Your approach of removing the component and authoring a rule in the RemoveFile table is incorrect. This breaks the component rules and reference counting.
It's a good idea to learn how minor upgrades work and what you can and can't do but don't be surprised if you find yourself leaning on major upgrades more.