oracle / oracle/oci-cli

Cannot download stack-tf-config using cli

Open
#766 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
669
Forks
236
Avg merge
1m
Merged PRs (30d)
4

Description

I am trying to download terraform config, but I get 409:

ci resource-manager stack get-stack-tf-config  --stack-id "ocid1.ormstack.oc1.sa-saopaulo-1.xxxxxx" --file - --debug 
DEBUG:oci_cli.cli_metrics: 2024-04-17 15:32:08.921945: Metrics is not enabled
macOS-14.0-arm64-arm-64bit
System name: Darwin
System release : 23.0.0
System version: Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:43 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T6000

env OCI_PYTHON_SDK_NO_SERVICE_IMPORTS is set
DEBUG:oci_cli.cli_util:Config File: dict_keys(['log_requests', 'additional_user_agent', 'pass_phrase', 'user', 'fingerprint', 'key_file', 'tenancy', 'region'])
DEBUG:oci_cli.cli_util:region: Environment Variable or Parameter
DEBUG:oci.base_client.4411741232:Endpoint: https://resourcemanager.sa-saopaulo-1.oraclecloud.com/20180917
INFO:oci.base_client.4411741232: 2024-04-17 15:32:08.960585: Request: GET https://resourcemanager.sa-saopaulo-1.oraclecloud.com/20180917/stacks/ocid1.ormstack.oc1.sa-saopaulo-1.xxxxxxx/tfConfig
Not using Expect header...
send: b'GET /20180917/stacks/ocid1.ormstack.oc1.sa-saopaulo-1.xxxxx/tfConfig HTTP/1.1\r\nuser-agent: Oracle-PythonSDK/2.121.1 (python 3.12.2; arm64-Darwin) Oracle-PythonCLI/3.37.9\r\naccept-encoding: gzip, deflate\r\naccept: application/zip\r\nconnection: keep-alive\r\ncontent-type: application/json\r\nopc-request-id: 606E7EED91344712B06F2A865E075883\r\nopc-client-retries: true\r\nopc-client-info: Oracle-PythonSDK/2.121.1\r\ndate: Wed, 17 Apr 2024 15:32:08 GMT\r\nhost: resourcemanager.sa-saopaulo-1.oraclecloud.com\r\nauthorization: Signature algorithm="rsa-sha256",headers="date (request-target) host",keyId="ocid1.tenancy.oc1..xxxxxx/ocid1.user.oc1..xxxxx/.....",version="1"\r\n\r\n'
reply: 'HTTP/1.1 409 Conflict\r\n'
header: Date: Wed, 17 Apr 2024 15:32:09 GMT
header: opc-request-id: 606E7EED91344712B06F2A865E075883/5B15FEA63271B861728F14A07F659A4E/E20E4F41DA5F36625F1A8401F66523E5
header: Strict-Transport-Security: max-age=31536000; includeSubDomains;
header: Cache-Control: no-cache, no-store, must-revalidate
header: Pragma: no-cache
header: X-XSS-Protection: 1; mode=block
header: Content-Type: application/json
header: X-Content-Type-Options: nosniff
header: Connection: close
header: Content-Length: 77
DEBUG:oci.base_client.4411741232: 2024-04-17 15:32:09.375344: time elapsed for request 606E7EED91344712B06F2A865E075883: 0.414677583030425
DEBUG:oci.base_client.4411741232: 2024-04-17 15:32:09.375763: Response status: 409
DEBUG:oci.base_client.4411741232: 2024-04-17 15:32:09.376970: python SDK time elapsed for deserializing: 1.995800994336605e-05
INFO:oci.base_client.4411741232: 2024-04-17 15:32:11.151027: Request: GET https://resourcemanager.sa-saopaulo-1.oraclecloud.com/20180917/stacks/ocid1.ormstack.oc1.sa-saopaulo-1.xxxxxxx/tfConfig

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 the stack get-stack-tf-config command against the Resource Manager endpoint using the provided debug details, then trace the CLI entry point for this command and the handling of its 409 response. Done means the reported Terraform configuration can be downloaded successfully, with the failure behavior understood and covered by an appropriate regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, terraform
Domain
cli, cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.