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

[master] Add proxy option to gitfs and git_pillar #66744

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

eisenmann-b1
Copy link

@eisenmann-b1 eisenmann-b1 commented Jul 25, 2024

What does this PR do?

This PR add the options gitfs_proxy, git_pillar_proxy and winrepo_proxy, with which a proxy server can be specified to be used for connecting to git repositories. These options can also be set per remote as proxy, overriding the global options.

For Pygit2, a warning will be given if proxy is set and the URL to the git repository does not have an https scheme.
This is due to an libgit2/libgit2#5650 in libgit2, the library pygit2 is using.

What issues does this PR fix or reference?

Fixes #30990

Previous Behavior

There is no option to specify the proxy server. The workaround described in #30990 requires changes to code akin to the ones here, or setting environment variables in service files.

New Behavior

A proxy server can now be specified like this:

gitfs_remotes:
  - https://foo.com/bar.git:
    - proxy: http://proxy.com:8080/

In this example, the repository at https://foo.com/bar.git is fetched through the proxy http://proxy.com:8080/.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

@eisenmann-b1 eisenmann-b1 requested a review from a team as a code owner July 25, 2024 15:28
@eisenmann-b1 eisenmann-b1 requested a review from felippeb July 25, 2024 15:28
Copy link

welcome bot commented Jul 25, 2024

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 [email protected]. We’re glad you’ve joined our community and look forward to doing awesome things with you!

@salt-project-bot-prod-environment salt-project-bot-prod-environment bot changed the title Add proxy option to gitfs and git_pillar [master] Add proxy option to gitfs and git_pillar Jul 25, 2024
@dmurphy18
Copy link
Contributor

@eisenmann-b1 Need to tick the Tests written/updated box too

@eisenmann-b1
Copy link
Author

@eisenmann-b1 Need to tick the Tests written/updated box too

I did not tick it since there are no new tests, which I felt would be necessary for this.

@dmurphy18
Copy link
Contributor

dmurphy18 commented Jul 25, 2024

@eisenmann-b1 you updated tests, hence you need to tick the box, for example: tests/pytests/unit/fileserver/gitfs/test_gitfs.py

@dmurphy18 dmurphy18 self-requested a review July 25, 2024 16:49
@eisenmann-b1
Copy link
Author

@dmurphy18 ok, I ticked the box.

@dmurphy18 dmurphy18 added test:slow Enable Slow Tests test:full Run the full test suite test:pkg Run the package tests test:os:all Run Tests Against ALL OS'es labels Jul 25, 2024
@eisenmann-b1
Copy link
Author

Added the option to winrepo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test:full Run the full test suite test:os:all Run Tests Against ALL OS'es test:pkg Run the package tests test:slow Enable Slow Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

is there a way to use git fileserver backend to sync the salt-master repo from github behind a proxy?
2 participants