Conversation
CI here was .travis.yml, targeting OTP 18.3 through 21.0. Travis stopped serving open source projects in 2021, so nothing has run against this repo since. This replaces it with a GitHub Actions workflow that compiles and runs eunit on OTP 26, 27 and 28 -- 26 being what chef-server currently pins, with 27 and 28 covered so regressions show up before that pin moves. Three things had to be fixed before the suite could run at all. eper blocked the test profile. It is a debugging tool, not a test dependency: it is declared in rebar.config and referenced nowhere in src/ or test/. Its upstream was last pushed in 2018, and prfPrc.erl matches on the float 0.0, which OTP 26 warns about on behalf of OTP 27. warnings_as_errors turns that into a failure, so `rebar3 eunit` did not get as far as running a test. Removed. Most of the suite is not a unit test. opscoderl_ibrowse_test_, multi_request_test and process_leak_test make live requests to a dozen third-party hosts -- google.com, www.sun.com, yaws.hyber.org, www.httpwatch.com, jigsaw.w3.org (eighteen times) and others -- and assert HTTP 200 from them. As a merge gate that fails whenever one of those is slow, moved or gone, and three already fail on OTP 26 because ssl now defaults to verify_peer and those requests supply no CA certs. They are kept and can be run by setting OPSCODERL_HTTPC_NETWORK_TESTS=1; by default the workflow runs only the deterministic suites. request_error_test_ only passed because something else ran first. It calls oc_httpc:add_pool/2, which needs pooler running, but its setup started only ibrowse -- pooler was started by opscoderl_ibrowse_test_'s setup. Skipping the network suites surfaced that immediately as two cancelled tests. Its setup now starts pooler itself. Verified in containers: 3 tests, 0 failures on OTP 26, 27 and 28, and 34 tests with OPSCODERL_HTTPC_NETWORK_TESTS=1 (3 failing, on the TLS change described above). Dialyzer is included but not a gate. Four warnings stand on main: three are lager's parse transform expanding into lager:do_log/10, lager:md/0 and lager_config:get/2, which dialyzer cannot resolve -- removing lager clears all three -- and one is pooler:time_spec/0, a type pooler uses internally but never exports, so oc_httpc's spec refers to something that is not public. Once both are addressed the job should drop continue-on-error and gate. .gitignore gains _build/ and rebar.lock; its existing entries (deps/, ebin/, .eunit) are rebar2's, so a rebar3 build leaves the tree dirty. Signed-off-by: Tim Smith <tim@mondoo.com>
Owner
Author
|
Verification complete — the workflow runs green (OTP 26/27/28 pass, dialyzer reports informationally without failing the run). Closing; the real PR is chef#22. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Temporary PR against my own fork to confirm the workflow in chef#22 actually runs. Will be closed once it reports.