Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: snyk target tag fails due to missing filters argument #37

Open
1 task done
holmesbenedikt opened this issue Sep 5, 2024 · 2 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@holmesbenedikt
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Description of the bug

Commit ad7488e added a filters argument to the apply_tags_to_projects() function. Yet, the usage in line 166 was not adapted (missing filters) causing the cli command to fail.

Steps To Reproduce

CLI command that shows the failure:
snyk-tags target tag --target org/repo --tagkey Key --tagvalue Value --org-id <ORG_ID> --snyktkn <TOKEN>

Additional Information

No response

@holmesbenedikt holmesbenedikt added the bug Something isn't working label Sep 5, 2024
@adamwitherspoon-cars
Copy link

adamwitherspoon-cars commented Dec 11, 2024

@EricFernandezSnyk I am experiencing this as well. Version 2.40 Python 3.10.9 MacOS (PyEnv installed)
Attribute works fine with my Org ID and Token, but target tags breaks every time.

TypeError: apply_tags_to_projects() missing 1 required positional argument: 'filters'

Added the following to line 166: filters={}
of file /Users/MYUSER/.pyenv/versions/3.10.9-debug/lib/python3.10/site-packages/snyk_tags/collection.py and it worked.

@taylorbrownsnyk
Copy link

You also need to add filters={} to the attribute.apply_attributes_to_projects below tenant=tenant to get it to work.

It would look a little something like this:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants