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

Experimental Features #91

Closed
wants to merge 6 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions text/0000-experimental-features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Meta
[meta]: #meta
- Name: Space and Process for Experimental Features
- Start Date: 2020-07-02
- Author(s): [@jkutner](https://github.com/jkutner)
- RFC Pull Request: (leave blank)
- CNB Pull Request: (leave blank)
- CNB Issue: (leave blank)
- Supersedes: N/A

# Summary
[summary]: #summary

This is a proposal for allowing experimental features to enter Pack and Lifecycle without requiring a specification, core team review, or RFC.

# Motivation
[motivation]: #motivation

End-users and early adopters of CNB have real problems that need to be solved by the CNB project. Sometimes these problems prevent them from adopting CNB in their organizations. Our RFC process, specification guidelines, and governance structure provide a strong mechanism through which we can enact change and solve problems; but sometimes it's too heavy and inhibits experimentation.

We need a way to introduce experiments before writing an RFC. Such a mechanism would allow us to deliver new capabilities faster, improve our means of collecting real end-user feedback, and improve the quality of our RFCs.
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't pack already have experimental features? I think the UX around pack experimental features could maybe use some improvement, but they do exist.


# What it is
[what-it-is]: #what-it-is

- *experimental feature* - any behavior or options that are likely to change before being added to the specification

This proposal affects buildpack users, platform implementors, and project contributors who want to introduce experimental features into Pack or Lifecycle. Today, any significant change that impacts end-users is introduced through an RFC, which requires a successful vote by the core team before being introduced into the specification (or the Pack platform).
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if this particular mechanism for enabling experimental features is better suited to pack than the lifecycle. Not all lifecycle features can or should be enabled with flags (think buildpack API features).

I am wondering if experimental API versions as proposed in #92 would better support this goal at the lifecycle level


We seek to change the current process such that experimental features do not require an RFC or specification. Instead, an experimental feature would only require approval by a simple majority of Platform Maintainers.

# How it Works
[how-it-works]: #how-it-works

Experimental features can be submitted as a PR or discussed in Github Issues on the relevant project. The team that maintains that project can decide whether or not to introduce the feature as long as it is behind an `--experimental` flag.

# Drawbacks
[drawbacks]: #drawbacks

- End users may become tied to features that eventually go away or significantly change

Copy link
Member

Choose a reason for hiding this comment

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

The big concern I have with this is creating a set of "hidden" APIs that people depend on if we do decide to take it away.

Copy link
Member

Choose a reason for hiding this comment

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

I agree. This seems like an unsustainable path of where we're having to constantly consider the ramification of making breaking changes to experimental features while developing mainstream features. After all, we're not exactly a stable project per se. Maybe once we achieve 1.0.0 is won't be as much of a concern.

# Alternatives
Copy link
Member

Choose a reason for hiding this comment

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

What about experimental features that use RFCs but just for the subteam?

Copy link
Member

Choose a reason for hiding this comment

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

Personally I think experimental features in the lifecycle should typically (but not always) have RFCs b/c of the lifecycle's place in the overall architecture. However I don't RFCs should be necessary (most of the time) for experimental pack features.

Copy link
Member

Choose a reason for hiding this comment

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

But generally I think we should trust the judgement of maintainers when deciding whether an RFC is a good idea for an experimental feature.

[alternatives]: #alternatives

## Plugins

A plugin system for Pack and/or Lifecycle would allow experimental features to be implemented completely outside of the CNB project. For example, a plugin could be installed to Pack with a command like:
Copy link
Member

Choose a reason for hiding this comment

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

@jkutner is this suggesting we support experimental 3rd party plugins, or do you envision a separate CNB owned repo where these experimental plugins could live?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yea, I was thinking 3rd party (where the most likely 3rd parties would be Salesforce, Paketo, etc). But not a CNB owned repo.

Copy link
Member

Choose a reason for hiding this comment

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

I think a plugin system would be great independent of this RFC.


```
$ pack install-plugin skele-gro
Copy link
Member

Choose a reason for hiding this comment

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

👍 to the HP reference 🧹

```

Then, a user can execute new commands provided by the plugin:

```
$ pack grow-bones
```

Or use new flags on existing commands:

```
$ pack build --with-bone-growth
```

Such a plugin mechanism would require a well defined plugin-interface, and versioning of that interface. This is a significantly larger project that the current proposal. However, the current proposal does not prevent a plugin system from being introduced later on.
Copy link
Member

Choose a reason for hiding this comment

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

This is definitely something to consider. Especially the work to maintain the integrity of the interface and how much effort we're willing to put into make sure we don't break the interface and any plugins.

Copy link
Member

Choose a reason for hiding this comment

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

I would mark plugins as out of scope.


# Prior Art
[prior-art]: #prior-art

- Rust's [Unstable features](https://doc.rust-lang.org/rustdoc/unstable-features.html)
Copy link
Member

Choose a reason for hiding this comment

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

FWIW, unstable features in rust (mostly) go through RFCs

- Java's [`-XX:+UnlockExperimentalVMOptions` flag](https://bugs.openjdk.java.net/browse/JDK-6618726)
- [oclif Plugins](https://oclif.io/docs/plugins)

# Unresolved Questions
[unresolved-questions]: #unresolved-questions

- How does an experimental features become a real feature (does it use the same flag/command minus the `--experimental` flag)?
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't it go through a RFC?

Copy link
Member Author

Choose a reason for hiding this comment

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

i guess i don't mean the process, but the mechanics. Like, do we need to enforce that they are the same flag?

Copy link
Member

Choose a reason for hiding this comment

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

Why would it need to be the same flag? If an experimental feature "graduates" it could have changes etc. from the feedback/things we learn.

Copy link
Member

@elbandito elbandito Sep 10, 2020

Choose a reason for hiding this comment

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

I wonder if we need an experimental flag? I don't know how golang supports external plugins, but I can envision the command just being added to the existing list of commands, and the user would use it as any other command. We could then mark experimental commands in the help menu or introduce an additional command to list all the experimental commands that have been installed (probably might want to do this anyway so users can quickly identify and remove any experimental commands).

Available Commands:
  build                     Generate app image from source code
 *grow-bones (experimental) Some custom experimental thingy
  rebase                    Rebase app image with latest run image
  inspect-image             Show information about a built image
  set-run-image-mirrors     Set mirrors to other repositories for a given run image
  set-default-builder       Set default builder used by other commands