Coder Social home page Coder Social logo

paws's People

Contributors

adambanker avatar alexhallam avatar davidkretch avatar dpprdan avatar dyfanjones avatar fh-mthomson avatar jcheng5 avatar jornfranke avatar liuquinlin avatar lorenzwalthert avatar mgirlich avatar ryanb8 avatar tomlue avatar williazo avatar yonicd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

paws's Issues

CI bugs

  • Travis no longer works at all for this project.
  • R CMD check notes and warnings don't trigger failures in Travis. (GitHub Actions replaced Travis)
  • AppVeyor and Codecov always show up as "Queued" in the Checks tab for each PR.
  • AppVeyor always builds make.paws against the master branch paws.common.
  • Codecov stopped working after PR #86. It is a bug in script/codecov.R. See the Travis build log.

Add type checks when reading in user arguments

e.g. a scalar parameter should not receive a vector of length greater than one.

The populateutil functions should also enforce rules about their contents, e.g. Structure should require names, List should require no names, etc.

Speed up code generation

Code generation takes a long time -- possibly multiple hours. The biggest part of code generation is converting HTML to Markdown or plaintext with Pandoc.

Does not properly parse structured error responses

When making a request on an S3 bucket to an endpoint in the wrong region, you get a structured error response, of which Paws extracts and returns only the message. Full response below:

<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n
<Error>
  <Code>PermanentRedirect</Code>
  <Message>The bucket you are attempting to access must be addressed using the specified 
  endpoint. Please send all future requests to this endpoint.</Message>
  <Endpoint>s3.amazonaws.com</Endpoint>
  <Bucket>davidkretch</Bucket>
  <RequestId>12ABA16DB44973A8</RequestId>
  <HostId>i/luCtGDyDxKFG606J7t38Lc0r2aZUWnKCWgdPIZCNAzIYE6URwhaVh2j72ecaFNsCLUEWhV12M=</HostId>
</Error>

Invalid URL in Connect SDK

Found the following (possibly) invalid file URI:
URI: NextToken
From: man/connect_get_current_metric_data.Rd

"NextToken" is not a file nor an URL.

Proposal: Combine all services into a single package

Implementation:

  • Each service would be an exported object, e.g. paws::ec2.
  • Each operation would be an element of that object, e.g. paws::ec2$run_instances.
  • There would be a page in the documentation for each service, which links to its operations.
  • Each operation's Roxygen name would be <service>_<operation>, e.g. ec2_run_instances, to avoid name collisions between services.
  • Update the makefile so that make paws generates the single package.
  • Update the readme and examples.

Benefits:

  • Users need to download only one package.
  • Only need to generate one package, and submit only one package to CRAN.
  • Can run all integration tests with a single call to testthat. Would also potentially be able to get code coverage for the generated code.
  • Don't need to fix issue #59, R package description warnings.

Costs:

  • Documentation is harder to browse.
  • Less idiomatic.

To-do:

  • Finish fixing the HTML-to-markdown conversion, which still has bugs that lead to invalid R documentation.
  • Add indexes listing all operations for each service. See tabular function reference.
  • Update the examples & readme.
  • Delete old packages and regenerate the new package.
  • Add an argument to make_sdk() allowing one to specify which packages to build.
  • Add tests for get_structure, read_api, make_sdk.
  • Fix make_sdk bug s.t. if you put in a non-existent API, it doesn't fail, instead it builds the alphabetically first API.

R package description warnings

In several packages, we get warnings about the description, e.g.

build paws.mediaconnect
Warning message:
'Description' must contain one or more complete sentences

Service endpoints not found

The following packages receive default endpoints that do not exist.

paws.chime
paws.devicefarm
paws.globalaccelerator
paws.iot1clickdevicesservice
paws.kinesisanalyticsv2
paws.licensemanager
paws.mediastoredata
paws.migrationhub
paws.pinpointemail

Render HTML inside <code> blocks

HTML is not rendered inside code blocks, e.g. in iam_simulate_custom_policy, we currently get:

#' The ARN for an account uses the following syntax:
#' `arn:aws:iam::<i>AWS-account-ID</i>:root`. For example, to represent the

update_version.sh always updates

update_version.sh is supposed to update a package's version when there are changes, but instead it will always update, if only due to differences between Unix and Windows line breaks.

XML error parse failures

The following packages have integration test failures which also have XML error parse failures:

package test
paws.cloudformation describe_stack_events
paws.cloudformation describe_stack_resources
paws.elasticache describe_cache_security_groups
paws.elasticache list_allowed_node_type_modifications
paws.elasticbeanstalk describe_configuration_options
paws.elasticbeanstalk describe_environment_health
paws.elasticbeanstalk describe_environment_managed_action_history
paws.elasticbeanstalk describe_environment_managed_actions
paws.elasticbeanstalk describe_environment_resources
paws.elasticbeanstalk describe_instances_health
paws.elasticbeanstalk describe_platform_version
paws.elbv2 describe_listeners
paws.elbv2 describe_rules
paws.importexport list_jobs
paws.redshift describe_cluster_security_groups
paws.redshift describe_table_restore_status
paws.simpledb list_domains

JSONRPC Not Reading in Parameters

When running in the following code:

library(paws.batch)
(a <- describe_compute_environments(maxResults = 3))

I noticed that the parameters were not being used. The http request body is being created properly in the file handlers_jsonrpc.R.

However, the body is not being set at line 14 of that same file because request$client_info$target_prefix is null.

Custom config is per-service, not per-service-client

a <- paws::ec2(config = list(region = "us-east-2"))
b <- paws::ec2(config = list(region = "us-east-1"))

# Returns the same list of key pairs.
a$describe_key_pairs()
b$describe_key_pairs()

Custom config code is on branch feature/custom_endpoint.

Submit packages to CRAN

Check list for CRAN release:

  • devtools::check()
  • devtools::spell_check()
  • devtools::check_rhub()
  • devtools::check_win_devel()
  • devtools::release()

Fix REST-XML error unmarshalling

query_unmarshal_error does not work for S3 response errors, e.g.

(a <- put_bucket_tagging(
  Bucket = "Name-of-My-Bucket",
  Tagging = list(
    TagSet = list(
      list(
        Key = "Dog",
        Value = "Westie"
      ),
      list(
        Key = "Dog2",
        Value = "Beagle"
      )
    )
  )
))

Paws package unable to get IAM credentials from an EC2 Instance profile

Issue

I'm trying to use paws package on an EC2 instance but it fails to get IAM credentials from the instance profile and i need to explicitly set the values for 'AWS_ACCESS_KEY_ID' and 'AWS_SECRET_ACCESS_KEY' in the environment. I get the following error when i try to get account summary on the instance or use any of the AWS services in the paws package with an IAM instance profile.

Below is the error message given for when i try to get account summary on an EC2 Instance

Error: Argument 'txt' must be a JSON string, URL or file.
Traceback:

  1. temp$get_account_summary()
  2. send_request(request)
  3. sign(request)
  4. run(request, sign)
  5. handler$fn(request)
  6. sign_sdk_request_with_curr_time(request)
  7. sign_with_body(v4, request$http_request, request$body, name,
    . region, request$expire_time, request$expire_time > 0, signing_time)
  8. get_credentials(signer$credentials)
  9. provider()
  10. get_iam_role()
  11. jsonlite::fromJSON(iam_role_response$body)
  12. stop("Argument 'txt' must be a JSON string, URL or file.")
  13. base::stop(..., call. = FALSE)

iam_role_response is NULL which is why the error is given. If i do a simple GET request on the instance to the metadata url "http://169.254.169.254/....", i can successfully retrieve the security credentials which is where PAWS seems to be failing.

Steps to reproduce
Using R version 3.5.1, with latest PAWS package running on EC2 Instance

  1. Paste the following code
Sys.setenv(
  AWS_REGION = "eu-west-2"
)
iaminfo <- paws::iam()
iaminfo$get_account_summary()
  1. Run the code and wait a few seconds for the error message to appear.

Endpoints don't work for s3

paws.s3_service.R looks like this:

cfg <- client_config(
    service_name = "s3",
    endpoints = list("us-gov-west-1" = "s3.{region}.amazonaws.com", "us-west-1" = "s3.{region}.amazonaws.com", 
  )

Notice the list isn't completed

R CMD check errors, warnings, and notes

From paws.ec2:

  • checking DESCRIPTION meta-information (696ms) Dependence on R version '3.5.1' not with patchlevel 0
  • checking Rd cross-references ... WARNING Missing link or links in documentation object 'modify_vpc_endpoint_service_permissions.Rd':
  • checking for unstated dependencies in 'tests' ... WARNING 'library' or 'require' call not declared from: 'testthat'
  • checking top-level files ... NOTE Non-standard file/directory found at top level: 'LICENSE.md'
  • checking Rd files ... NOTE prepare_Rd: accept_reserved_instances_exchange_quote.Rd:36-38: Dropping empty section \examples

paws Athena wrapper request

Hi all,
First off this is a great package and I really excited to started working with it. I am currently working on a wrapper of the python boto3 to create a R DBI interface into athena (https://github.com/DyfanJones/RAthena). I am really keen to do the same type of wrapper using the paws package as the driver package instead.

I just a quick questions first:

  • Are you comfortable for the me start building the DBI wrapper package using paws as the driver? I am asking this as I don't want to interrupt/ stop future plans of the paws project.

Many thanks

Error parsing response for cloudwatch::list_metrics()

cw <- paws::cloudwatch()
cw$list_metrics()
# Error in rawToChar(raw) : 
#  embedded nul in string: 'xœí\235_SÛº\022Àßϧèœw7þ—
# 8¹Ãe\006\002ía\006J\016\201öÌyady\235øàع–œ6ýô×Nà@!MBq¼+G/Ì`Œ%ÿ´»Z
# ­...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.