Skip to content

Add plugin for Treasure Data Toolbelt - #176

Merged
SimonBarendse merged 9 commits into
1Password:mainfrom
Lewuathe:treasure-data-plugin
Mar 22, 2023
Merged

SimonBarendse merged 9 commits into
1Password:mainfrom
Lewuathe:treasure-data-plugin

Conversation

@Lewuathe

Copy link
Copy Markdown
Contributor

Summary

Add support for a new plugin for the TreasureData Toolbelt

Testing

Setup

  1. Create a TreasureData account through the site here.
  2. Get the API key for CLI tools according to the guide.
  3. Following the guide, setup the Treasure Data Toolbelt in your environment
  4. Build and test the TreasureData plugin locally according to these instructions.
$ make treasuredata/validate
$ make treasuredata/build

Importer

After installing and setting up Treasure Data Toolbelt, a config file should have been created at ~/.td/td.conf.
Initialize the Treasure Data plugin and test the importer using this config file. The credentials should be saved in 1Password successfully by selecting this config file. The entry should have user and api key fields.

Provisioner

After initializing the Treasure Data plugin and having your Treasure Data credentials saved in 1Password, run a td command. The provisioner should inject TD_API_KEY environment so that the tool can refer to the necessary credential at runtime.
Try running the following command.

$ td db:list
+---------------------+----------+
| Name                | Count    |
+---------------------+----------+
| sample_datasets     | 0        |
+---------------------+----------+

Note: While testing the provisioner, ensure that your credentials are not currently stored in ~/.td/td.conf nor environment variables.

@AndyTitu

Copy link
Copy Markdown
Contributor

Thanks for the contribution @Lewuathe !

Code lgtm but static check is failing due to unformatted files.

@Lewuathe

Copy link
Copy Markdown
Contributor Author

@AndyTitu Thank you for letting me know. I fixed the format. Could you please take a look at this one again?

@hculea hculea left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for this contribution! ❤️ I've left a few comments that we should address before merging.

Comment thread plugins/treasuredata/access_key.go Resolved
Comment thread plugins/treasuredata/access_key.go Resolved
Comment thread plugins/treasuredata/access_key.go Resolved
Comment thread plugins/treasuredata/access_key.go Resolved

@Lewuathe Lewuathe left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@hculea Thanks for the review. I updated the plugin accordingly.

@Lewuathe
Lewuathe requested review from hculea and removed request for AndyTitu February 17, 2023 07:06

@Lewuathe Lewuathe left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@AndyTitu @hculea Sorry for bothering you but could you take a look at the change after the last review and please give me the feedback if there is something.

@hculea

hculea commented Feb 27, 2023

Copy link
Copy Markdown
Member

Terribly sorry for the long turnaround! Only one other comment on an older thread, otherwise, this looks good to go! Thank you for your contribution!!

@SimonBarendse SimonBarendse left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for the contribution @Lewuathe! Welcome Treasure Data to the ecosystem! ❤️

I think I've found a small typo, and there's one last thing where I think we're good, but I'd like to confirm with a teammate who knows more about that area.

Comment thread plugins/treasuredata/access_key.go Resolved
Comment thread plugins/treasuredata/td.go Resolved
SimonBarendse
SimonBarendse previously approved these changes Mar 3, 2023

@Lewuathe Lewuathe left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review!

But I see the lint error in CI.

https://github.com/1Password/shell-plugins/actions/runs/4323502899/jobs/7547182221

I could not reproduce the issue on my machine with the following version. Is there anything wrong with the format?

$ golangci-lint run

$ golangci-lint --version
golangci-lint has version 1.51.2 built from 3e8facb on 2023-02-19T20:54:52Z
@SimonBarendse

Copy link
Copy Markdown
Member

Hi @Lewuathe, since Friday lint jobs started to fail across this repo, and even in other repos on GitHub Actions as well. So it appears to be independent of the changes introduced in this pull request. We're looking into the issue #195

@florisvdg florisvdg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good! Left a few small comments below.

Comment thread plugins/treasuredata/access_key.go Resolved
Comment thread plugins/treasuredata/access_key.go Resolved
Comment thread plugins/treasuredata/access_key.go Resolved
Co-authored-by: Floris van der Grinten <floris@grinten.com>
Lewuathe and others added 2 commits March 7, 2023 09:39
Co-authored-by: Floris van der Grinten <floris@grinten.com>
@Lewuathe
Lewuathe requested review from SimonBarendse and florisvdg and removed request for SimonBarendse, florisvdg and hculea March 8, 2023 02:15
@Lewuathe
Lewuathe requested review from florisvdg and hculea and removed request for SimonBarendse and hculea March 8, 2023 02:15
@Lewuathe
Lewuathe requested review from SimonBarendse, florisvdg and hculea and removed request for SimonBarendse and florisvdg March 9, 2023 03:15

@SimonBarendse SimonBarendse left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for the contribution @Lewuathe! ❤️ And welcome to the ecosystem Treasure Data 🎉

@Lewuathe Lewuathe left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@SimonBarendse @hculea Thanks for the tailored review!

@Lewuathe Lewuathe left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@florisvdg @SimonBarendse Is there any specific reason not to merge this PR even after it's approved? Is there something I can do?

@SimonBarendse

Copy link
Copy Markdown
Member

Apologies for the delay, this can indeed be merged. Once merged it will go live in the next 1Password CLI release.

@SimonBarendse
SimonBarendse merged commit 02673a8 into 1Password:main Mar 22, 2023
@Lewuathe
Lewuathe deleted the treasure-data-plugin branch March 23, 2023 00:56
@Lewuathe

Copy link
Copy Markdown
Contributor Author

@SimonBarendse Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants