saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:
https://repo.saltproject.io/
Apache License 2.0
13.98k stars 5.47k forks source link

[BUG] `git.latest` function can fail if `fetch_url` is `None` #66537

Open marinelay opened 1 month ago

marinelay commented 1 month ago

Description

https://github.com/saltstack/salt/blob/551e7c4b0456ca520c04cb2b8c7d3030b34afdce/salt/states/git.py#L1144-L1158

I wonder that it is required to check fetch_url is None at line 1151 because the function redact_http_basic_auth at line 1155 does not allow None type and raises TypeError. It is the result of my type checker, so I wanted to provide test cases but I couldn't. If this is the correct behavior, I apologize for taking your time.

Setup (Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)

Please be as specific as possible and give set-up details.

welcome[bot] commented 1 month ago

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey. Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. If you have additional questions, email us at saltproject@vmware.com. We’re glad you’ve joined our community and look forward to doing awesome things with you!