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

Support Baton-drive automatic migrations, apply to monorepo dependencies moving into the [tool.poetry.group.monorepo.dependencies] group #62

Closed
d-ryan-ashcraft opened this issue Nov 14, 2023 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@d-ryan-ashcraft
Copy link
Contributor

Integrate Baton so we can perform common migration implictly.

Specifically, configure migrating monorepo dependencies moving into the [tool.poetry.group.monorepo.dependencies] group as the first Baton migration.

@d-ryan-ashcraft d-ryan-ashcraft added the enhancement New feature or request label Nov 14, 2023
@d-ryan-ashcraft d-ryan-ashcraft added this to the 2.9.0 milestone Nov 14, 2023
@d-ryan-ashcraft d-ryan-ashcraft self-assigned this Nov 14, 2023
d-ryan-ashcraft added a commit that referenced this issue Nov 15, 2023
d-ryan-ashcraft added a commit that referenced this issue Nov 15, 2023
#62 ✨ initial Baton integration to support automated migrati…
@d-ryan-ashcraft
Copy link
Contributor Author

d-ryan-ashcraft commented Nov 15, 2023

Test Steps

  • Check out habushu project at https://github.com/TechnologyBrewery/habushu
  • Run mvn clean install -Pbootstrap
    • Verify that all unit tests passed successfully (newly added BDD specification monorepo-migrations.feature is included, so this validated functionality in an automated fashion)
  • Update habushu/habushu-mixology-consumer/pyproject.toml as follows:
    • Comment out the following lines (add the # to the front):
    #[tool.poetry.group.monorepo.dependencies]
    #habushu-mixology = {path = "../habushu-mixology", develop = true} 
    • Run mvn clean install -pl :habushu-mixology-consumer
    • Validate that pyproject.toml has no further changes
  • Update habushu/habushu-mixology-consumer/pyproject.toml as follows:
    • Move the habushu-mixology dependency to the [tool.poetry.dependencies] group:
    [tool.poetry.dependencies]
    python = "^3.11"
    habushu-mixology = {path = "../habushu-mixology", develop = true} 
    • Validate that pyproject.toml has a new [tool.poetry.group.monorepo.dependencies] that now contains the habushu-mixology dependency:
    [tool.poetry.dependencies]
    python = "^3.11"
    
    [tool.poetry.group.monorepo.dependencies]
    habushu-mixology = {path = "../habushu-mixology", develop = true}
  • Do not habushu/habushu-mixology-consumer/pyproject.toml to verify that if the toml file is already in a desired state, no changes are made:
    • Run mvn clean install -pl :habushu-mixology-consumer
    • Validate that pyproject.toml has no further changes (monorepo group still exists with the same dependency)
  • Update habushu/habushu-mixology-consumer/pyproject.toml as follows:
    • Move the habushu-mixology dependencies back to the [tool.poetry.dependencies], but leave the now-empty group [tool.poetry.group.monorepo.dependencies] there:
    [tool.poetry.dependencies]
    python = "^3.11"
    habushu-mixology = {path = "../habushu-mixology", develop = true}
    
    [tool.poetry.group.monorepo.dependencies]
  • Run mvn clean install -pl :habushu-mixology-consumer
  • Validate that pyproject.toml has a new [tool.poetry.group.monorepo.dependencies] that now contains the habushu-mixology dependency:
    [tool.poetry.dependencies]
    python = "^3.11"
    
    [tool.poetry.group.monorepo.dependencies]
    habushu-mixology = {path = "../habushu-mixology", develop = true}
  • Rollback your local changes to habushu/habushu-mixology-consumer/pyproject.toml

@d-ryan-ashcraft d-ryan-ashcraft removed their assignment Nov 15, 2023
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

1 participant