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 substring search in tests #378
Conversation
|
[test-all] |
|
[test-all] |
|
@zmiklank This could be valid also for the other containers. |
|
The subscription should be solved now. [test-all] |
|
Seems like pino and prom are failing all across the board. |
ac2a7cd
to
764100b
Compare
|
[test-all] Edit: Seems like only prom is failing now. |
|
Sorry, I did not manage to look at this properly today. Will do it on monday. |
|
@lholmquist mentioned that he had run the prom-client tests locally and they all passed. |
|
Can you point us to a run with prom failing ? |
|
@mhdawson All the recent test runs failed. Eg. Fedora with Node 18 - https://artifacts.dev.testing-farm.io/9ba56c06-618d-4b76-9b47-44ad25fca646/ |
|
Thanks it was just not obvious to me where to find the runs from this issue. I'll try to look on Monday at the failures in the runs to see what's going on. |
f7c65a5
to
266bec3
Compare
|
First step - Tests all passed when run locally in Fedora 37 and Node.js 16.18.1 |
|
This is the failure: |
|
Looks like it is not failing running any of the tests but instead on style check |
|
I don't see the file it is complaining about in the github repo (https://github.com/siimon/prom-client |
|
@pkubatrh @phracek are the instructions for running the tests locally up to date? I've tried both with podman and with docker running make test TARGET=rhel8 VERSION=16 with docker I can't get it to download the containers, it just fails telling me it can't download ubi8/ubi-minimal. with podman I can get further but it still fails long before it starts to run the tests for the JavaScript packages. |
|
I can recreate the problem with this Dockerfile: FROM registry.access.redhat.com/ubi8/nodejs-16@sha256:1127129cb991f0be842e241265f0312642f36ec87f4a5a124d612468a7d966ea
LABEL "io.openshift.s2i.build.image"="quay.io/fedora/nodejs-18:18"
USER root
COPY ./prom-client /tmp/src
RUN chown -R 1001:0 /tmp/src
ENV NODE_ENV=development
USER 1001
RUN /usr/libexec/s2i/assembleIf I then do user1@fedora check]$ docker run -it mytest /bin/bash
bash-4.4$ npm test
> prom-client@14.1.1 test /opt/app-root/src
> npm run lint && npm run check-prettier && npm run compile-typescript && npm run test-unit
> prom-client@14.1.1 lint /opt/app-root/src
> eslint .
> prom-client@14.1.1 check-prettier /opt/app-root/src
> npm run run-prettier -- --check
> prom-client@14.1.1 run-prettier /opt/app-root/src
> prettier . .eslintrc "--check"
Checking formatting...
[warn] .config/configstore/update-notifier-npm.json
[warn] .npm/anonymous-cli-metrics.json
[warn] Code style issues found in 2 files. Forgot to run Prettier?
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! prom-client@14.1.1 run-prettier: `prettier . .eslintrc "--check"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the prom-client@14.1.1 run-prettier script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /opt/app-root/src/.npm/_logs/2023-02-13T22_27_05_950Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! prom-client@14.1.1 check-prettier: `npm run run-prettier -- --check`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the prom-client@14.1.1 check-prettier script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /opt/app-root/src/.npm/_logs/2023-02-13T22_27_05_962Z-debug.log
npm ERR! Test failed. See above for more details.
bash-4.4$ |
|
If I update my Docker file to be: That gives me two copies of the prom-client clone from GitHub.
If I run If I run This all makes sense to me. The tests for prom/opt/app-root/srcu-client don't expect a bunch of extra files generated by s2i when it checks the files in the directory. I think the tests which are run should not run from the The net is that I think the test framework needs to be fixed in order to resolve this. |
|
I'd still like to be able to run the tests locally so if you can help me do that I'll be able to investigate issues more easily in the future. I was able to do that in the past but not sure if there are new dependencies or what that prevent the |
|
@mhdawson thanks for looking into this! I do wonder how to tackle this issue with polluted directory. The way I see it we still want to test if the package works with our assemble scripts right? For the local build of the image - I expect both |
|
As a npm noobie, looking at prom's package.json (https://github.com/siimon/prom-client/blob/master/package.json#L16) I see we might be able to get around the issue by patching out the Edit: In the meantime I created such a patch and seems like it does the trick for me locally. |
|
[test-all] |
Yes, both works, however, I think the command should be |
8ff4ae3
to
368c69b
Compare
|
[test-all] |
|
Looks like that fixed the prom-client tests, but now pino has 1 failing tests 🤦 |
I had tried with both VERSION and VERSIONS |
I think that is good as a short term solution, but patching is going to be more work long term and we may run into the same issue with other packages. Figuring out a way to build/test when running |
@pkubatrh. Thanks for the offer will send you my file through email and if that is not enough I'll schedule a time to get together and maybe you can get me going. |
|
The pino tests pass running both locally and in a container for me. Not sure what about the test environment could be so different that the failure occurs on multiple containers. |
|
Last time I saw the pino failure, it was gone in the next run. Passing locally for me as well in a random combination out of the ones that failed in CI. |
|
The new cluster is up and ready. Let's try only OpenShift tests. [test-openshift] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as well.
|
On RHEL9 it seems like pino is failing in some different way: Any ideas? I managed to recreate the issue locally in a RHEL9 VM this time. |
|
Different failure when rerunning the tests today |
|
@pkubatrh I assume it never passed on RHEL9? I've tried ubi8/nodejs-16 - tests all pass So I can't find a ubi9 where that test ever passed. It also seems to be something about the RH Node.js as the test passes with community node.js in the same container were we see failures with the RH Node.js |
|
Opened a bug report for it: https://bugzilla.redhat.com/show_bug.cgi?id=2172910 Since it seems this test case never managed to pass for rhel9 nodejs, let's just merge it and make sure it gets fixed in future. |
No description provided.