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

Fastify v4 release coordination #3482

Closed
66 of 71 tasks
mcollina opened this issue Nov 24, 2021 · 50 comments
Closed
66 of 71 tasks

Fastify v4 release coordination #3482

mcollina opened this issue Nov 24, 2021 · 50 comments
Labels
discussion Issues or PRs with this label will never stale v4.x Issue or pr related to Fastify v4
Milestone

Comments

@mcollina
Copy link
Member

mcollina commented Nov 24, 2021

This is an issue to coordinate the release of Fastify v4. It will be updated as soon as it progresses.



Modules to update

Once one it's done add the PR link next to it.

@mcollina mcollina added the feature request New feature to be added label Nov 24, 2021
@mcollina mcollina pinned this issue Nov 24, 2021
@mcollina mcollina removed the feature request New feature to be added label Nov 24, 2021
@zekth
Copy link
Member

zekth commented Nov 24, 2021

Shouldn't we make a proper documentation review before landing v4? I know there were several corrections regarding phrasing / misleading sentences.

@climba03003 climba03003 added this to the v4.0.0 milestone Nov 24, 2021
@climba03003 climba03003 added the v4.x Issue or pr related to Fastify v4 label Nov 24, 2021
@mcollina
Copy link
Member Author

Shouldn't we make a proper documentation review before landing v4? I know there were several corrections regarding phrasing / misleading sentences.

I don't think it's feasible. We need to ship a v4 release to get on the latest Ajv and Pino bandwagon, otherwise we are keeping ourselves further behind. Moreover there are quite a few improvements sitting in the next branch. I would also like to phase out Node v10 support asap (and possibly v12).

@jsumners
Copy link
Member

Agreed that docs shouldn't block (despite the mess). Just drop 12 and below. Our release cycle is too slow to carry that forward.

@jsumners
Copy link
Member

[ ] prepare the list of modules to update

I think we decided to move to @fastify/. So the list is: all of them. Which means I need help with https://github.com/fastify/deprecate-modules

Here's the thing: I am surfing the edge of burnout. I'm doing what I can to stay in the game at work, but OSS in my free time is really hard right now (I suspect the same is true of several of us). There's a mountain of things I want to get done here, in Pino, ldapjs, and my personal projects, but I just can't spend so much time on it.

@mcollina
Copy link
Member Author

Thanks for the transparency @jsumners! I think a lot of us are in the same mindset at the minute.

@Fdawgs
Copy link
Member

Fdawgs commented Nov 24, 2021

+1 on dropping support for node 10 and 12. Can mass remove them from CI workflows etc. if/when needed (or hopefully just the composite action if that's in place beforehand).

@climba03003
Copy link
Member

Do anyone in @fastify/typescript have time to investigate on merging generic params for FastifyInstance and the others?
If nobody have time to do so, I think it should be left for the next main version.

@darkgl0w
Copy link
Member

I am +1 on dropping support for Node.js 10 and 12.

@Ethan-Arrowood
Copy link
Member

@climba03003 do you have something I can look at for

merging generic params for FastifyInstance

@climba03003
Copy link
Member

@climba03003 do you have something I can look at for

merging generic params for FastifyInstance

For example

fastify/fastify.d.ts

Lines 29 to 34 in 08877f1

declare function fastify<
Server extends http2.Http2SecureServer,
Request extends RawRequestDefaultExpression<Server> = RawRequestDefaultExpression<Server>,
Reply extends RawReplyDefaultExpression<Server> = RawReplyDefaultExpression<Server>,
Logger extends FastifyLoggerInstance = FastifyLoggerInstance
>(opts: FastifyHttp2SecureOptions<Server, Logger>): FastifyInstance<Server, Request, Reply, Logger> & PromiseLike<FastifyInstance<Server, Request, Reply, Logger>>

should be changed to

// name can be changed
interface CommonServerInterface {
  Server = unknown, 
  Request = unknown, 
  Reply = unknown, 
  Logger = unknown 
}

declare function fastify<CommonServerInterface>(opts: FastifyHttp2SecureOptions<CommonServerInterface>): FastifyInstance<CommonServerInterface> & PromiseLike<FastifyInstance<CommonServerInterface>>

I don't know if it is possible, but a single interface here provide better DX if user want to override Logger only.

@Ethan-Arrowood
Copy link
Member

Ahh yeah i've tried that once before and couldn't get it to work; maybe I'll try it again (but other folks should feel free to give it a shot + we don't have to block v4 for it)

@jsumners

This comment has been minimized.

@mcollina
Copy link
Member Author

I have successfully merged main into next. I will soon create a v3.x branch and move next to main.

@luisorbaiceta
Copy link
Member

Should we make a dedicated section with release notes in our homepage?

@jsumners
Copy link
Member

We leverage the GitHub releases feature to publish release notes.

@luisorbaiceta
Copy link
Member

I'm aware. But I feel like there's people that miss those and instead just rely on our website documentation.

The section wouldn't be something too extense, just the news about a new major version and a short description of the new features (and fixes?).

I see that there was a blog post planned too. We could also link it from the site.

@Fdawgs
Copy link
Member

Fdawgs commented Feb 18, 2022

Like the V3 migration guide but for V4?

@luisorbaiceta
Copy link
Member

luisorbaiceta commented Feb 18, 2022

Like the V3 migration guide but for V4?

That could be added too!

So apart from the github releases feature to publish release notes we could:

  • Make a short banner/section in our homepage to announce the release (this could include a link to the above mentioned blog post). This would be a short list with the key new improvements and a short description.
  • Migration guide doc page (Under a new migrations toc section maybe?)

Some examples:

image

image

image

image

@josh-hemphill
Copy link
Contributor

In #3083 there was some consensus about changing the default of jsonShorthand to be disabled in the next semver major.
Now that AJV support is externalized, I'm not sure if switching to AJV JTD by default could be considered, but it would provide automatic type inference on request objects and would be a lot more concise, which is what the whole jsonShorthand was meant to do in the first place. (Might need to also clarify, AJV can still export JSON Schema definitions based on JTD, so it wouldn't effect any OpenAPI exports etc.)

@climba03003
Copy link
Member

Not stale, it is in progress.

@stale stale bot removed the stale Issue or pr with more than 15 days of inactivity. label May 2, 2022
@climba03003 climba03003 added the discussion Issues or PRs with this label will never stale label May 2, 2022
@fastify fastify deleted a comment from stale bot May 2, 2022
@Fdawgs
Copy link
Member

Fdawgs commented May 2, 2022

Stalebot getting inpatient 😆

@mcollina
Copy link
Member Author

mcollina commented May 5, 2022

I have updated the table at the top adding the full list of modules. Let's start updating them all! If you have some time this is a great way to contribute.

@jsumners
Copy link
Member

jsumners commented May 5, 2022

These will be new major versions. Do not forget to update the name in the module metadata.

@Fdawgs
Copy link
Member

Fdawgs commented May 6, 2022

https://github.com/fastify/fastify-bankai is archived, so can be removed from the list.

@mcollina
Copy link
Member Author

Hey folks, I've covered most of the plugins in the list. I plan to have Fastify v4 released between now and OpenJS World in Austin.

@mcollina
Copy link
Member Author

Feel free to take a stab at the remaining ones.

@jsumners
Copy link
Member

Amazing work. I know how tedious that must've been.

@Retro64
Copy link

Retro64 commented May 16, 2022

Really looking forward for the 4.x release. Great work! @mcollina One question: Is fastify-plugin intentionally missing in the list "modules to update"?

@mcollina
Copy link
Member Author

It does not need an update.

@metcoder95
Copy link
Member

Hi! Made a couple of PRs for @fastify/caching and @fastify/elasticsearch, I'll try to open more during the day/week 🙂

@mcollina
Copy link
Member Author

I think we are almost ready to ship. I plan to issue a release after or during the Collaborator Summit in Austin.

@jsumners
Copy link
Member

The modules issue still has a few things that need to be resolved.

@mcollina
Copy link
Member Author

I'm happy to ship without those for now

@josh-hemphill
Copy link
Contributor

I commented a while back about changing defaults and doc examples to JTD by default instead of JSON Schema. Some of that lies with ajv-compiler, but the jsonShorthand default currently has to be disabled by the user to use JTD schemas with the ajv-compier, which isn't a great experience for new users who want to use JTD.
I saw there was mention of putting off some changes so that v4 can land with the dependency upgrades, so perhaps changing the default could be pushed to something like v4.1; someone using JSON Schema syntax may perceive it as a breaking API change, but it is only a single option that changes the schema interpretation in some specific cases, so perhaps it could be defended as a semver minor change if necessary.
Just want to make sure it doesn't get overlooked if it needs to be in v4.

@mcollina
Copy link
Member Author

I think we'll go with JSON Schema with the v4 line. I'd be happy to review a PR that documents JTD as an option.

@jsumners
Copy link
Member

I do not think JTD is a sufficiently widely adopted standard across languages to make it the default. JSON Schema enables interoperability among many different ecosystems.

@mweberxyz
Copy link
Contributor

mweberxyz commented May 24, 2022

Regarding "check if anything needs to be done to support pino transports & pino pretty deprecation" -- in my recent testing my application started throwing deprecation warnings like:

(node:56488) [PINODEP008] PinoWarning: prettyPrint is deprecated, look at https://github.com/pinojs/pino-pretty for alternatives.

As suggested here the deprecation warnings go away by changing my config from:
fastify({logger: { prettyPrint: true}})
to
fastify({logger: { transport: { target: 'pino-pretty' }}})

I am seeing no other problems with newest pino and pino-pretty otherwise. If this is the case, the only needed change would be a documentation update. I'd be happy to create a PR to update the logging documentation if no one has picked it up yet.

@mcollina
Copy link
Member Author

Go for it! Thanks!

@fastify fastify locked as resolved and limited conversation to collaborators Jun 10, 2022
@mcollina mcollina unpinned this issue Oct 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
discussion Issues or PRs with this label will never stale v4.x Issue or pr related to Fastify v4
Projects
None yet
Development

No branches or pull requests