-
Notifications
You must be signed in to change notification settings - Fork 0
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
Support 1.1.0 manifests #31
Comments
@OfficialEsco Would you be able to suggest which of the fields we should prompt for? I'm thinking
|
Well, I also have some fields which can be taken into consideration:
|
Dependencies might be a bit difficult due to the structure, but I could see where it would be good to add. I think they exist in the 1.0 schema too |
Yeah these are good/important
Channel is important, however we need to know if they actually support and how to use it.. This might be a waaaay too advanced for most people. Dependencies is also complicated and not something you need to add often other than once I think we might need all of these to be optional
Tbh Schema 1.1.0 seems a lill bit messy |
I think just before testing and submitting the manifest, we can include a prompt something like this "Do you want to fill additional/advanced manifest fields" and then we can prompt for these fields. |
I think we can and should be able to move over to manifest schema 1.1.0 fairly quickly We can add the different variables as needed edit: First step is probably just replacing edit2: experimental package microsoft#35148 |
I think there's a couple ways to approach it; The first is to just add the variables, and that is probably the best next step. It is the approach I want to take. The second step, then, it is to change how the data gets populated into the manifest. Ideally, we would never be creating new manifests, only modifying them. Yes, I do truly mean this. Even for "new" manifests, we should ideally be starting with a full manifest, where all the fields are simply null. This would make a lot of the logic more direct, since we would never have to worry about fields being missed. I'll document a bit more of this later in #37, but the main idea is that we always either 1) Create a blank manifest of the latest version, copy over all the metadata that we can, and then continue - or 2) Check which fields exist in the current manifest, add the ones which do not exist, then continue. |
This comment has been minimized.
This comment has been minimized.
* Prepare file for 1.1.0 manifests - Trenly#31 * Installer detection improvements (#111) * Begin update in place * Condense installer switch logic * Fix Null values * Prevent null checking * Cleanup * Fix missed variable * Bump version * Update function calls * Fix empty ProductCode * Confirm Architecture when Automatically Detected * Remove Debug Line * Add duplicate url check for Quick update * Remove line used in debugging * Remove unneeded comment * Resolves Trenly#121 Co-authored-by: Vedant <[email protected]>
I think that the best way to go about adding support for additional manifest fields will be to rethink the idea of how we are creating the Yaml files in the first place. Currently, we are asking users to select a program flow, then enter variables which get populated into an untracked object, and then eventually get written into Yaml. This requires careful scrutiny of all the parameters and where they are placed, has a lot of potential for duplicate code, and is overall an inefficient way of coding. As the manifest schema gets more complex, this requires each flow to be updated and validated independently. I had done some experimentation in a separate branch on using a The main thing to note is that every single property that we would request would get its own function - referred to here as a The second thing to note here is the recursive nature of the script. It would only ever go to writing the manifests if it was called using the input object parameter. This means that the script has two main sections -
By doing it this way, the primary flow becomes the single point that needs to be tested. Not to say that the secondary flow doesn't need to be tested, but more that it reduces the logic to a single place where manifest data is ever changed, making debugging easier. @OfficialEsco @jedieaston I'd love to know your thoughts on this proposal before I start the work Finally, some examples of how this would simplify the flows - Example 1 - Auto Update
Example 2 - Simple UpdateObject output from Simple Update Secondary Flow -
This data would then be passed back into the YamlCreate script, and the data would be merged with the existing manifest to create the new manifest |
I'm running on final exam brain atm, but this looks like a good idea to me. The refactor will be complicated. |
It will be very complicated, if this is a route we want to go. I'm thinking that I might start it in a new file until I actually get it working |
The |
@SpecterShell that will be implemented in YamlCreate 2.1.0, same as #116 |
@Trenly since i don't understand the script anymore, how "hard" would it clear the Later we could look into suggesting ReleaseDate as today (skip prompt for Vedant's automation), + there is currently a "bug" here that makes the date invalid, not sure how it affects Vendant's automation ReleaseNotesUrl could also be automated IF its a GitHub url, could probably do the same for LicenseUrl. |
I don't think it would be hard to clear them; Adding a prompt for them gets a little more involved, and adding a parameter for it would be difficult until the rewrite. What are all the fields that should be cleared when updating automatically? Is it just the 3 you mentioned? |
Yup that should be enough Also about our Channel discussion somewhere on GitHub, the REST Schema 1.1.0 does still not support it, but would be smart to have a module ready in the rewrite |
See #137 regarding the fields; As for channels, I'll include it in the rewrite; Seems like it's a bit far out for right now |
* Prepare file for 1.1.0 manifests - Trenly#31 * Fix Trenly#131 * Minor bug fixes and enhancements (#135) * Check dependency before settings * Execute `Get-AppLockerFileInformation` only in Win * Fix: Use combined hashes (#136) * Bump to v2.0.5 * Clear volatile fields 1.1.0 (#137) * Prompt for volatile Release Values * Add Patterns for release notes * Clear volatile Locale fields on update * Clear volatile Locale for additional locales * Clear ReleaseDate on automatic-type upgrades Co-authored-by: Vedant <[email protected]>
Description of the new feature/enhancement
Be prepared to switch to Manifest version 1.1.0 once microsoft/issues/27937 is completed
Proposed technical implementation details (optional)
Other Considerations
The text was updated successfully, but these errors were encountered: