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

fm create version passing simplification #29

Open
rahul286 opened this issue Sep 11, 2023 · 4 comments
Open

fm create version passing simplification #29

rahul286 opened this issue Sep 11, 2023 · 4 comments

Comments

@rahul286
Copy link
Member

fm create erp --frappe-branch version-15-beta --apps erpnext:version-15-beta --apps hrms:version-15-beta

I think by default hrms, erpnext and other apps better be on same frappe branch version.

So when we use shorthand syntax:

fm create erp --frappe-branch version-15-beta --apps erpnext --apps hrms

version-15-beta should be implied for apps, as in the above example.

Can we further simplify by making apps comma separated?

fm create erp --frappe-branch version-15-beta --apps erpnext, hrms

A step ahead, we can also simplify version passing

fm create erp --version 15 --apps erpnext, hrms

or

fm create erp -v 15 --apps erpnext, hrms
@Xieyt
Copy link
Collaborator

Xieyt commented Sep 18, 2023

@rahul286 Since fm supports all the frappeverse apps, in the whole frappeverse apps only frappe,erpnext,hrms follows branch name convention like version-14 or version-15-beta. Other apps like helpdesk,insights doesn't follow this naming convention then how should fm handle this case ?

fm create erp --version 15 --apps erpnext, hrms

We can't implement this as bench get-app <app-name> works on the basis of branch names. Suppose we are defining the version 15 that will match with many branches and selecting one for installing might become a hard task, I think if user provides branch name will make more sense.

Screenshot 2023-09-18 at 8 44 19 PM

@rahul286
Copy link
Member Author

Can we have some kind of aliases?

For apps which support stable and dev releases

  1. by default latest stable version is installed.
  2. if --dev flag is passed, dev version is installed.

For apps which support only one, such flag can be ignored by printing warning and install latest.

Let me know if you see any issue. Please confirm before moving ahead.

@Xieyt
Copy link
Collaborator

Xieyt commented Sep 26, 2023

I can go ahead with this, I will create dictionary with hard corded values of apps with respective branch name and utilize that to get branch names when specific flag --stable or --dev will be passed.

For example:

stable = { 'frappe' : 'version-14', 'erpnext': 'version-14' ....  }
dev = { 'frappe' : 'develop', 'erpnext' : 'develop' ....}

But I am concerned about branches like `version-15-beta', which is neither develop nor stable.

I have another Idea like creating a stack system which will have good defaults like this

  1. erpstack-15 -> which will have frappe:version-15-beta, erpnext:version-15-beta, hrms:version-15-beta
  2. erpstack-14 -> which will have frappe:version-14, erpnext:version-14, hrms:version-14
  3. erpstack-dev -> which will have frappe:develop, erpnext:develop, hrms:develop

This stacks will be stored in a yaml/toml file. Using this file user can add custom stack that they frequently use if they want.

If user wants to add more apps or want to use other branch for specific stack app then they can use flag --apps <app>:<branch>, the apps given using flag will have more priority then defined in stack system.

For this system I can expose one flag like --install-stack <stackname> in the fm create command.

What do you think about this idea ?

@NagariaHussain
Copy link

NagariaHussain commented Dec 8, 2023

I have another Idea like creating a stack system which will have good defaults like this

  1. erpstack-15 -> which will have frappe:version-15-beta, erpnext:version-15-beta, hrms:version-15-beta
  2. erpstack-14 -> which will have frappe:version-14, erpnext:version-14, hrms:version-14
  3. erpstack-dev -> which will have frappe:develop, erpnext:develop, hrms:develop

This stacks will be stored in a yaml/toml file. Using this file user can add custom stack that they frequently use if they want.

If user wants to add more apps or want to use other branch for specific stack app then they can use flag --apps <app>:<branch>, the apps given using flag will have more priority then defined in stack system.

For this system I can expose one flag like --install-stack <stackname> in the fm create command.

IMO this is a very good idea! This will let users create and share stacks easily. For example, FrappeHR can have erpnext, hrms . Some "frappeverse" playground stack can have essentials like insights, gameplan, drive, etc. already defined.

I can see this becoming really useful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants