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

Integration test script failures #1374

Open
n-jay opened this issue Jun 14, 2024 · 11 comments · Fixed by #1391
Open

Integration test script failures #1374

n-jay opened this issue Jun 14, 2024 · 11 comments · Fixed by #1391
Labels
bug Something isn't working

Comments

@n-jay
Copy link
Contributor

n-jay commented Jun 14, 2024

Describe the bug
run_integration_test.sh script fails causing CI pipeline to fail.

To Reproduce
Run the run_integration_test.sh script or initiate the packaging-pipeline workflow in Github Actions.

Expected behavior
Integration test script runs successfully causing packaging-pipeline workflow to succeed.

Screenshots
Selection_255

Version Number
0.25

Additional context
Failure is triggered by the following line in the integration test script:

container=$(docker compose ps --all --format json | jq ".[] | select(.Service==\"$1\")")

Cause is docker compose ps --format json no longer returning a JSON array after v2.21,

@n-jay n-jay added the bug Something isn't working label Jun 14, 2024
@n-jay n-jay changed the title Integration test script failure Integration test script failures Jun 14, 2024
@n-jay
Copy link
Contributor Author

n-jay commented Jun 14, 2024

@DiegoTavares there seems to be another issue popping up with the script's database migration portion after the jq command issue was resolved.

image

Any thoughts on what the reason might be for mismatch in values? Will create a separate PR to fix that.

verify_migration_versions() {
migrations_in_db=$(docker compose exec -e PGUSER=cuebot db psql -Aqtc "SELECT COUNT(*) FROM flyway_schema_history")
migrations_in_code=$(ls cuebot/src/main/resources/conf/ddl/postgres/migrations/ | wc -l | tr -d ' ')
if [[ ${migrations_in_db} = ${migrations_in_code} ]]; then
log INFO "Database and code both contain ${migrations_in_db} migrations (PASS)"
else
log ERROR "Database contains ${migrations_in_db} migrations, code contains ${migrations_in_code} (FAIL)"
exit 1

@bcipriano
Copy link
Collaborator

Any thoughts on what the reason might be for mismatch in values?

You'll want to dump the two migration lists to see where the discrepancy is -- something like SELECT * FROM flyway_schema_history to dump the full list from the db, and the list of files in migrations/.

I seem to remember running into this in the past but I don't remember the ultimate cause.

@n-jay
Copy link
Contributor Author

n-jay commented Jun 14, 2024

You'll want to dump the two migration lists to see where the discrepancy is

Noted @bcipriano. Will try that out. Thanks!

EDIT:
Seems like V18_Add_New_Indexes is the odd one out from the list of files:
Selection_257

Should this be removed from the migrations directory or added to the flyway_schema_history?

@DiegoTavares
Copy link
Collaborator

DiegoTavares commented Jun 20, 2024

Part os the issue is fixed. There seems to no longer exist a migration issue. but the pipeline is still failing on the cuebot build step. The error I see when running manually is:

Invocation of init method failed; nested exception is java.lang.IllegalStateException: Missing embedded postgres binaries

Looking online, the exception I'm getting locally might be caused by running on the apple silicon.

@n-jay
Copy link
Contributor Author

n-jay commented Jun 20, 2024

@DiegoTavares I was just attempting to run the script to see if everything was working. 😅

but the pipeline is still failing on the cuebot build step. The error I see when running manually is:

I feel like its better we keep this issue open until we get the whole thing running successfully.
I'll try and see what this exception is about on my end as well.

EDIT:
By Cuebot build step do you mean the Dockerfile build?

docker build -t opencue/cuebot -f cuebot/Dockerfile . &>"${TEST_LOGS}/docker-build-cuebot.log"

@DiegoTavares
Copy link
Collaborator

@DiegoTavares I was just attempting to run the script to see if everything was working. 😅

but the pipeline is still failing on the cuebot build step. The error I see when running manually is:

I feel like its better we keep this issue open until we get the whole thing running successfully. I'll try and see what this exception is about on my end as well.

EDIT: By Cuebot build step do you mean the Dockerfile build?

docker build -t opencue/cuebot -f cuebot/Dockerfile . &>"${TEST_LOGS}/docker-build-cuebot.log"

Yes

@DiegoTavares
Copy link
Collaborator

DiegoTavares commented Jun 20, 2024

Now looking at the error on the repo pipeline, it happens after the cuebot docker build step, so was looking at the wrong thing. The error is on the test_pycue() on run_integration_test. Fix coming soon

@n-jay
Copy link
Contributor Author

n-jay commented Jun 20, 2024

@DiegoTavares did you run this locally? Seems like that step is passing in the CI pipeline with the latest changes.
https://github.com/AcademySoftwareFoundation/OpenCue/actions/runs/9602218280/job/26482575373?pr=1309
According to this the error seem to be with the jq command. Seems to be within the test_pycue() function, but have to verify.

EDIT:

Looking online, the exception I'm getting locally might be caused by running on the apple silicon.

Saw this now. Seems like that might be the case.

@DiegoTavares
Copy link
Collaborator

Integration tests got fixed by #1392
Now working on the Sonar pipeline failure

@DiegoTavares
Copy link
Collaborator

Based on the sonar exception, it looks like the version of sonarqube we are using is incompatible with java 8:

org/sonar/batch/bootstrapper/EnvironmentInformation has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

@bcipriano Do you know if there has been any changes on the sonar pipeline recently that might have caused this incompatibility?

@bcipriano
Copy link
Collaborator

Commented over on your Sonarcloud PR -- no changes that I know of but it looks like the image we're using is pretty old so if it's easy to just upgrade the image let's do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants