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

Remove unused 'dsn' function and its usage #4928

Merged

Conversation

okurz
Copy link
Member

@okurz okurz commented Nov 25, 2022

Tests did not cover the 'dsn' function anyway.

@okurz okurz changed the title Move 'dsn' function to only place used' PART 2: Move 'dsn' function to only place used' - after #4927 Nov 25, 2022
@okurz okurz marked this pull request as draft November 25, 2022 14:27
@okurz okurz force-pushed the feature/shared_plugin_gru_uncovered branch from d580029 to b912b26 Compare November 25, 2022 14:33
@okurz

This comment was marked as resolved.

@mergify

This comment was marked as resolved.

@okurz okurz force-pushed the feature/shared_plugin_gru_uncovered branch from b912b26 to c8d031f Compare December 9, 2022 15:58
@okurz okurz force-pushed the feature/shared_plugin_gru_uncovered branch from c8d031f to 966b11c Compare December 19, 2022 13:59
@okurz okurz changed the title PART 2: Move 'dsn' function to only place used' - after #4927 Move 'dsn' function to only place used' Dec 19, 2022
@stale stale bot added the stale label Mar 19, 2023
@okurz okurz force-pushed the feature/shared_plugin_gru_uncovered branch from 966b11c to e5501d7 Compare July 23, 2024 10:00
@stale stale bot removed the stale label Jul 23, 2024
Copy link

codecov bot commented Jul 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.50%. Comparing base (64488e5) to head (b1da48e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4928      +/-   ##
==========================================
+ Coverage   98.49%   98.50%   +0.01%     
==========================================
  Files         394      394              
  Lines       38683    38678       -5     
==========================================
  Hits        38099    38099              
+ Misses        584      579       -5     

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

@okurz okurz marked this pull request as ready for review July 23, 2024 11:03
@os-autoinst os-autoinst deleted a comment from stale bot Jul 23, 2024
@okurz okurz force-pushed the feature/shared_plugin_gru_uncovered branch from e5501d7 to 5ffe6e4 Compare July 25, 2024 14:40
@okurz
Copy link
Member Author

okurz commented Jul 25, 2024

Removed superfluous ' in the git commit message subject line

@okurz okurz changed the title Move 'dsn' function to only place used' Move 'dsn' function to only place used Jul 25, 2024
Copy link
Contributor

@Martchus Martchus left a comment

Choose a reason for hiding this comment

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

This change looks wrong. At least the commit message is misleading (as I only see a function being removed but not moved/inlined).

lib/OpenQA/Shared/Plugin/Gru.pm Outdated Show resolved Hide resolved
Tests did not cover the 'dsn' function anyway.

Verified by calling

```
env OPENQA_BASEDIR=$PWD/t/data OPENQA_DATABASE=test script/openqa-gru
```

locally.
@okurz okurz force-pushed the feature/shared_plugin_gru_uncovered branch from 5ffe6e4 to b1da48e Compare August 1, 2024 11:32
Copy link
Contributor

@Martchus Martchus left a comment

Choose a reason for hiding this comment

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

I guess we don't need this way of specifying credentials anymore then.

@Martchus Martchus changed the title Move 'dsn' function to only place used Remove unused 'dsn' function and its usage Aug 1, 2024
@mergify mergify bot merged commit 6e1262d into os-autoinst:master Aug 1, 2024
42 checks passed
@baierjan
Copy link
Member

baierjan commented Aug 1, 2024

There is an issue in production due to this:

Aug 01 13:56:01 ariel openqa-webui-daemon[10603]: Can't connect to data source 'HASH(0x5585ac6ef2e8)' because I can't work out what driver to use (it doesn't seem to contain a 'dbi:driver:' prefix and the DBI_DRIVER env var is not set) at /usr/lib/perl5/vendor_perl/5.26.1/Mojo/Pg.pm line 73.

@okurz
Copy link
Member Author

okurz commented Aug 1, 2024

The good thing is that we saw this in docker-compose tests. I wonder if I can change the docker-compose tests to actually test the branch related to a pull request as we build packages in there - if that's not taking too long.

@Martchus
Copy link
Contributor

Martchus commented Aug 1, 2024

That would mean the execution of the docker-compose tests needs to happen after the OBS checks have built and published the packages. Not sure whether we can easily chain OBS checks and docker-compose tests as they are triggered/executed in a completely different way.

@baierjan
Copy link
Member

baierjan commented Aug 1, 2024

That would mean the execution of the docker-compose tests needs to happen after the OBS checks have built and published the packages. Not sure whether we can easily chain OBS checks and docker-compose tests as they are triggered/executed in a completely different way.

In the helm chart tests (which also failed), it pulls the container images from OBS. The docker-compose test does the build on its own. The test is calling docker compose build

"$thisdir"/retry sudo docker compose build
then note that there is no OBS image specified in
image: openqa_webui
which should use the folder with the same name as the source of the container and build it if not present locally. You can see the build in the test logs. The problem is, that the Dockerfile is using openQA package from the distribution and not from the git as you can see in the failing docker-compose test here: https://github.com/os-autoinst/openQA/actions/runs/10199794743/job/28217764031#step:3:989

Another possible solution could be a new Dockerfile to build openQA container locally from git (but that would be duplicating the work OBS does for us) or as was already mentioned, wait for OBS, but even in that case we need to modify the Dockerfile to use the packages from the correct branch and not the released ones from our devel repo.

@okurz
Copy link
Member Author

okurz commented Aug 1, 2024

ok, nevermind the docker-compose ideas. Now second try for the original change but with full test coverage of the changed code:

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.

4 participants