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

fix(cmd): do not override kong.conf if --db-timeout is not passed #12761

Merged
merged 2 commits into from
May 6, 2024

Conversation

ms2008
Copy link
Contributor

@ms2008 ms2008 commented Mar 20, 2024

Summary

Prior to this fix, if the gateway was started using the kong cli, the final pg_timeout would be overridden to 60s instead of the value specified in kong.conf, even if --db-timeout was not explicitly passed in. This was fixed by making cli args --db-timeout optional, so that only explicitly passed in arguments would override the pg_timeout otherwise the value specified in kong.conf would continue to be used.

Checklist

  • The Pull Request has tests
  • A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Issue reference

Fix #10307 (reply in thread)
KAG-4416

explicitly

Prior to this fix, if the gateway was started using the kong cli, the
final `pg_timeout` would be overridden to `60s` instead of the value
specified in `kong.conf`, even if `--db-timeout` was not explicitly
passed in. This was fixed by making cli args `--db-timeout` optional, so
that only explicitly passed in arguments would override the `pg_timeout`
otherwise the value specified in `kong.conf` would continue to be used.
@github-actions github-actions bot added core/cli cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee labels Mar 20, 2024
@ms2008 ms2008 marked this pull request as ready for review March 20, 2024 10:49
@ms2008 ms2008 requested a review from liverpool8056 March 20, 2024 11:26
@vm-001 vm-001 self-requested a review May 6, 2024 03:22
@hanshuebner
Copy link
Contributor

I have verified that without this change, setting KONG_DB_TIMEOUT on the command line while running kong migrations up has no effect while with this change, it does. It is thus a partial fix for the problem reported in #12978.

@kikito kikito added this to the 3.7.0 milestone May 6, 2024
@kikito kikito merged commit fd8707e into master May 6, 2024
32 checks passed
@kikito kikito deleted the fix/cli-db_timeout-optional branch May 6, 2024 08:05
github-actions bot pushed a commit that referenced this pull request May 6, 2024
…#12761)

explicitly

Prior to this fix, if the gateway was started using the kong cli, the
final `pg_timeout` would be overridden to `60s` instead of the value
specified in `kong.conf`, even if `--db-timeout` was not explicitly
passed in. This was fixed by making cli args `--db-timeout` optional, so
that only explicitly passed in arguments would override the `pg_timeout`
otherwise the value specified in `kong.conf` would continue to be used.

Co-authored-by: Hans Hübner <[email protected]>
(cherry picked from commit fd8707e)
@team-gateway-bot
Copy link
Collaborator

Successfully created backport PR for release/3.7.x:

@team-gateway-bot
Copy link
Collaborator

Cherry-pick failed for master, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git remote add upstream https://github.com/kong/kong-ee
git fetch upstream master
git worktree add -d .worktree/cherry-pick-12761-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-12761-to-master-to-upstream
git checkout -b cherry-pick-12761-to-master-to-upstream
ancref=$(git merge-base ddda6a1f2abbd1c8030a4325a807a17755a8bd19 5dcde2d48482852f219663018aeaf6b96a06c052)
git cherry-pick -x $ancref..5dcde2d48482852f219663018aeaf6b96a06c052

@github-actions github-actions bot added the incomplete-cherry-pick A cherry-pick was incomplete and needs manual intervention label May 6, 2024
hanshuebner pushed a commit that referenced this pull request May 6, 2024
…#12761)

explicitly

Prior to this fix, if the gateway was started using the kong cli, the
final `pg_timeout` would be overridden to `60s` instead of the value
specified in `kong.conf`, even if `--db-timeout` was not explicitly
passed in. This was fixed by making cli args `--db-timeout` optional, so
that only explicitly passed in arguments would override the `pg_timeout`
otherwise the value specified in `kong.conf` would continue to be used.

Co-authored-by: Hans Hübner <[email protected]>
(cherry picked from commit fd8707e)
github-actions bot pushed a commit that referenced this pull request May 6, 2024
…#12761)

explicitly

Prior to this fix, if the gateway was started using the kong cli, the
final `pg_timeout` would be overridden to `60s` instead of the value
specified in `kong.conf`, even if `--db-timeout` was not explicitly
passed in. This was fixed by making cli args `--db-timeout` optional, so
that only explicitly passed in arguments would override the `pg_timeout`
otherwise the value specified in `kong.conf` would continue to be used.

Co-authored-by: Hans Hübner <[email protected]>
(cherry picked from commit fd8707e)
@team-gateway-bot
Copy link
Collaborator

Cherry-pick failed for master, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git remote add upstream https://github.com/kong/kong-ee
git fetch upstream master
git worktree add -d .worktree/cherry-pick-12761-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-12761-to-master-to-upstream
git checkout -b cherry-pick-12761-to-master-to-upstream
ancref=$(git merge-base ddda6a1f2abbd1c8030a4325a807a17755a8bd19 5dcde2d48482852f219663018aeaf6b96a06c052)
git cherry-pick -x $ancref..5dcde2d48482852f219663018aeaf6b96a06c052

@team-gateway-bot
Copy link
Collaborator

Successfully created backport PR for release/3.6.x:

@team-gateway-bot
Copy link
Collaborator

Backport failed for release/3.7.x, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release/3.7.x
git worktree add -d .worktree/backport-12761-to-release/3.7.x origin/release/3.7.x
cd .worktree/backport-12761-to-release/3.7.x
git switch --create backport-12761-to-release/3.7.x
git cherry-pick -x fd8707ee6a505fecfc388997863c573398b2b853

bungle pushed a commit that referenced this pull request May 7, 2024
…#12761)

explicitly

Prior to this fix, if the gateway was started using the kong cli, the
final `pg_timeout` would be overridden to `60s` instead of the value
specified in `kong.conf`, even if `--db-timeout` was not explicitly
passed in. This was fixed by making cli args `--db-timeout` optional, so
that only explicitly passed in arguments would override the `pg_timeout`
otherwise the value specified in `kong.conf` would continue to be used.

Co-authored-by: Hans Hübner <[email protected]>
(cherry picked from commit fd8707e)
@kikito kikito removed incomplete-backport incomplete-cherry-pick A cherry-pick was incomplete and needs manual intervention labels May 14, 2024
locao pushed a commit that referenced this pull request Jun 21, 2024
…#12761) explicitly

Prior to this fix, if the gateway was started using the kong cli, the
final `pg_timeout` would be overridden to `60s` instead of the value
specified in `kong.conf`, even if `--db-timeout` was not explicitly
passed in. This was fixed by making cli args `--db-timeout` optional, so
that only explicitly passed in arguments would override the `pg_timeout`
otherwise the value specified in `kong.conf` would continue to be used.

Co-authored-by: Hans Hübner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release/3.7.x cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee core/cli size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants