Jira (PUP-10353) Change http client API to generic options hash

0 views
Skip to first unread message

Josh Cooper (Jira)

unread,
Mar 4, 2020, 2:32:04 PM3/4/20
to puppe...@googlegroups.com
Josh Cooper created an issue
 
Puppet / Bug PUP-10353
Change http client API to generic options hash
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2020/03/04 11:31 AM
Priority: Normal Normal
Reporter: Josh Cooper

The HTTP client API needs to use a generic options hash instead of keyword arguments for two reasons:

1. The API currently uses keyword arguments, but we need to add a puppetserver implementation. If we add a new argument to puppet's implementation, then it will break puppetserver, unless it collects "extra" options using **options. But then we'll end up with some arguments expressed as keyword arguments and some "leftovers".
2. Callers of the API sometimes pass options that the client implementation doesn't know about, such as compress. The API needs a way to pass options which may only be understood by one implementation. Each implementation should parse and validate options it recognizes and pass through options it doesn't.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Josh Cooper (Jira)

unread,
Mar 4, 2020, 2:49:04 PM3/4/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Sprint: Coremunity Grooming

Josh Cooper (Jira)

unread,
Mar 4, 2020, 2:55:04 PM3/4/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Fix Version/s: PUP 6.15.0

Melissa Stone (Jira)

unread,
Mar 4, 2020, 4:54:04 PM3/4/20
to puppe...@googlegroups.com
Melissa Stone updated an issue
Change By: Melissa Stone
Sprint: Coremunity Grooming Platform Core KANBAN

Josh Cooper (Jira)

unread,
Mar 4, 2020, 5:11:03 PM3/4/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Acceptance Criteria: Keep url, params, headers, options for get, post, etc
Validate options that we currently recognize like user, password, ssl_context, include_system_store
Some methods may need extra validation like passing content_type and body to the {{put}} method.

Josh Cooper (Jira)

unread,
Mar 4, 2020, 7:17:04 PM3/4/20
to puppe...@googlegroups.com
Josh Cooper assigned an issue to Melissa Stone
Change By: Josh Cooper
Assignee: Melissa Stone

Josh Cooper (Jira)

unread,
Mar 10, 2020, 2:24:03 PM3/10/20
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Mar 11, 2020, 1:50:03 PM3/11/20
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Mar 11, 2020, 1:54:03 PM3/11/20
to puppe...@googlegroups.com

Melissa Stone (Jira)

unread,
Mar 11, 2020, 2:04:04 PM3/11/20
to puppe...@googlegroups.com
Melissa Stone updated an issue
Change By: Melissa Stone
Release Notes: Enhancement
Release Notes Summary: This is an API change to allow more flexibility with future development. Rather than using keyword arguments, we opted to use a more generic options hash. This will ensure there are no awkward version dependencies as new features are implemented moving forward.

Claire Cadman (Jira)

unread,
Apr 6, 2020, 9:38:02 AM4/6/20
to puppe...@googlegroups.com
Claire Cadman updated an issue
Change By: Claire Cadman
Labels: doc_reviewed
Reply all
Reply to author
Forward
0 new messages