suggestion for aws.ec2metadata::instance_document

Open Beginner friendly
#16 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
70/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
r
Domain
cloud

Research direction

Start by locating instance_document and tracing how it handles the result of get_instance_metadata(item = "dynamic/instance-identity/document") before calling jsonlite::fromJSON. Decide how the function should handle a NULL response, then check its existing tests or add coverage for that case. Done when a missing metadata document returns NULL or produces a clearer error instead of the cryptic JSON parsing error.

Written by the indexing model from the issue text.

Description

aws.ec2metadata:::get_instance_metadata(item = "dynamic/instance-identity/document") can return NULL, but when this happens, the NULL is passed to jsonlite::fromJSON resulting in a cryptic error "Argument 'txt' must be a JSON string, URL or file."

Instead in such cases, it might be better to allow aws.ec2metadata::instance_document to return NULL, or at least give a more informative error message.

Thank you for considering.

Dominant language
R
Stars
12
Forks
10
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cloudyr/aws.ec2metadata

All issues in cloudyr/aws.ec2metadata

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.