Skip to content

fix [JENKINS-71060] Error: Tag length > 128 - #232

Open
Robbos wants to merge 1 commit into
jenkinsci:masterfrom
Robbos:tag-length-128-JENKINS-71060
Open

fix [JENKINS-71060] Error: Tag length > 128#232
Robbos wants to merge 1 commit into
jenkinsci:masterfrom
Robbos:tag-length-128-JENKINS-71060

Conversation

@Robbos

@Robbos Robbos commented Aug 26, 2026

Copy link
Copy Markdown

Ticket: jenkinsci/docker-workflow-plugin#706

This PR ensures we don't take the colon as part of the docker tag.
It lead to this error if the tag name was 128 chars long:

	at hudson.util.FormValidation._errorWithMarkup(FormValidation.java:274)
	at hudson.util.FormValidation.errorWithMarkup(FormValidation.java:260)
	at hudson.util.FormValidation.error(FormValidation.java:150)
	at PluginClassLoader for docker-commons//org.jenkinsci.plugins.docker.commons.credentials.ImageNameValidator.validateTag(ImageNameValidator.java:240)
	at PluginClassLoader for docker-commons//org.jenkinsci.plugins.docker.commons.credentials.ImageNameValidator.validateUserAndRepo(ImageNameValidator.java:117)
	at PluginClassLoader for docker-commons//org.jenkinsci.plugins.docker.commons.credentials.ImageNameValidator.checkUserAndRepo(ImageNameValidator.java:142)

Testing done

New unit test was added: testSplitUserAndRepo referring to the ticket JENKINS-71060.

I ran the project locally.
On master with this simple pipeline, it was failing with the error from JENKINS-71060,
On my branch it is not.
Feel free to double check with a simple pipeline like this

pipeline {
    agent any
    stages {
        stage('Docker test') {
            steps {
                script {
                    docker.build('dockerdev.myorg.com/dockerdev-local/myproduct0/demo-pipeline-hello-world:demo-pipeline-hello-world-github-myorgmyproduct0-org-demo-pipeline-test-2fab1234-56789_feat_ci_-a1b2c3d4e5f6789012345678abcdef01')
                }
            }
        }
    }
}

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

@Robbos
Robbos requested a review from a team as a code owner August 26, 2026 13:32
@Robbos
Robbos force-pushed the tag-length-128-JENKINS-71060 branch from 156b4d6 to 7b40e0f Compare August 27, 2026 10:00
@jglick

jglick commented Aug 27, 2026

Copy link
Copy Markdown
Member

docker-workflow is up for adoption, so PRs are unlikely to be looked at unless there is some critical regression (e.g., introduced by a containerd or Jenkins update) or something needed for the broader Jenkins ecosystem (e.g., Commons Lang 2 dep). This lib functionality applies only to that plugin so far as I know.

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.

2 participants