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

Reduce privilege requirement in bgw_security #7758

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

mkindahl
Copy link
Contributor

@mkindahl mkindahl commented Feb 20, 2025

The test bgw_security requires escalated privileges to modify _timescaledb_config.bgw_job and set the owner, which does not work when running tests on an instance without SUPERUSER privileges.

Reduce the requirements for the test by switching role before adding the job, and hence avoid the need to update
_timescaledb_config.bgw_job to set the owner.

Disable-check: force-changelog-file

@mkindahl mkindahl self-assigned this Feb 20, 2025
Copy link

codecov bot commented Feb 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.95%. Comparing base (59f50f2) to head (afddde3).
Report is 784 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7758      +/-   ##
==========================================
+ Coverage   80.06%   81.95%   +1.88%     
==========================================
  Files         190      247      +57     
  Lines       37181    45424    +8243     
  Branches     9450    11353    +1903     
==========================================
+ Hits        29770    37225    +7455     
- Misses       2997     3731     +734     
- Partials     4414     4468      +54     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

The test `bgw_security` requires escalated privileges to modify
`_timescaledb_config.bgw_job` and set the owner, which does not work
when running tests on an instance without `SUPERUSER` privileges.

Reduce the requirements for the test by switching role before adding
the job, and hence avoid the need to update
`_timescaledb_config.bgw_job` to set the owner.

Commit also clarifies one error message generated on permission errors
for a job.
@mkindahl mkindahl force-pushed the fix-bgw_security-test branch from ea6b14a to afddde3 Compare February 20, 2025 09:41
@mkindahl mkindahl marked this pull request as ready for review February 20, 2025 10:23
@github-actions github-actions bot requested review from akuzm and antekresic February 20, 2025 10:23
Copy link

@akuzm, @antekresic: please review this pull request.

Powered by pull-review

Copy link
Contributor

@pallavisontakke pallavisontakke left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@dbeck dbeck left a comment

Choose a reason for hiding this comment

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

lgtm

@mkindahl mkindahl enabled auto-merge (rebase) February 20, 2025 12:35
@mkindahl mkindahl merged commit 8f57265 into timescale:main Feb 20, 2025
56 of 59 checks passed
@mkindahl mkindahl deleted the fix-bgw_security-test branch February 20, 2025 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants