Skip to content

fix: add retry_transient_errors to merge_config - #3437

Open
nickbroon wants to merge 1 commit into
python-gitlab:mainfrom
nickbroon:merge_config_retry_transient_errors
Open

nickbroon wants to merge 1 commit into
python-gitlab:mainfrom
nickbroon:merge_config_retry_transient_errors

Conversation

@nickbroon

Copy link
Copy Markdown
Contributor

merge_config() supports other options that the constructor and from_config() factory method do, and was just missing this one.

@nickbroon

Copy link
Copy Markdown
Contributor Author

It would be nice to have this merged before the next release. 🙂

`merge_config()` supports other options that the constructor and
`from_config()` factory method do, and was just missing this one.
@max-wittig max-wittig self-assigned this Sep 18, 2026
@max-wittig
max-wittig force-pushed the merge_config_retry_transient_errors branch from 677e698 to 1b3cb2f Compare September 18, 2026 13:20
@max-wittig
max-wittig enabled auto-merge (rebase) September 18, 2026 13:20
@max-wittig
max-wittig disabled auto-merge September 18, 2026 13:21
@max-wittig

Copy link
Copy Markdown
Member

@nickbroon Could we have some tests for this as well?

@max-wittig max-wittig assigned nickbroon and unassigned max-wittig Sep 18, 2026
@nickbroon

Copy link
Copy Markdown
Contributor Author

@nickbroon Could we have some tests for this as well?

Are there any existing tests of Gitlab.merge_config() that I can extend?
Otherwise I'm likely not familiar enough with python-gitlab's test framework to know how to add a test for this.

@nickbroon

nickbroon commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor Author

@nickbroon Could we have some tests for this as well?

Are there any existing tests of Gitlab.merge_config() that I can extend? Otherwise I'm likely not familiar enough with python-gitlab's test framework to know how to add a test for this.

Replying to myself; There are no immediately obviously existing tests, or even uses, of merge_config() other than a single call from the CLI code: https://github.com/search?q=repo%3Apython-gitlab%2Fpython-gitlab+merge_config&type=code

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Explicit False values currently cannot override a configuration value of True.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds retry_transient_errors handling to Gitlab.merge_config().

Changes:

  • Merges the retry setting from explicit options or configuration.
File Description
gitlab/​client.py Passes the merged retry setting to the client constructor.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread gitlab/client.py
Comment on lines +355 to +356
retry_transient_errors=options.get("retry_transient_errors")
or config.retry_transient_errors,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Does the existing ssl_verify config option must also have this same behaviour?

This branch has not been deployed

No deployments
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.

3 participants