oracle / oracle/oci-ruby-sdk

Certificate parsing error

Open
#71 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Certificates Management
Dominant language
Ruby
Stars
30
Forks
19
PR merge metrics
No merged PRs in 30d

Description

I am trying to fetch ssl certificate via get_certificate method and observing error:

irb(main):099:0> cert_client.get_certificate("ocid1.certificate.oc1.eu-blah-blah")
/usr/local/bundle/gems/oci-2.18.0/lib/oci/internal/util.rb:59:in `convert_to_type': uninitialized constant OCI::CertificatesManagement::Models::VersionStage (NameError)
                                                                             
            type = OCI.const_get(type.to_s)                                  
                      ^^^^^^^^^^                                             
Did you mean?  OCI::CertificatesManagement::Models::VERSION_STAGE_FAILED     
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/certificates_management/models/certificate_version_summary.rb:238:in `block (2 levels) in build_from_hash'
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/certificates_management/models/certificate_version_summary.rb:238:in `map'
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/certificates_management/models/certificate_version_summary.rb:238:in `block in build_from_hash'
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/certificates_management/models/certificate_version_summary.rb:231:in `each_pair'
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/certificates_management/models/certificate_version_summary.rb:231:in `build_from_hash'
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/internal/util.rb:68:in `block in convert_to_type'
        from <internal:kernel>:90:in `tap'                                   
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/internal/util.rb:67:in `convert_to_type'
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/certificates_management/models/certificate.rb:462:in `block in build_from_hash'
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/certificates_management/models/certificate.rb:450:in `each_pair'
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/certificates_management/models/certificate.rb:450:in `build_from_hash'
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/internal/util.rb:68:in `block in convert_to_type'
        from <internal:kernel>:90:in `tap'
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/internal/util.rb:67:in `convert_to_type'
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/api_client.rb:572:in `deserialize'
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/api_client.rb:462:in `handle_success_response'
        ... 14 levels...

The same error occurs on every api call, which is expected to parse certificate response, i.e. certificate creation and update.

Contributor guide

Open the contributing guide

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.

Research direction

Start by reproducing get_certificate and reading oci/certificates_management/models/certificate_version_summary.rb, then follow the response parsing into certificate.rb. Check how VersionStage is resolved and compare the affected certificate creation and update responses. Done means certificate responses deserialize without the reported NameError across these API calls.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
api, cloud, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.