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

Update php version for Debian 10 #323

Merged

Conversation

l00ptr
Copy link
Contributor

@l00ptr l00ptr commented Feb 1, 2021

PHP 7.4 is not packaged for Debian 10. The default version of php on Buster is 7.3

SUMMARY

Fix version of PHP

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

role zabbix_web

ADDITIONAL INFORMATION

This role doesn't work on Debian Buster the default PHP version is 7.3 and not 7.4

@dj-wasabi
Copy link
Contributor

Hi @l00ptr

Thank you for making a PR for this. Can you also update the lines:

https://github.com/ansible-collections/community.zabbix/blob/main/molecule/zabbix_web/molecule.yml#L58
https://github.com/ansible-collections/community.zabbix/blob/main/molecule/zabbix_web/molecule.yml#L64

It seems that this breaks the Molecule testing run. (I can not merge a PR with failing jobs)

I am not sure why the Ubuntu 18.04 jobs fails with this, maybe you have an idea?

Kind regards,
Werner

@l00ptr
Copy link
Contributor Author

l00ptr commented Feb 5, 2021

Don't know why the jobs fails on Ubuntu 18.04, i will have a look

@l00ptr
Copy link
Contributor Author

l00ptr commented Feb 5, 2021

don't know what's going on with ubuntu, but the probleme is not related to the PHP version


  
      def test_zabbix_api(host):
          my_host = host.ansible.get_variables()
          zabbix_url = str(my_host['zabbix_url'])
          hostname = 'http://' + zabbix_url + '/api_jsonrpc.php'
          post_data = '{"jsonrpc": "2.0", "method": "user.login", "params": { "user": "Admin", "password": "zabbix" }, "id": 1, "auth": null}'
          headers = 'Content-Type: application/json-rpc'
          command = "curl -XPOST -H '" + str(headers) + "' -d '" + str(post_data) + "' '" + hostname + "'"
  
          cmd = host.run(command)
  >       assert '"jsonrpc":"2.0","result":"' in cmd.stdout
  E       assert '"jsonrpc":"2.0","result":"' in '{"jsonrpc":"2.0","error":{"code":1,"message":"DB type \\"MYSQL\\" is not supported by current setup.","data":""},"id":1}'
  E        +  where '{"jsonrpc":"2.0","error":{"code":1,"message":"DB type \\"MYSQL\\" is not supported by current setup.","data":""},"id":1}' = CommandResult(command=b'curl -XPOST -H \'Content-Type: application/json-rpc\' -d \'{"jsonrpc": "2.0", "method": "user.... 0 --:--:-- --:--:-- --:--:--     0\r100   236    0   118  100   118   1573   1573 --:--:-- --:--:-- --:--:--  3146\n').stdout

I am gonna look deeper a little bit later :)

l00ptr and others added 4 commits February 26, 2021 13:49
PHP 7.4 is not packaged for Debian 10. The default version of php on Buster is 7.3
… in python2 (ansible-collections#322)

* fix the issue for the unicode strings doesn’t decode in python2

* add the integration test for ansible-collections#314

* add changelog file

* add the test for comparing the unicode ansible-collections#322 (comment)
We fix the php version for our tests on Debian Buster to 7.3 instead of 7.4
@l00ptr l00ptr force-pushed the fix-php-version-for-debian10 branch from 61d526f to c9e7400 Compare February 26, 2021 12:50
@codecov
Copy link

codecov bot commented Feb 26, 2021

Codecov Report

Merging #323 (c9e7400) into main (51630d7) will increase coverage by 0.12%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #323      +/-   ##
==========================================
+ Coverage   77.20%   77.32%   +0.12%     
==========================================
  Files          19       19              
  Lines        2685     2686       +1     
  Branches      689      690       +1     
==========================================
+ Hits         2073     2077       +4     
+ Misses        409      407       -2     
+ Partials      203      202       -1     
Impacted Files Coverage Δ
...ommunity/zabbix/plugins/modules/zabbix_template.py 77.99% <0.00%> (+1.24%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2f8c3a4...c9e7400. Read the comment docs.

@l00ptr
Copy link
Contributor Author

l00ptr commented Feb 26, 2021

@dj-wasabi we are a few people to hit this problem. The CI doesn't work with ubuntu (MySQL related problem).

Please check those PR :
#320
#330
#321

Do you have any clue about this problem ?

Best regards,
L.

@dj-wasabi
Copy link
Contributor

@dj-wasabi we are a few people to hit this problem. The CI doesn't work with ubuntu (MySQL related problem).

Please check those PR :
#320
#330
#321

Do you have any clue about this problem ?

Best regards,
L.

Hi @l00ptr

Yes I have seen it, but I was not able to find a solution for this yet. It seems (Actually 1 link) to be related to the php version of php-mysql, but I can not find a way to fix it. So I am open to suggestions for fixing it. 😄

@dj-wasabi dj-wasabi merged commit 313c159 into ansible-collections:main Mar 13, 2021
@dj-wasabi
Copy link
Contributor

Provided PR #344 to fix CI, so I will merge this PR.

Thanks! 👍

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