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

Pitaya moving to v2.x with some breaking changes #240

Closed
luizmiranda7 opened this issue Aug 19, 2021 · 6 comments
Closed

Pitaya moving to v2.x with some breaking changes #240

luizmiranda7 opened this issue Aug 19, 2021 · 6 comments
Milestone

Comments

@luizmiranda7
Copy link
Contributor

luizmiranda7 commented Aug 19, 2021

Summary

We're going to deprecate the current version of Pitaya Golang (aka V1) in favor of a new major version (aka V2), which brings a lot of incompatibilities regarding the code APIs. The current version is mainly composed of static APIs and shares some package-level states. The next version changes this to a more "instance-based" code API.

Here is a small example of what the new packages look like:

// V1
func startPitayaApplication() {
	// ...omitted setup code...
	defer pitaya.Shutdown()
	pitaya.Start()
}

// V2
func startPitayaApplication() {
	pitayaApp := pitaya.NewApp(
		// ...omitted configuration parameters...
	)
	
	defer pitayaApp.Shutdown()
	pitayaApp.Start()
}

Ecosystem libraries

Non-Golang libraries like libpitaya and libpitaya-cluster are not affected by this release since V2 is focused on the Golang framework usage and not changes on the Pitaya communication flow and protocol.

Golang libraries that depend on pitaya (like pitaya-bot and pitaya-cli) will be upgraded to use the V2 release.

Note: Since pitaya-admin is using an outdated version (~ 0.7), it will be moved to inactive so that it won’t be updated to this new major version.

V2 adoption

After being released, the V2 will become mainstream, and we recommend any new application to start with. The ones using V1 to start looking forward to updating (since the V1 will be deprecated). For those upgrading their applications, we’re going to offer a migration guide to help with.

The V1 code will still be hosted in the “v1” branch in the repository. Also, all v1-related tags will remain, with no changes.

V1 end of life

We will keep the V1 support after the V2 is released (more details below). However, after that period, the version will no longer receive any updates.

Here is the complete timeline of the V1 next steps:

Date Status Comments
2021-10-01 Deprecated Only security and performance fixes will be accepted. The package will be marked as “deprecated”, and V2 will be recommended.
2022-07-01 Inactive Only critical security fixes will be accepted.
2023-01-01 Read-only No more code changes will be accepted, and the “v1” branch will become read-only.

Note: During the “Deprecated” and “Inactive” periods, security fixes made to the mainstream will be ported to V1 (if applicable).

Issues and pull requests

All issues regarding V1 will need to be labeled. Then, a contributor member will review them to see if they will be accepted following the V1 status (Deprecated, Inactive, and Read-only).

@luizmiranda7 luizmiranda7 added this to the v2 milestone Aug 19, 2021
@luizmiranda7 luizmiranda7 pinned this issue Aug 19, 2021
@fourfire
Copy link

Please add more examples

@greatcat-taihe
Copy link

so can i upgrade to v2 now?

@henriqueoelze
Copy link
Contributor

@fourfire and @greatcat-taihe , we will write a migration guide in the future (probably at start of Q4) to help everyone during their migrations. Before that, you can continue on v1 or migrate by itself to use Pitaya v2, but we don't have examples and documentation to share yet.

It is important to mention that our latest release is a Pitaya v1 release, and all the Pitaya v2 are just pre-releases now.

@dulei5299
Copy link

Please add more examples,i love pitaya,it is so good!

@liangxudongsun
Copy link

Can I use version 2 now? thanks!

@ddk2222-luck
Copy link

Can I use version 2 now? thanks!

Yes, it is already possible, but if you want to be principled, you must introduce the V2 version of the package. Cannot be mixed with V1.

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

8 participants