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

Feature: Change references to migration utils classes to reference Baton utils classes in anticipation of new Baton release: POM Utils #186

Closed
cpointe-ibllanos opened this issue Jul 2, 2024 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@cpointe-ibllanos
Copy link
Contributor

cpointe-ibllanos commented Jul 2, 2024

Description

In order to allow Baton migrations to be more reusable and general, we should pull out key features from aiSSEMBLE foundation-upgrade and move them directly into baton so they can be extended.

Related issue on the Baton side

DOD

This ticket will focus on moving POM utils classes from aiSSEMBLE from com.boozallen.aissemble.upgrade to Baton.

The intention of this ticket is to migrate the utilities that perform migration logic for Maven's POM files:

  • LocationAwareMavenReader.java
  • PomHelper.java
  • PomModifications.java

The implementation process for doing so is:

  • Migrate utility in the Baton repo ✅
    • Remove mentions of aiSSEMBLE if present ✅
  • Identify and write unit tests for the relevant util methods/subclasses for:
    • PomModifications.java
      • Deletion ✅
      • Insertion ✅
      • Replacement ✅
  • Verify the migrated utility works in Baton ✅
    • Update test steps and run through them ✅
  • Update the documentation for Baton to illustrate the new capability ✅
    • Update README ✅
    • Update javadoc descriptions ✅
    • Add an example project in baton directory that uses utils to do a simple POM migration ✅
  • (Nice to have) Reimplement LocationAwareMavenReader.java as an extension instead of a copy of the original class
    • Seems to have private and final members we intend to change, don't see an alternative to address this 🟥

Test Strategy/Script

  1. Pull down and open Baton
    git clone [email protected]:TechnologyBrewery/baton
  2. Confirm the Baton bootstrap build is successful and tests pass
    mvn clean install -Pbootstrap
  3. Confirm the Baton example projects build successfully
    mvn clean install
  4. Pull down and open aiSSEMBLE
    git clone [email protected]:boozallen/aissemble
  5. Run the baton migration unit tests successfully
    ./mvnw clean install -pl :foundation-upgrade
  6. Confirm aiSSEMBLE built successfully in CI with the changes

References/Additional Context

  • LocationAwareMavenReader.java is a copy of org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx. Should we try to convert this to an extension or proceed to moving it to Baton as is?
    • Seems like a lot of the functions to be overwritten had properties that were final or private. Can attempt to do this as an extension again as it would be nice
  • TiltfileUtil.java seems to heavily reference aiSSEMBLE more than the other files and will probably require the most refactoring to be made generic
    • Should be able to split this one into TiltFileUtil (baton) and AissembleTiltFileUtil (aissemble) in the next ticket

Follow-Ons

The following classes will also be migrated from aiSSEMBLE to Baton either in this ticket or in future tickets:

  • PythonPackageMigration.java
  • TiltfileUtil.java
  • YamlUtils.java
@cpointe-ibllanos cpointe-ibllanos added the enhancement New feature or request label Jul 2, 2024
cpointe-ibllanos added a commit that referenced this issue Jul 12, 2024
 #186 Remove Pom migration utils in prep for new baton release
cpointe-ibllanos added a commit that referenced this issue Jul 12, 2024
#186 Update baton version to latest release 1.1.1
@ewilkins-csi ewilkins-csi added this to the 1.8.0 milestone Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants