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

Version rollback needs investigating and sample; app cast filtering needs sample #294

Open
Deadpikle opened this issue Feb 27, 2022 · 3 comments

Comments

@Deadpikle
Copy link
Collaborator

From @johncclayton on Gitter:

I took a good look at the Configuration code along with debugging it before realizing that the InstalledVersion value is the trick here - it's held in RAM only and driven by the Assembly version, on Init of the Configuration object. This value cannot be influenced by client code since it's protected set. At present I don't see how an app can revert it's version without these changes - specifically the one that forces the NetSparkle code to believe that a different version is in play during the call to GetAvailableUpdates - but I'm all ears if I missed something, if that's the case and I managed to completely miss the point and see the solution - do let me know :-)

Need to investigate whether or not rollback to an old version of the app(s) is working as intended. Initially, the intent was that a user could always do this by loading the app cast into app cast items and then just manually choosing the version to load, but if the configuration setup with the current version is not allowing you to see old versions or versions less than the current binary, than we have a problem. Obviously, default behavior should be to only view newer versions.

@Deadpikle
Copy link
Collaborator Author

Applicable code:

/// <summary>
/// The currently-installed version, e.g. "1.4.3"
/// </summary>
public string InstalledVersion { get; protected set; }

foreach (var item in items)
{
var currentItem = AppCastItem.Parse(_config.InstalledVersion, _config.ApplicationName, _castUrl, item, _logWriter);
_logWriter.PrintMessage("Found an item in the app cast: version {0} ({1}) -- os = {2}",
currentItem?.Version, currentItem?.ShortVersion, currentItem.OperatingSystemString);
Items.Add(currentItem);
}

Might be just as easy as adding a public setter (don't want to break things by changing protected set; to set;) or some other method to adjust this. But, I want to get a full sample going for version rollback. The more samples, the easier it will be for others to implement things.

@Deadpikle Deadpikle changed the title Investigate and fix any issues surrounding version rollback Investigate, fix if needed, and add sample for version rollback Feb 27, 2022
@Deadpikle Deadpikle added this to the 2.2+ milestone Apr 24, 2022
@Deadpikle
Copy link
Collaborator Author

Really need to also add a sample for how to use the new filtering process on beta/stable channels along with this, as version rollback and a beta/stable channel feature can both use the new filtering process.

@Deadpikle Deadpikle changed the title Investigate, fix if needed, and add sample for version rollback Version rollback needs investigating and sample; app cast filtering needs sample Jun 5, 2022
@johncclayton
Copy link
Contributor

johncclayton commented Oct 11, 2022 via email

@Deadpikle Deadpikle modified the milestones: 2.2+, Future Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants