Skip to content

Fix [JenkinsTests JenkinsBuild] tests#11484

Merged
PyvesB merged 1 commit intobadges:masterfrom
PyvesB:fix-jenkins-build-tests-tests-examples
Nov 8, 2025
Merged

Fix [JenkinsTests JenkinsBuild] tests#11484
PyvesB merged 1 commit intobadges:masterfrom
PyvesB:fix-jenkins-build-tests-tests-examples

Conversation

@PyvesB
Copy link
Copy Markdown
Member

@PyvesB PyvesB commented Nov 8, 2025

Well, #11447 didn't last very long. sqlalchemy seems to be changing a lot of things on their Jenkins instance, I've seen a lot of disabled and deleted jobs. Let's stop using it in tests for the time being.

Eclipse JGit has been stable for years (see this test which is 6 years old:

.get('/build.json?jobUrl=https://ci.eclipse.org/jgit/job/jgit')
), let's use that in more places.

@PyvesB PyvesB added the keep-service-tests-green Related to fixing failing tests of the services label Nov 8, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 8, 2025

Messages
📖 ✨ Thanks for your contribution to Shields, @PyvesB!

Generated by 🚫 dangerJS against ab36dd2

t.create('build found (view)')
.get(
'/build.json?jobUrl=https://jenkins.sqlalchemy.org/view/alembic/job/alembic_coverage/',
'/build.json?jobUrl=https://ci.hibernate.org/view/Main/job/hibernate-search/job/main',
Copy link
Copy Markdown
Member Author

@PyvesB PyvesB Nov 8, 2025

Choose a reason for hiding this comment

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

The Eclipse JGit example doesn't support views, so I've gone with yet another example here.

But more interestingly, one might wonder why this test wasn't failing, even if https://jenkins.sqlalchemy.org/view/alembic/job/alembic_coverage/ no longer exists? The docs for Joi.string() indicate:

Generates a schema object that matches a string data type. Note that empty strings are not allowed by default and must be enabled with allow('').

The call to Joi.string().allow('unstable') was essentially allowing any string, and redundantly adding unstable to the permissive whitelist. Whatever was returned by the badge would always pass the test. Instead, we should use Joi.equal('unstable').

However, all this extra machinery is not necessary, as isBuildStatus already includes unstable:

const orangeStatuses = ['partially succeeded', 'unstable', 'timeout']

There are other places where we're misusing Joi.string().allow() in our codebase, I'll fix in a follow-up PR.

@PyvesB PyvesB added this pull request to the merge queue Nov 8, 2025
Merged via the queue into badges:master with commit 04cdc5e Nov 8, 2025
21 checks passed
@PyvesB PyvesB deleted the fix-jenkins-build-tests-tests-examples branch November 8, 2025 17:28
jNullj pushed a commit to jNullj/shields-fun-fork that referenced this pull request Jan 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

keep-service-tests-green Related to fixing failing tests of the services

Development

Successfully merging this pull request may close these issues.

2 participants