newrelic / nr1-catalog-manager

This project is used by New Relic to manage the collection of open source Nerdpacks that make up the New Relic One Catalog
Apache License 2.0
2 stars 4 forks source link

[3rd Party Apps] Assess the impacts of the new NR1 CLI on our apps #13

Closed jpvajda closed 2 years ago

jpvajda commented 2 years ago

in February 2022, we are releasing a new NR1-CLI... here is a summary:

Since we did the programmability initiative back in 2019, we've had two separate CLIs working together: the private one, also called "the first-party CLI"- consumed via nr1-package (but also via nr1-create-package and nr1-dredd), and the public one, -also called "the third-party CLI"- which was a single executable that can be installed through standard OS mechanisms. This has led to a point where features were missing either on one of the two or they have been manually ported and adapted. This is time consuming, error prone and does not scale well under the programmability philosophy, which is to consider third-party a strict subset of first-party.

To mitigate this, we decided back at the end of Q1 that we had to simplify the overall setup. We started porting every single feature we had for first-party onto the third-party CLI and calling it "the unified CLI". First-party-only features are consumed in the unified CLI via private hooks that are only part of the executable when we build the internal first-party CLI.

References

Acceptance Criteria

Questions

click to expand 👇

- [ ] Can we leverage [storybook](https://storybook.js.org/) for our component docs on the developer site? > It could be used, but we'd have to do the work to use story book, it's not something the core team will be doing for the SDK components. See comment for more context. - [ ] Do 3rd party apps have to migrate to the new NR1 CLI, if they don't is the old CLI still supported? > No migration to the new CLI is only required for 1st party apps. - [ ] How do auto-updates work exactly, and what type of downstream impacts are there on 3rd party apps? > Old versions of the CLI try to update each 14 days, new versions try to update each day. This is a feature that existed since day one and should not have any impact, more than getting bugfixes or new features with backwards compatibility. - [ ] This new CLI supports react hooks! That's a huge deal for 3rd party apps, can they leverage this functionality? > when hooks are released it will be a platform level change for New Relic, and developers of New Relics applications shouldn’t have to take any actions to start using hooks in your apps. if they want to use React hooks when they are released they'll need to upgrade the package.json to `react@16.8` or higher - [ ] how will the new linter / prettification features impact 3rd party developers? > No impact. Linting and prettification is only enforced for 1st party. Customers can use whatever linting/prettification tooling they want. - [ ] Can 3rd party apps use Jest? > They can use any testing framework they want. They just need to install it and set it up and most probably mock the nr1 object. - [ ] Does the migration Guide apply to 3rd party apps, if so how? > No it doesn't. 3rd party apps don't need to be migrated like 1st party apps do.
jpvajda commented 2 years ago

I'm currently working on this..

jpvajda commented 2 years ago

I followed up with the core team as I didn't hear back...

vieron commented 2 years ago

Can we leverage storybook for our component docs on the developer site?

Not sure I've the context, but the storybook support we have added to the CLI is just for 1st party nerdpacks, if you're referring to One Core components, they are part of platform-ui which is not a nerdpack. Not sure if you want to build a storybook to document components by your own, or if you want the One Core team to document their existing components in Storybook.

How do auto-updates work exactly, and what type of downstream impacts are there on 3rd party apps?

Old versions of the CLI try to update each 14 days, new versions try to update each day. This is a feature that existed since day one and should not have any impact, more than getting bugfixes or new features with backwards compatibility.

how will the new linter / prettification features impact 3rd party developers?

No impact. Linting and prettification is only enforced for 1st party. Customers can use whatever linting/prettification tooling they want.

Can 3rd party apps use Jest?

They can use any testing framework they want. They just need to install it and set it up and most probably mock the nr1 object.

jpvajda commented 2 years ago

@vieron this is super helpful, thanks again for you assistance here!