-
Notifications
You must be signed in to change notification settings - Fork 111
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
Shared ConsolidatedCalamari Library solution + roundtrip test #1424
Open
rain-on
wants to merge
31
commits into
main
Choose a base branch
from
tmm/redo_everything_full_path
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
And fixed all the namespacing issues
flin-8
reviewed
Jan 17, 2025
return packageId.Equals("Calamari") || packageId.Equals("Calamari.Cloud"); | ||
} | ||
|
||
private static string SanitiseFilenamesInIndex(string s) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Driveby: why do filenames need to be sanitized?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be done better - basically - whenever we see a hash - we want to replace it with a fixed tag.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contains 2 changes:
At the moment the index.json in consolidated calamari contains a list of hashes (aka directories) which must be consolidated in order for a given flavour of calamari to execute.
Thus when octopus is trying to construct a calamari to run, it copies ALL files from each of the listed directories into a single zip (with pathing) - and sends that over to the target.
Up until now, that works correctly.
As part of the migration to netcore - AzureWebApp required a "shim app" to wrap the capabilities in Microsoft.Deployments.Web (which does not have a netcore counterpart) - this shim-app is a netfx app - and uses newtonsoft.
When a consolidated calamari is created - the AzureWebApp now list in its hashes:
Unfortunately, this means that Newtonsoft is pulled in 3 times:
Thus - the netcore version of newtonsoft in the root-directory is overwritten with the netfx version - meaning Calamari.AzureWebApp fails to start when it is reconstructed from a consolidated calamari.
================
The solution is to replace the hashes, with a full-blown file-reference (See example below).
NOTE: Linux path separators are used as they are valid cross platform.
{ "Packages": { "Calamari": { "PackageId": "Calamari", "Version": "27.3.5-pullrequest1416-0029", "IsNupkg": true, "PlatformFiles": { "netfx": [ { "Source": "0bb288e5dfefd00cf8dd53e282a3fb6f/Calamari.nuspec", "Destination": "Calamari.nuspec" }, { "Source": "d712a5a82a446086443ce00b610d8a5d/System.Data.Common.dll", "Destination": "Cloud/System.Data.Common.dll" }, { "Source": "33b8972fa6b00b8922210ca95e5745d1/System.IO.Compression.dll", "Destination": "Cloud/System.IO.Compression.dll" }, { "Source": "bc1215a36bcb4bb151194af2fd6bd8eb/System.Memory.Data.dll", "Destination": "Cloud/System.Memory.Data.dll" }, { "Source": "55d9528d161567a19dbb71244b3ae3ce/System.ObjectModel.dll", "Destination": "Cloud/System.ObjectModel.dll" }, { "Source": "e1e2239979b853157ba75310fea7e65d/System.Runtime.Serialization.Json.dll", "Destination": "Cloud/System.Runtime.Serialization.Json.dll" }, { "Source": "d40515a84448b91315f956e6d1a6c64b/System.Text.Encoding.Extensions.dll", "Destination": "Cloud/System.Text.Encoding.Extensions.dll" },