what do I do about this mypy error? it seems like ...
# plugins
f
what do I do about this mypy error? it seems like the error is coming from something that my plugin imports but is not from my plugin code directly:
Copy code
src/python/pants/backend/terraform/tffmt.py:21: note: In module imported here:
src/python/pants/engine/process.py: note: In class "InteractiveRunner":
src/python/pants/engine/process.py:334:2: error: Cannot determine type of
'side_effecting'  [has-type]
    @side_effecting
     ^
h
Looks like https://github.com/pantsbuild/pants/issues/11957 I haven't had time to investigate what's going on yet. That issue prompted us to revert the offending change that had been cherry picked into 2.4.x, but I haven't reverted in 2.5 so that we can figure it out before stable release
h
Yes, it is that
I don't understand it myself, but it is that
j
tangent question: @fast-nail-55400 Are you working on a Terraform Lint/Validate plugin?
๐Ÿš€ ๐Ÿ™Œ๐Ÿฝ ๐Ÿš€
h
Yep! I need to review it still, but otherwise sounds ready to go. (busy week w/ Pycon) Would y'all benefit from that @jolly-midnight-72759? It would land in 2.6.0 Also, iirc you all are using Shellcheck? That's now in 2.5: https://www.pantsbuild.org/v2.5/docs/shell
j
Yes!
๐Ÿš€ 1
I currently use pants to "archive, "files", and "relocated_files" some of our Terraform modules. This is just asking for a backend.
For the directory named
rds_postgres_project
, my thinking was:
Copy code
terraform_module (
  name="rds_postgres_project",
 file_targets=[":${name}_files"],
  # format="tar.gz",
  # dest="s3://...",
  version_major_minor="0.5",
  # patch is calulated from dest/index.json
# output_path="rds_postgres_project-${version_major_minor}.${patch}.tar.gz"
)
terraform_files(
  # name="${dir_name}_files",
  # sources=["*.tf", "**/*.tf"],
)
All the commented out options have the shown sane defaults.
A little like how
pex_binary
and
python_libary
work together. Feels a little forced syntax wise, but follows the current thinking of separating the "how to I package it" from the "what is in the package".
I guess to take that to an extreme I should make a separate "where do I publish" target. ๐Ÿ˜•
f
tangent question:ย @fast-nail-55400ย Are you working on a Terraform Lint/Validate plugin?
@jolly-midnight-72759: yes. I wonโ€™t be able to finish it until after PyCon though.
j
The big thing I wan to do is to add the version to the file name and uploaded package. And have that be automatic.
h
"where do I publish"
Generally v2 has no precedent for publishing, definitely on my feature wishlist. It's upsetting that Pants's own release process does not use Pants for all of it...we've been chipping away at that
j
Thank you! This will save me a lot of work.
Do you know about tfsec? That would be good to include too. Maybe it needs to be separate.
I just found it and am not sure if it is opinionated in a useful way or an obnoxious way, yet.
h
To clarify, it's unfortunately not yet on the roadmap for us to add more than what Tom's PR does fwict. And for that reason, we'd probably put the backend behind that
pants.backend.experimental
prefix because it's not yet fully feature complete But, we would be super eager to help if you were interested in adding some of those followup features!
j
Now I have YAnother reason to get my local pants build env working. LOL
๐Ÿ™Œ 1
h
remind me what the issue was?
j
It is related to
setproctitle
.
I have not spent much time trying to resolve. My next troubleshooting step is going to do it via VirtualBox.
(but nowe I"ve hijackd a purffectly gud threeed)
h
Oh yeah, rip. Set a Slack remidner to look into that next week
โœ… 1