Skip to content

releng - release 0.6.14#232

Merged
ajkerrigan merged 3 commits intocloud-custodian:mainfrom
ajkerrigan:ajk/release/0.6.14
Mar 12, 2025
Merged

releng - release 0.6.14#232
ajkerrigan merged 3 commits intocloud-custodian:mainfrom
ajkerrigan:ajk/release/0.6.14

Conversation

@ajkerrigan
Copy link
Copy Markdown
Member

@ajkerrigan ajkerrigan commented Feb 5, 2025

  • build python 3.13 wheels

Closes #231

This also updates our trivy dependency to a commit based on upstream trivy 0.59.0 (see cloud-custodian/trivy#8)

- build python 3.13 wheels
- update dependencies
@ajkerrigan
Copy link
Copy Markdown
Member Author

The action logs didn't seem to give a whole lot of detail about where test runs were going south, but local runs with pytest -svv provide this:

tests/test_tfparse.py::test_vars_bad_types 2025-02-04T20:54:13-05:00    DEBUG   [terraform parser] Setting project/module root     module="root" file_path="."
2025-02-04T20:54:13-05:00       DEBUG   [terraform parser] Parsing FS   module="root" file_path="."
2025-02-04T20:54:13-05:00       DEBUG   [terraform parser] Parsing      module="root" file_path="main.tf"
2025-02-04T20:54:13-05:00       DEBUG   [terraform parser] Added file   module="root" file_path="main.tf"
2025-02-04T20:54:13-05:00       DEBUG   [terraform parser] Loading module       module="root" module="root"
2025-02-04T20:54:13-05:00       DEBUG   [terraform parser] Read block(s) and ignore(s)  module="root" blocks=6 ignores=0
2025-02-04T20:54:13-05:00       DEBUG   [terraform parser] Added input variables from tfvars    module="root" count=0
2025-02-04T20:54:13-05:00       WARN    [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.  module="root" variables="empty_block, quoted_type"
2025-02-04T20:54:13-05:00       DEBUG   [terraform parser] Working directory for module evaluationmodule="root" file_path="/home/aj/code/tfparse"
2025-02-04T20:54:13-05:00       DEBUG   [terraform evaluator] Starting module evaluation...     path="."
2025-02-04T20:54:13-05:00       DEBUG   [terraform evaluator] Starting iteration        iteration=0
2025-02-04T20:54:13-05:00       DEBUG   [terraform evaluator] Starting iteration        iteration=1
2025-02-04T20:54:13-05:00       DEBUG   [terraform evaluator] Context unchanged iteration=1
2025-02-04T20:54:13-05:00       DEBUG   [terraform evaluator] Starting post-submodules evaluation...
2025-02-04T20:54:13-05:00       DEBUG   [terraform evaluator] Starting iteration        iteration=0
2025-02-04T20:54:13-05:00       DEBUG   [terraform evaluator] Starting iteration        iteration=1
2025-02-04T20:54:13-05:00       DEBUG   [terraform evaluator] Context unchanged iteration=1
2025-02-04T20:54:13-05:00       DEBUG   [terraform evaluator] Module evaluation complete.
2025-02-04T20:54:13-05:00       DEBUG   [terraform parser] Finished parsing module      module="root"
2025-02-04T20:54:13-05:00       DEBUG   [terraform evaluator] Added module output       block="default_only" value="cty.StringVal(\"huh\")"
2025-02-04T20:54:13-05:00       DEBUG   [terraform evaluator] Added module output       block="empty_block" value="cty.NilVal"
2025-02-04T20:54:13-05:00       DEBUG   [terraform evaluator] Added module output       block="quoted_type" value="cty.NilVal"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x7c362aa0c18f]

goroutine 17 [running, locked to thread]:
github.com/zclconf/go-cty/cty.Type.FriendlyName(...)
        /tmp/tmpei2_u0iy/pkg/mod/github.com/zclconf/go-cty@v1.16.2/cty/type.go:47
github.com/cloud-custodian/tfparse/gotfparse/pkg/converter.(*terraformConverter).buildBlock(0xc000993040, 0xc000685340)
        /tmp/tmpei2_u0iy/src/github.com/cloud-custodian/tfparse/gotfparse/gotfparse/pkg/converter/converter.go:145 +0x30f
github.com/cloud-custodian/tfparse/gotfparse/pkg/converter.(*terraformConverter).visitBlock(0xc000993040, 0xc000685340, {0x0, 0x0}, 0xc000a85130)
        /tmp/tmpei2_u0iy/src/github.com/cloud-custodian/tfparse/gotfparse/gotfparse/pkg/converter/converter.go:62 +0x148
github.com/cloud-custodian/tfparse/gotfparse/pkg/converter.(*terraformConverter).visitModule(0xc000993040, 0xc0007129c0, 0xc000a85130)
        /tmp/tmpei2_u0iy/src/github.com/cloud-custodian/tfparse/gotfparse/gotfparse/pkg/converter/converter.go:52 +0x6b
github.com/cloud-custodian/tfparse/gotfparse/pkg/converter.(*terraformConverter).VisitJSON(0xc000993040)
        /tmp/tmpei2_u0iy/src/github.com/cloud-custodian/tfparse/gotfparse/gotfparse/pkg/converter/converter.go:41 +0x91
main.Parse(0x7c362af970c0?, 0x0, 0x0, 0x0, 0x30f80350, 0x0, 0x7ffe71351610)
        /tmp/tmpei2_u0iy/src/github.com/cloud-custodian/tfparse/gotfparse/gotfparse/cmd/tfparse/main.go:50 +0x61d
Fatal Python error: Aborted

Current thread 0x00007c362f448740 (most recent call first):
  File "/home/aj/code/tfparse/tfparse/__init__.py", line 46 in load_from_path
  File "/home/aj/code/tfparse/tests/test_tfparse.py", line 83 in test_vars_bad_types
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/_pytest/python.py", line 159 in pytest_pyfunc_call
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/_pytest/python.py", line 1627 in runtest
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/_pytest/runner.py", line 174 in pytest_runtest_call
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/_pytest/runner.py", line 242 in <lambda>
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/_pytest/runner.py", line 341 in from_call
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/_pytest/runner.py", line 241 in call_and_report
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/_pytest/runner.py", line 132 in runtestprotocol
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/_pytest/runner.py", line 113 in pytest_runtest_protocol
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/_pytest/main.py", line 362 in pytest_runtestloop
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/_pytest/main.py", line 337 in _main
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/_pytest/main.py", line 283 in wrap_session
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/_pytest/main.py", line 330 in pytest_cmdline_main
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/_pytest/config/__init__.py", line 175 in main
  File "/home/aj/.venvs/tfparse/lib/python3.13/site-packages/_pytest/config/__init__.py", line 201 in console_main
  File "/home/aj/.venvs/tfparse/bin/pytest", line 10 in <module>

Extension modules: _cffi_backend (total: 1)
fish: Job 1, 'pytest -svv tests' terminated by signal SIGABRT (Abort)

@kapilt
Copy link
Copy Markdown
Contributor

kapilt commented Feb 13, 2025

I don't think we can update dependencies, without adding in c7n-left unit tests to tfparse. there's too much chance of regression without it.

Just bump the tfparse version now to get Python 3.13 support - pulling
in the latest from trivy upstream is going to take some separate work.
Copy link
Copy Markdown
Contributor

@kapilt kapilt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add python 3.13 binaries

2 participants