shell-plugins icon indicating copy to clipboard operation
shell-plugins copied to clipboard

feat: Add plugin for prefect

Open avinash-santhanagopalan opened this issue 2 years ago • 6 comments

Overview

Adds a plugin for prefect cli

Type of change

  • [x] Created a new plugin
  • [ ] Improved an existing plugin
  • [ ] Fixed a bug in an existing plugin
  • [ ] Improved contributor utilities or experience

Related Issue(s)

  • Resolves: #
  • Relates: #

How To Test

Install prefect:

pip install prefect

Test the plugin:

op plugin init prefect      
####################################################################################
# WARNING: 'prefect' is not from the official registry.                            #
# Only proceed if you are the developer of 'prefect'.                              #
# Otherwise, delete the file at /Users/1password/.config/op/plugins/local/prefect. #
####################################################################################

Prefect [test build]
Authenticate with Prefect Access Key.

? Locate your Prefect Access Key: Search in 1Password...

? Locate your Prefect Access Key: <Prefect credentials>

? Configure when the chosen credential(s) will be used to authenticate: Prompt me for each new terminal session

The last step is to set up an alias for prefect.
You can do so by running the following command:

  echo "source /Users/1password/.config/op/plugins.sh" >> ~/.zshrc && source ~/.zshrc

Afterwards, run any prefect command to see it in action!
                                                                                                                                                   
29.395s 1password ❯ echo "source /Users/1password/.config/op/plugins.sh" >> ~/.zshrc && source ~/.zshrc
                                                                                                                                                  
154ms 1password ❯ prefect deployment ls
####################################################################################
# WARNING: 'prefect' is not from the official registry.                            #
# Only proceed if you are the developer of 'prefect'.                              #
# Otherwise, delete the file at /Users/1password/.config/op/plugins/local/prefect. #
####################################################################################
                                                   Deployments                                                    
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Name                                                                    ┃ ID                                   ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ The list of deployments
└─────────────────────────────────────────────────────────────────────────┴──────────────────────────────────────┘

Changelog

Authenticate Prefect using 1Password Shell Plugin

avinash-santhanagopalan avatar Jun 09 '23 15:06 avinash-santhanagopalan

@avinash-santhanagopalan There are some commits you should sign, otherwise this cannot be merged

AndyTitu avatar Jun 26 '23 11:06 AndyTitu

Ping me after TODOs around config file importing are removed, and all commits are signed. I think this PR would be getting close to the finish line, after those are resolved.

AndyTitu avatar Jun 26 '23 11:06 AndyTitu

@AndyTitu I've signed previous commits and removed the file importer portions. Let me know if there are further changes required.

avinash-santhanagopalan avatar Jun 26 '23 13:06 avinash-santhanagopalan

@avinash-santhanagopalan is there anything we can do to help move this forward?

AndyTitu avatar Aug 24 '23 07:08 AndyTitu

@avinash-santhanagopalan Let us know if there's anything that we can do to help move this forward!

hculea avatar Sep 19 '23 13:09 hculea

@hculea @AndyTitu Thank you for reaching out. I am not too familiar with Go test cases and I'm having some trouble getting them to pass. If you can help out that would be great!

avinash-santhanagopalan avatar Sep 19 '23 14:09 avinash-santhanagopalan