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

Unhide environment flags #238

Merged
merged 7 commits into from
Jan 19, 2022
Merged

Unhide environment flags #238

merged 7 commits into from
Jan 19, 2022

Conversation

janelletavares
Copy link
Contributor

@janelletavares janelletavares commented Jan 12, 2022

Description of change

Ensure all customers can see the environment commands & flags
Ensure that customers who do not have permissions to use the flags get a message with a link to sign up for beta https://share.hsforms.com/1Uq6UYoL8Q6eV5QzSiyIQkAc2sme

Fixes #237

Type of change

  • New feature
  • Bug fix
  • Refactor
  • Documentation

How was this tested?

  • Unit Tests
  • Tested in staging

Demo

Before this pull-request

$ m --help
The Meroxa CLI allows quick and easy access to the Meroxa Data Platform.

Using the CLI you are able to create and manage sophisticated data pipelines
with only a few simple commands. You can get started by listing the supported
resource types:

meroxa resources list --types

Usage:
meroxa [command]

Available Commands:
api Invoke Meroxa API
auth Authentication commands for Meroxa
billing Open your billing page in a web browser
completion Generate completion script
config Manage your Meroxa CLI configuration
connect Connect two resources together
connectors Manage connectors on Meroxa
endpoints Manage endpoints on Meroxa
help Help about any command
login Login or Sign up to the Meroxa Platform
logout Clears local login credentials of the Meroxa Platform
open Open in a web browser
pipelines Manage pipelines on Meroxa
resources Manage resources on Meroxa
transforms Manage transforms on Meroxa
version Display the Meroxa CLI version
whoami Display the current logged in user

Flags:
--cli-config-file string meroxa configuration file
--debug display any debugging information
-h, --help help for meroxa
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s)

Use "meroxa [command] --help" for more information about a command.

$ m pipeline create --help
Create a pipeline

Usage:
meroxa pipelines create NAME [flags]

Flags:
-h, --help help for create
-m, --metadata string pipeline metadata

Global Flags:
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s)

$ m resource create --help
Use the create command to add resources to your Meroxa resource catalog.

Usage:
meroxa resources create [NAME] --type TYPE --url URL [flags]

Aliases:
create, add

Examples:

meroxa resources create store --type postgres -u $DATABASE_URL --metadata '{"logical_replication":true}'
meroxa resources create datalake --type s3 -u "s3://$AWS_ACCESS_KEY_ID:$AWS_ACCESS_KEY_SECRET@us-east-1/meroxa-demos"
meroxa resources create warehouse --type redshift -u $REDSHIFT_URL
meroxa resources create slack --type url -u $WEBHOOK_URL

Flags:
--ca-cert string trusted certificates for verifying resource
--client-cert string client certificate for authenticating to the resource
--client-key string client private key for authenticating to the resource
-h, --help help for create
-m, --metadata string resource metadata
--password string password
--ssh-private-key string SSH tunneling private key
--ssh-url string SSH tunneling address
--ssl use SSL
--type string resource type (required)
-u, --url string resource url (required)
--username string username

Global Flags:
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s)

$ m pipeline create test-pipeline --env jan12
Creating pipeline "test-pipeline" in "jan12" environment...
Error: user lacks permission for environment operation

$ m resource create source --type mongodb -u mongodb+srv://userIsEjprKh:[email protected]/meroxa --env jan12
Creating "mongodb" resource in "jan12" environment...
Error: user lacks permission for environment operation

After this pull-request

$ m --help
The Meroxa CLI allows quick and easy access to the Meroxa Data Platform.

Using the CLI you are able to create and manage sophisticated data pipelines
with only a few simple commands. You can get started by listing the supported
resource types:

meroxa resources list --types

Usage:
meroxa [command]

Available Commands:
api Invoke Meroxa API
auth Authentication commands for Meroxa
billing Open your billing page in a web browser
completion Generate completion script
config Manage your Meroxa CLI configuration
connect Connect two resources together
connectors Manage connectors on Meroxa
endpoints Manage endpoints on Meroxa
** environments Manage environments on Meroxa**
help Help about any command
login Login or Sign up to the Meroxa Platform
logout Clears local login credentials of the Meroxa Platform
open Open in a web browser
pipelines Manage pipelines on Meroxa
resources Manage resources on Meroxa
transforms Manage transforms on Meroxa
version Display the Meroxa CLI version
whoami Display the current logged in user

Flags:
--cli-config-file string meroxa configuration file
--debug display any debugging information
-h, --help help for meroxa
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s)

Use "meroxa [command] --help" for more information about a command.

$ m pipelines create --help
Create a pipeline

Usage:
meroxa pipelines create NAME [flags]

Flags:
** --env string environment (name or UUID) where pipeline will be created**
-h, --help help for create
-m, --metadata string pipeline metadata

Global Flags:
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s)

$ m resource create --help
Use the create command to add resources to your Meroxa resource catalog.

Usage:
meroxa resources create [NAME] --type TYPE --url URL [flags]

Aliases:
create, add

Examples:

meroxa resources create store --type postgres -u $DATABASE_URL --metadata '{"logical_replication":true}'
meroxa resources create datalake --type s3 -u "s3://$AWS_ACCESS_KEY_ID:$AWS_ACCESS_KEY_SECRET@us-east-1/meroxa-demos"
meroxa resources create warehouse --type redshift -u $REDSHIFT_URL
meroxa resources create slack --type url -u $WEBHOOK_URL

Flags:
--ca-cert string trusted certificates for verifying resource
--client-cert string client certificate for authenticating to the resource
--client-key string client private key for authenticating to the resource
** --env string environment (name or UUID) where resource will be created**
-h, --help help for create
-m, --metadata string resource metadata
--password string password
--ssh-private-key string SSH tunneling private key
--ssh-url string SSH tunneling address
--ssl use SSL
--type string resource type (required)
-u, --url string resource url (required)
--username string username

Global Flags:
--cli-config-file string meroxa configuration file
--debug display any debugging information
--json output json
--timeout duration set the duration of the client timeout in seconds (default 10s)

$ m pipeline create test-pipeline --env jan12
Error: no access to the Meroxa self-hosted environments feature.
Sign up for the Beta here: https://share.hsforms.com/1Uq6UYoL8Q6eV5QzSiyIQkAc2sme

$ m resource create source --type mongodb -u mongodb+srv://userIsEjprKh:[email protected]/meroxa --env jan12
Error: no access to the Meroxa self-hosted environments feature.
Sign up for the Beta here: https://share.hsforms.com/1Uq6UYoL8Q6eV5QzSiyIQkAc2sme

Additional references

Any additional links (if appropriate)

Documentation updated

Make sure that our documentation is accordingly updated when necessary.

You can do that by opening a pull-request to our (🔒 private, for now) repository: https://github.com/meroxa/meroxa-docs.

✨ In the future, there will be a GitHub action taking care of these updates automatically. ✨

Provide PR link:

@janelletavares
Copy link
Contributor Author

tests are not failing locally... I don't know how to fix the automation at the moment

Copy link
Member

@raulb raulb left a comment

Choose a reason for hiding this comment

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

@janelletavares made a first pass to this pull-request. Let know what you think?

cmd/meroxa/root/pipelines/create_test.go Outdated Show resolved Hide resolved

gotError := err.Error()
wantError := `no access to the Meroxa self-hosted environments feature.
Sign up for the Beta here: https://share.hsforms.com/1Uq6UYoL8Q6eV5QzSiyIQkAc2sme`
Copy link
Member

Choose a reason for hiding this comment

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

Unrelated to this PR, but I wonder if we could use a URL shortener and looked more "meroxa". I believe it's actually possible to have even an URL shortener using our own domain. Not 100% sure though.

cmd/meroxa/root/resources/create.go Show resolved Hide resolved
cmd/meroxa/builder/builder.go Outdated Show resolved Hide resolved
cmd/meroxa/builder/builder.go Show resolved Hide resolved
cmd/meroxa/root/resources/create_test.go Outdated Show resolved Hide resolved
janelletavares added 2 commits January 16, 2022 09:07
remove unnecessary attribute assignments
cmd/meroxa/builder/builder.go Outdated Show resolved Hide resolved
@janelletavares janelletavares merged commit ede7bfa into master Jan 19, 2022
@janelletavares janelletavares deleted the hidden_env_flags branch January 19, 2022 16:38
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.

[Stage 2: CLI] Show environment flags for everyone
4 participants