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 plugin context sharing types #127

Merged
merged 2 commits into from
Oct 20, 2023

Conversation

dsimansk
Copy link
Contributor

Changes

  • Add plugin context sharing types

Part of client PR.

/cc @rhuss

@knative-prow knative-prow bot requested a review from rhuss October 20, 2023 10:21
@knative-prow knative-prow bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 20, 2023
@codecov
Copy link

codecov bot commented Oct 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b78888b) 81.10% compared to head (f26b4aa) 81.10%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #127   +/-   ##
=======================================
  Coverage   81.10%   81.10%           
=======================================
  Files          69       69           
  Lines        5466     5466           
=======================================
  Hits         4433     4433           
  Misses        796      796           
  Partials      237      237           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

GetContextData() map[string]string

// ExecuteWithContext
ExecuteWithContext(ctx map[string]string, args []string) error
Copy link
Contributor

Choose a reason for hiding this comment

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

Just reading this, and I wonder whether we shouldn't use just a regular Golang context, alone to avoid confusion ? (at the end this is also only a map)

At least it should be then called ExecuteWithContextData but at the end I would move to Context instead of ContextData in the the whole interface definitions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We opted for contextData in a map directly. Basically I've refactored the interface from Context to plain map. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a bit more straight-forward to work with map, rather than context.Context, than init context and add values.

Copy link
Contributor

Choose a reason for hiding this comment

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

i see, but then maybe just rename to "WithContextData" ?

@rhuss
Copy link
Contributor

rhuss commented Oct 20, 2023

thanks for the update!

/approve
/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Oct 20, 2023
@knative-prow
Copy link

knative-prow bot commented Oct 20, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dsimansk, rhuss

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot merged commit a356cde into knative:main Oct 20, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants