Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Jul 2, 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.


This is an automatic backport of pull request #4001 done by Mergify.

* 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
@mergify mergify bot added the conflicts label Jul 2, 2024
@mergify mergify bot requested review from ilgooz, salmad3 and toschdev as code owners July 2, 2024 14:29
@mergify
Copy link
Contributor Author

mergify bot commented Jul 2, 2024

Cherry-pick of 2ad41ee has failed:

On branch mergify/bp/release/v28.x.y/pr-4001
Your branch is up to date with 'origin/release/v28.x.y'.

You are currently cherry-picking commit 2ad41ee3.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   changelog.md
	modified:   go.mod
	deleted:    ignite/cmd/scaffold_package.go
	new file:   ignite/pkg/xgenny/runner.go
	renamed:    ignite/pkg/xgenny/xgenny.go -> ignite/pkg/xgenny/walker.go
	renamed:    ignite/pkg/xgenny/xgenny_test.go -> ignite/pkg/xgenny/walker_test.go
	modified:   ignite/services/plugin/scaffold.go

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	both modified:   ignite/cmd/chain.go
	both modified:   ignite/cmd/scaffold.go
	both modified:   ignite/cmd/scaffold_chain.go
	deleted by us:   ignite/cmd/scaffold_configs.go
	both modified:   ignite/cmd/scaffold_message.go
	both modified:   ignite/cmd/scaffold_module.go
	both modified:   ignite/cmd/scaffold_packet.go
	deleted by us:   ignite/cmd/scaffold_params.go
	both modified:   ignite/cmd/scaffold_query.go
	deleted by them: ignite/pkg/xgenny/run.go
	both modified:   ignite/services/chain/init.go
	both modified:   ignite/services/chain/proto.go
	both modified:   ignite/services/doctor/doctor.go
	deleted by us:   ignite/services/scaffolder/configs.go
	both modified:   ignite/services/scaffolder/init.go
	both modified:   ignite/services/scaffolder/message.go
	both modified:   ignite/services/scaffolder/module.go
	both modified:   ignite/services/scaffolder/packet.go
	deleted by us:   ignite/services/scaffolder/params.go
	both modified:   ignite/services/scaffolder/query.go
	both modified:   ignite/services/scaffolder/scaffolder.go
	both modified:   ignite/services/scaffolder/type.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@github-actions github-actions bot added the component:docs Documentation additions or improvements. label Jul 2, 2024
@Pantani Pantani enabled auto-merge (squash) July 2, 2024 14:39
@github-actions
Copy link
Contributor

github-actions bot commented Jul 2, 2024

Visit the preview URL for this PR (updated for commit c312a37):

https://igntservices-docs--pr4234-mergify-bp-release-v-00v5xbcs.web.app

(expires Thu, 11 Jul 2024 14:22:57 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 95379efd94dd497aaa37c2d0354e6e2cafca5ec5

@Pantani Pantani self-assigned this Jul 3, 2024
* chore: bump buf build (#4002)

* bump buf build

* fix golden files for apps tests

* add changelog

---------

Co-authored-by: Pantani <Pantani>
(cherry picked from commit 5c9966d)

# Conflicts:
#	go.mod
#	go.sum

* fix merge conflicts

* fix changelog

---------

Co-authored-by: Danilo Pantani <danpantani@gmail.com>
@Pantani Pantani closed this Jul 4, 2024
auto-merge was automatically disabled July 4, 2024 12:03

Pull request was closed

@Pantani Pantani deleted the mergify/bp/release/v28.x.y/pr-4001 branch July 4, 2024 12:03
@Pantani Pantani restored the mergify/bp/release/v28.x.y/pr-4001 branch July 4, 2024 14:21
@Pantani Pantani reopened this Jul 4, 2024
@Pantani Pantani closed this Jul 4, 2024
@Pantani Pantani deleted the mergify/bp/release/v28.x.y/pr-4001 branch July 4, 2024 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:ci CI/CD workflow and automated jobs. component:cmd component:configs component:docs Documentation additions or improvements. component:packages component:templates conflicts type:services Service-related issues.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants