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(pkg): improve xgenny dry run #4001

Merged
merged 39 commits into from
Mar 28, 2024
Merged

feat(pkg): improve xgenny dry run #4001

merged 39 commits into from
Mar 28, 2024

Conversation

Pantani
Copy link
Collaborator

@Pantani Pantani commented Mar 5, 2024

close #2565

Description

Improve the xgenny package by creating a custom runner to salve all modifications into a temporary folder and only apply and copy all files to the target directory later.

Changes

This PR removes the default dry and wet runners, avoiding running two generators. If everything works fine, only one will run into a temporary folder and be copied to the target folder.

@Pantani Pantani self-assigned this Mar 5, 2024
@github-actions github-actions bot added component:ci CI/CD workflow and automated jobs. component:configs component:cmd type:services Service-related issues. component:packages labels Mar 5, 2024
@Pantani Pantani marked this pull request as ready for review March 7, 2024 07:14
jeronimoalbi
jeronimoalbi previously approved these changes Mar 11, 2024
Pantani and others added 2 commits March 11, 2024 18:46
…ry-run

# Conflicts:
#	ignite/cmd/scaffold_chain.go
#	ignite/services/scaffolder/init.go
Pantani and others added 8 commits March 19, 2024 22:09
…ry-run

# Conflicts:
#	ignite/cmd/scaffold_chain.go
#	ignite/services/scaffolder/configs.go
#	ignite/services/scaffolder/init.go
#	ignite/services/scaffolder/message.go
#	ignite/services/scaffolder/module.go
#	ignite/services/scaffolder/packet.go
#	ignite/services/scaffolder/params.go
#	ignite/services/scaffolder/query.go
#	ignite/services/scaffolder/scaffolder.go
#	ignite/services/scaffolder/type.go
…ry-run

# Conflicts:
#	ignite/cmd/chain.go
#	ignite/cmd/scaffold.go
#	ignite/cmd/scaffold_chain.go
#	ignite/cmd/scaffold_configs.go
#	ignite/cmd/scaffold_message.go
#	ignite/cmd/scaffold_module.go
#	ignite/cmd/scaffold_packet.go
#	ignite/cmd/scaffold_params.go
#	ignite/cmd/scaffold_query.go
#	ignite/pkg/xgenny/run.go
#	ignite/services/chain/init.go
#	ignite/services/chain/proto.go
#	ignite/services/doctor/doctor.go
#	ignite/services/scaffolder/configs.go
#	ignite/services/scaffolder/init.go
#	ignite/services/scaffolder/message.go
#	ignite/services/scaffolder/module.go
#	ignite/services/scaffolder/packet.go
#	ignite/services/scaffolder/params.go
#	ignite/services/scaffolder/query.go
#	ignite/services/scaffolder/type.go
@Pantani Pantani force-pushed the feat/improve-xgenny-dry-run branch from 39b43c0 to a229be4 Compare March 22, 2024 01:39
Copy link
Member

@jeronimoalbi jeronimoalbi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvements 👍

@jeronimoalbi
Copy link
Member

@Pantani the changes from #4057 might be the cause for the failing tests here. CI reported failing tests after merging the changes from the mentioned PR.

Maybe we should remove the -race until further investigation.

cc @julienrbrt

@Pantani Pantani merged commit 2ad41ee into main Mar 28, 2024
46 checks passed
@Pantani Pantani deleted the feat/improve-xgenny-dry-run branch March 28, 2024 21:16
julienrbrt pushed a commit that referenced this pull request May 29, 2024
* run all dry runners before the we runners for the xgenny pkg

* add changelog

* Improve `xgenny` dry run

* replace the last wet runners

* create RunAndApply runner function

* remove unused parameters from scaffold functions and fix wrong path for scaffold chain

* run go mod tidy before go fmt

* bump buf build

* fix golden files for apps tests

* create the runner target path if not exist

* update go.mod

* fix lint issue

* fix doctor absolute path

* re-organize xgenny pkg

* fix lint warning

---------

Co-authored-by: Pantani <Pantani>
@Pantani Pantani added the backport/v28.x.y Backport to v28.x.y label Jul 2, 2024
mergify bot pushed a commit that referenced this pull request Jul 2, 2024
* run all dry runners before the we runners for the xgenny pkg

* add changelog

* Improve `xgenny` dry run

* replace the last wet runners

* create RunAndApply runner function

* remove unused parameters from scaffold functions and fix wrong path for scaffold chain

* run go mod tidy before go fmt

* bump buf build

* fix golden files for apps tests

* create the runner target path if not exist

* update go.mod

* fix lint issue

* fix doctor absolute path

* re-organize xgenny pkg

* fix lint warning

---------

Co-authored-by: Pantani <Pantani>
(cherry picked from commit 2ad41ee)

# Conflicts:
#	ignite/cmd/chain.go
#	ignite/cmd/scaffold.go
#	ignite/cmd/scaffold_chain.go
#	ignite/cmd/scaffold_configs.go
#	ignite/cmd/scaffold_message.go
#	ignite/cmd/scaffold_module.go
#	ignite/cmd/scaffold_packet.go
#	ignite/cmd/scaffold_params.go
#	ignite/cmd/scaffold_query.go
#	ignite/pkg/xgenny/run.go
#	ignite/services/chain/init.go
#	ignite/services/chain/proto.go
#	ignite/services/doctor/doctor.go
#	ignite/services/scaffolder/configs.go
#	ignite/services/scaffolder/init.go
#	ignite/services/scaffolder/message.go
#	ignite/services/scaffolder/module.go
#	ignite/services/scaffolder/packet.go
#	ignite/services/scaffolder/params.go
#	ignite/services/scaffolder/query.go
#	ignite/services/scaffolder/scaffolder.go
#	ignite/services/scaffolder/type.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/v28.x.y Backport to v28.x.y component:ci CI/CD workflow and automated jobs. component:cmd component:configs component:packages type:services Service-related issues.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: avoid scaffold changes if user canceled the command
2 participants