Skip to content

Commit

Permalink
Merge pull request #571 from meroxa/remove-ruby-feature-flag
Browse files Browse the repository at this point in the history
Remove ruby feature flag
  • Loading branch information
dianadoherty authored Jan 24, 2023
2 parents 7da436b + 226f819 commit d988bbc
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 38 deletions.
3 changes: 0 additions & 3 deletions cmd/meroxa/root/apps/apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ func getTurbineCLIFromLanguage(logger log.Logger, lang, path string) (turbine.CL
case "py", turbine.Python3, turbine.Python:
return turbinePY.New(logger, path), nil
case "rb", turbine.Ruby:
if !builder.CheckFeatureFlag(turbineRb.TurbineRubyFeatureFlag) {
return nil, turbineRb.ErrTurbineRubyFeatureFlag
}
return turbineRb.New(logger, path), nil
}
return nil, fmt.Errorf("language %q not supported. %s", lang, LanguageNotSupportedError)
Expand Down
3 changes: 0 additions & 3 deletions cmd/meroxa/root/apps/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,6 @@ func newTurbineCLI(logger log.Logger, lang, path string) (turbine.CLI, error) {
case "py", turbine.Python3, turbine.Python:
return turbinePY.New(logger, path), nil
case "rb", turbine.Ruby:
if !builder.CheckFeatureFlag(turbineRb.TurbineRubyFeatureFlag) {
return nil, turbineRb.ErrTurbineRubyFeatureFlag
}
return turbineRb.New(logger, path), nil
default:
return nil, fmt.Errorf("language %q not supported. %s", lang, LanguageNotSupportedError)
Expand Down
3 changes: 0 additions & 3 deletions cmd/meroxa/root/apps/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@ func (r *Run) Execute(ctx context.Context) error {
}
return r.turbineCLI.Run(ctx)
case "rb", turbine.Ruby:
if !builder.CheckFeatureFlag(turbineRB.TurbineRubyFeatureFlag) {
return turbineRB.ErrTurbineRubyFeatureFlag
}
if r.turbineCLI == nil {
r.turbineCLI = turbineRB.New(r.logger, r.path)
}
Expand Down
17 changes: 0 additions & 17 deletions cmd/meroxa/root/apps/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,24 +94,7 @@ func TestRunExecute(t *testing.T) {
Name: "ruby-test",
Language: turbine.Ruby,
},
features: map[string]bool{
"ruby_implementation": true,
},
},
{
desc: "Execute Ruby Run (Missing feature)",
cli: mockturbinecli.NewMockCLI(mockCtrl),
config: turbine.AppConfig{
Name: "ruby-test",
Language: turbine.Ruby,
},
features: map[string]bool{
"ruby_implementation": false,
},
err: fmt.Errorf(`no access to the Meroxa Turbine Ruby feature.
Sign up for the Beta here: https://share.hsforms.com/1Uq6UYoL8Q6eV5QzSiyIQkAc2sme`),
},

{
desc: "Execute Python Run with an error",
cli: func() turbine.CLI {
Expand Down
6 changes: 1 addition & 5 deletions cmd/meroxa/root/apps/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ func (u *Upgrade) Flags() []builder.Flag {
return builder.BuildFlags(&u.flags)
}

//nolint:gocyclo
func (u *Upgrade) Execute(ctx context.Context) error {
var err error
if u.config == nil {
Expand Down Expand Up @@ -104,10 +103,7 @@ func (u *Upgrade) Execute(ctx context.Context) error {
if u.turbineCLI == nil {
u.turbineCLI = turbinePY.New(u.logger, u.path)
}
case "ub", turbine.Ruby:
if !builder.CheckFeatureFlag(turbineRB.TurbineRubyFeatureFlag) {
return turbineRB.ErrTurbineRubyFeatureFlag
}
case "rb", turbine.Ruby:
if u.turbineCLI == nil {
u.turbineCLI = turbineRB.New(u.logger, u.path)
}
Expand Down
7 changes: 0 additions & 7 deletions cmd/meroxa/turbine/ruby/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ package turbinerb

import (
"context"
"fmt"

"github.com/meroxa/cli/cmd/meroxa/turbine"
"github.com/meroxa/cli/log"
Expand All @@ -13,12 +12,6 @@ import (
"google.golang.org/grpc"
)

var (
TurbineRubyFeatureFlag = "ruby_implementation"
ErrTurbineRubyFeatureFlag = fmt.Errorf(`no access to the Meroxa Turbine Ruby feature.
Sign up for the Beta here: https://share.hsforms.com/1Uq6UYoL8Q6eV5QzSiyIQkAc2sme`)
)

type turbineServer interface {
Run(context.Context)
GracefulStop()
Expand Down

0 comments on commit d988bbc

Please sign in to comment.