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

Add framework for remote claims storage plugins #699

Merged
merged 4 commits into from Oct 14, 2019

Conversation

carolynvs
Copy link
Member

What does this change

For now this just returns a filesystem claims store but later we can use this to return stores that are backed by plugins.

What issue does it fix

Closes # (issue)

Notes for the reviewer

Put any questions or notes for the reviewer here.

Checklist

  • Unit Tests
  • Documentation
    • Documentation Not Impacted

@carolynvs carolynvs force-pushed the remote-claims branch 4 times, most recently from 887de64 to 39d3887 Compare October 10, 2019 00:24
@carolynvs carolynvs added this to In Progress in Porter and Mixins [OLD] via automation Oct 11, 2019
@carolynvs
Copy link
Member Author

/azp run

@carolynvs carolynvs marked this pull request as ready for review October 11, 2019 18:07
@azure-pipelines
Copy link

Pull request contains merge conflicts.

@carolynvs carolynvs changed the title Add InstanceStorageProvider interface Add framework for remote claims storage plugins Oct 11, 2019
@carolynvs
Copy link
Member Author

Oops rebasing...

For now this just returns a filesystem claims store but later we can use
this to return stores that are backed by plugins.
@carolynvs
Copy link
Member Author

carolynvs commented Oct 11, 2019

Oops, I need to do more work to make the integration tests work when they call porter for internal plugins. BRB rethinking my life choices 💨

Copy link
Member

@vdice vdice left a comment

Choose a reason for hiding this comment

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

Great work on this one! Sounds like there may be some further changes per #699 (comment) but all is looking good to me.


var _ plugin.Plugin = &Plugin{}

// P
Copy link
Member

Choose a reason for hiding this comment

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

Prelude to a full description/comment? 😜

Copy link
Member Author

Choose a reason for hiding this comment

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

😅

"github.com/deislabs/porter/pkg/plugins"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-plugin"
_ "github.com/hashicorp/go-plugin"
Copy link
Member

Choose a reason for hiding this comment

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

Q: What does this import do?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops, this was when I was first working with the lib, it's not needed anymore. I'll remove it.

if err != nil {
return nil, nil, errors.Wrap(err, "could not determine the plugins directory path")
}
pluginsDir := filepath.Join(home, "plugins") // TODO: move to config
Copy link
Member

Choose a reason for hiding this comment

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

Reminder for this TODO :)

p.Builder = NewTestBuildProvider()
p.InstanceStorage = instancestorage.NewTestInstanceStorageProvider()
Copy link
Member

Choose a reason for hiding this comment

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

Does this line need to come before line 42 above?

Copy link
Member Author

Choose a reason for hiding this comment

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

It does! I'm fixing it now locally to get the integration tests working

@carolynvs
Copy link
Member Author

Sorry about the low quality PR. I should have waited on asking for feedback until I had figured out why the integration test for dependencies was failing first.

@vdice
Copy link
Member

vdice commented Oct 11, 2019

@carolynvs Your PRs are the highest-quality around! I always learn a ton from them, both code-related and how to make better PRs myself :)

@carolynvs carolynvs merged commit ddb237b into getporter:master Oct 14, 2019
Porter and Mixins [OLD] automation moved this from In Progress to Done Oct 14, 2019
@carolynvs carolynvs deleted the remote-claims branch October 14, 2019 14:08
@vdice vdice removed this from Done in Porter and Mixins [OLD] Sep 16, 2020
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.

None yet

3 participants