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

ci: Add Nsolid runtime to CI and Integration tests #5332

Merged
merged 3 commits into from Mar 5, 2024

Conversation

riosje
Copy link
Contributor

@riosje riosje commented Feb 27, 2024

Propose N|Solid adoption

This pull request proposes the adoption of the N|Solid runtime, a fully compatible Node.js runtime developed by NodeSource.

Implementation

Details of the implementation:

  • I have ensured that all existing tests pass when the Fastify server is running on the N|Solid runtime.
  • Necessary adjustments have been made to CI and Integration pipelines to accommodate the new runtime and possible new upcoming runtimes..

Thank you for considering this addition to the Fastify project.

Checklist

.github/workflows/ci.yml Outdated Show resolved Hide resolved
@Fdawgs Fdawgs changed the title chore: Add Nsolid runtime to CI and Integration tests ci Add Nsolid runtime to CI and Integration tests Feb 27, 2024
@Fdawgs Fdawgs changed the title ci Add Nsolid runtime to CI and Integration tests ci: Add Nsolid runtime to CI and Integration tests Feb 27, 2024
@mcollina
Copy link
Member

Can you please amend the LTS document accordingly?

@riosje riosje force-pushed the proposeNsolidRuntime branch 2 times, most recently from 29f5fbc to 41f169b Compare February 27, 2024 22:03
@riosje
Copy link
Contributor Author

riosje commented Feb 27, 2024

Can you please amend the LTS document accordingly?

Hi @mcollina, thanks for taking a look to this proposal.
I've Updated the LTS document as requested, I'm not 100% sure if it has the expected format, I just tried to make it fit.

@riosje riosje force-pushed the proposeNsolidRuntime branch 2 times, most recently from 0a71840 to 1856de2 Compare February 27, 2024 22:19
@mcollina
Copy link
Member

@RafaelGSS are you ok in supporting this change in case there are issues? I don't expect there will be but better safe than sorry.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
@RafaelGSS
Copy link
Member

@RafaelGSS are you ok in supporting this change in case there are issues? I don't expect there will be but better safe than sorry.

Yes, happy to support it.

@climba03003
Copy link
Member

If we add some runtime guarantee that is not node, the question would be why we need to against the support of deno or bun?

If N|Solid is bundling Node.js, why it need to be tested seperately?

@gurgunday
Copy link
Member

If we add some runtime guarantee that is not node, the question would be why we need to against the support of deno or bun?

If N|Solid is bundling Node.js, why it need to be tested seperately?

I'd +1 the question, because it's a valid concern

@mcollina
Copy link
Member

If we add some runtime guarantee that is not node, the question would be why we need to against the support of deno or bun?

My generic take on this is that we can support them if our tests run unmodified.

Copy link
Member

@jsumners jsumners left a comment

Choose a reason for hiding this comment

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

I am not opposed to adding the extra runtime check (though I do wonder why this particular one is necessary given it is a direct rebuild of core). My only concern is regarding the implementation. This PR introduces a lot of complicated configuration to appease the fact that the runtime doesn't support all of the core versions we currently support. I'd rather see a completely separate "alternative runtimes" set of workflows added. Or maybe make the jobs reusable and define new matrix strategies utilizing them.

Copy link
Member

@Eomm Eomm left a comment

Choose a reason for hiding this comment

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

My generic take on this is that we can support them if our tests run unmodified.

We should write it down somewhere in case.

Anyway my idea is:

do we block a PR if the NSolid CI does not work?

Assuming the answer is "no" I would move this run by:

  1. set it as optional by setting continue-on-error

Or:

  1. I would move it to a separate workflow
  2. I would run the workflow on merge on main (as we do for the package managers: https://github.com/fastify/fastify/blob/main/.github/workflows/package-manager-ci.yml)
  3. (idea/suggestion) Add a notification to someone (maybe by opening an issue here or elsewhere)

@RafaelGSS
Copy link
Member

My generic take on this is that we can support them if our tests run unmodified.

We should write it down somewhere in case.

Anyway my idea is:

do we block a PR if the NSolid CI does not work?

Assuming the answer is "no" I would move this run by:

  1. set it as optional by setting continue-on-error

Or:

  1. I would move it to a separate workflow
  2. I would run the workflow on merge on main (as we do for the package managers: https://github.com/fastify/fastify/blob/main/.github/workflows/package-manager-ci.yml)
  3. (idea/suggestion) Add a notification to someone (maybe by opening an issue here or elsewhere)

I think creating a new workflow with continue-on-error should be the most appropriate as it won't require any change in the current setup and any errors in nsolid CI can be easily mitigated by us (nodesource).

@riosje
Copy link
Contributor Author

riosje commented Feb 28, 2024

I think creating a new workflow with continue-on-error should be the most appropriate as it won't require any change in the current setup and any errors in nsolid CI can be easily mitigated by us (nodesource).

Hi @RafaelGSS what you think if we use the same workflow and put the continue-on-erroronly for nsolid, or any other runtime if it is explicitly set.

something like this:

    continue-on-error: ${{ matrix.continue-on-error || false }}
    strategy:
      matrix:
        runtime: [node, nsolid]
        node-version: [14, 16, 18, 20]
        os: [macos-latest, ubuntu-latest, windows-latest]
        include:
          - runtime: nsolid
            nsolid-version: 5
            continue-on-error: true
        exclude:
        # excludes node 14 on Windows
          - os: windows-latest
            runtime: node
            node-version: 14
        # Nsolid 5 does not support Node.js 14, 16
          - runtime: nsolid
            node-version: 14
          - runtime: nsolid
            node-version: 16

I am not opposed to adding the extra runtime check (though I do wonder why this particular one is necessary given it is a direct rebuild of core). My only concern is regarding the implementation. This PR introduces a lot of complicated configuration to appease the fact that the runtime doesn't support all of the core versions we currently support. I'd rather see a completely separate "alternative runtimes" set of workflows added. Or maybe make the jobs reusable and define new matrix strategies utilizing them.

hi @jsumners, thanks for joining to the discussion, I really appreciate it.
I understand you think the PR introduces a lot of complicated configuration because of the exclusions added for Node14 and Node16, is that right?
N|solid has been releasing versions since Node4(argon) and I can adjust the pipeline to run with N|solid4(Node 14 - Node16) so we can remove those exclusions making it 'compatible' with the supported core version.

Copy link
Member

@RafaelGSS RafaelGSS left a comment

Choose a reason for hiding this comment

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

We only need the test job for nsolid runtime. Lint, coverage are already covered by the original ci.yml

.github/workflows/ci-nsolid.yml Outdated Show resolved Hide resolved
.github/workflows/ci-nsolid.yml Outdated Show resolved Hide resolved
.github/workflows/ci-nsolid.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
Signed-off-by: Jefferson <jefferson.rios.caro@gmail.com>

ci: Add Nsolid CI and Integration tests as separate pipelines
@jsumners
Copy link
Member

I'd rather see a separate workflow that is dedicated to alternative runtimes.

Signed-off-by: Jefferson <jefferson.rios.caro@gmail.com>

ci: Add new CI as alternative Runtimes
@riosje
Copy link
Contributor Author

riosje commented Feb 29, 2024

I'd rather see a separate workflow that is dedicated to alternative runtimes.

It makes sense, the current approach is capable to receive new runtime contributions just adding the necessary includes/excludes in the matrix config and the conditional step to setup the proposed runtime.

docs/Reference/LTS.md Outdated Show resolved Hide resolved
Signed-off-by: Jefferson <jefferson.rios.caro@gmail.com>
@RafaelGSS RafaelGSS merged commit e58046e into fastify:main Mar 5, 2024
39 checks passed
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

Successfully merging this pull request may close these issues.

None yet

7 participants