erisu opened a new pull request, #253:
URL: https://github.com/apache/cordova-paramedic/pull/253

   <!--
   Please make sure the checklist boxes are all checked before submitting the 
PR. The checklist is intended as a quick reference, for complete details please 
see our Contributor Guidelines:
   
   http://cordova.apache.org/contribute/contribute_guidelines.html
   
   Thanks!
   -->
   
   ### Motivation and Context
   <!-- Why is this change required? What problem does it solve? -->
   <!-- If it fixes an open issue, please link to the issue here. -->
   
   Various Android tests are failing because of the config munging order.
   
   This PR changes the order of the project setup and the plugin install as a 
temporary workaround for Android plugin testing.
   
   This change does not resolve the underlining issue.
   
   ### Description
   <!-- Describe your changes in detail -->
   
   #### Example issue
   
   **Current Order of Paramedic for Reference:**
   
   * Install Plugins
     * Install Plugins
     * Install Test For Existing Plugins
     * Install CI Testing Framework Related Plugins
   * Setup Project Config For Test Framework
   * Install Platform
   
   Some plugins and the test plugins will inject elements into the 
`AndroidManifest` with `config-file`. For example, let us say the `provider` 
node is injected into the path of `/manifest/application`.
   
   Next, the CI testing plugin attempts to update the `/manifest/application` 
node by appending attributes with `edit-config`.
   
   Because the CI is trying to update the same node that had already been 
modified with `config-file`, it fails to merge with conflicts, even if the 
changes do not affect each other.
   
   #### Example Solution
   
   **New Order of Paramedic for Reference:**
   
   * Install Platform
   * Install Plugins
     * Install CI Testing Framework Related Plugins
     * Install Plugins
     * Install Test For Existing Plugins
   * Setup Project Config For Test Framework
   
   If `edit-config` is applied first and then `config-file` is applied last, 
will not fail because config-file only uses the node path as a reference to 
where it needs to inject.
   
   #### Final Note
   
   Even though we change the order for the paramedic to resolve the issue, it 
only tests as if the project was being built up from scratch.
   
   If we looked at the issue from a CI perspective, all the plugins and 
platforms are usually defined in `package.json`, and running `cordova prepare` 
could trigger the same issue as the order for installation might not be 
guaranteed.
   
   More investigation into a proper solution should be performed within the 
`cordova-common` repo.
   
   ### Testing
   <!-- Please describe in detail how you tested your changes. -->
   
   * GitHub Action CI
   
   ### Checklist
   
   - [x] I've run the tests to see all new and existing tests pass
   - [ ] I added automated test coverage as appropriate for this change
   - [ ] Commit is prefixed with `(platform)` if this change only applies to 
one platform (e.g. `(android)`)
   - [ ] If this Pull Request resolves an issue, I linked to the issue in the 
text above (and used the correct [keyword to close issues using 
keywords](https://help.github.com/articles/closing-issues-using-keywords/))
   - [ ] I've updated the documentation if necessary
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to