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

feat: automatically generate the migrations guide #3699

Closed
Pantani opened this issue Oct 16, 2023 · 6 comments · Fixed by #3718
Closed

feat: automatically generate the migrations guide #3699

Pantani opened this issue Oct 16, 2023 · 6 comments · Fixed by #3718
Assignees
Labels
component:docs Documentation additions or improvements. type:request Feature request.
Milestone

Comments

@Pantani
Copy link
Collaborator

Pantani commented Oct 16, 2023

Create a tool so we can auto-generate the migration guide. This tool should scaffold a chain with the previous version and the latest version and make a diff between both projects.

We should scaffold only a chain, make the diff, and after scaffold each type individually and make the diff

@Pantani Pantani added type:request Feature request. component:docs Documentation additions or improvements. labels Oct 16, 2023
@Ehsan-saradar Ehsan-saradar self-assigned this Oct 19, 2023
@Pantani Pantani moved this to Backlog in Ignite CLI Masterboard Oct 19, 2023
@Ehsan-saradar Ehsan-saradar self-assigned this Oct 23, 2023
@Ehsan-saradar
Copy link
Contributor

Ehsan-saradar commented Oct 31, 2023

Base procedure of the tool/CI pipeline:

  1. Clone Ignite CLI repository
  2. List version tags in descending order and pick the first two tags as latest version and previous version
  3. Build ignite for each of the versions (first previous version and then latest one)
  4. Run a series of scaffold commands individually, with both of the binaries
  5. Make diff of generated code either with diff cli tool or https://github.com/hexops/gotextdiff
  6. (Experimental) Generate Human readable Markdown documentation from the diff with help of ChatGPT

@Ehsan-saradar
Copy link
Contributor

Also, since most of the scaffold commands like list, type and ... need to be executed on a chain already scaffolded with module we have to subtract the chain and module base changes from the commands diff.

@Ehsan-saradar
Copy link
Contributor

@Pantani If we are going to write this tool in golang i think that it's good idea to move it to a separate repository

@Pantani Pantani added this to the v0.30 milestone Oct 31, 2023
@Pantani
Copy link
Collaborator Author

Pantani commented Nov 1, 2023

We should have the ability to pass two different versions, not only compare the 2 last version

@Pantani
Copy link
Collaborator Author

Pantani commented Nov 1, 2023

@Pantani If we are going to write this tool in golang i think that it's good idea to move it to a separate repository

totally agree!

@Pantani Pantani modified the milestones: v0.30, v0.29 Nov 7, 2023
@Pantani Pantani moved this from Backlog to In Progress in Ignite CLI Masterboard Nov 7, 2023
@Ehsan-saradar
Copy link
Contributor

Ehsan-saradar commented Jan 29, 2024

I suggest to divide this issue into two different parts

  • Develop a tool to scaffold two chains representing different versions, compare them, and output a minimal version diff. This tool will automate the process of creating a comparison between two versions by scaffolding a chain for each version, then analyzing the differences between them to produce a concise and informative differential report.

  • Build a tool to utilize the output from the previous step and generate a migration document. This tool will take the minimal version diff generated in the first step and use it to automatically generate a comprehensive migration guide, detailing the changes between the two versions and providing clear instructions for migration.

@salmad3 salmad3 assigned Pantani and unassigned Ehsan-saradar Feb 19, 2024
@Pantani Pantani moved this from Doing to Review / QA in Ignite CLI Masterboard Mar 12, 2024
@github-project-automation github-project-automation bot moved this from Review / QA to Done in Ignite CLI Masterboard Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:docs Documentation additions or improvements. type:request Feature request.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants