Skip to content

[BEAM-1219] Fixing test_default_job_name case#1702

Closed
pabloem wants to merge 2 commits intoapache:python-sdkfrom
pabloem:job_name_regexp
Closed

[BEAM-1219] Fixing test_default_job_name case#1702
pabloem wants to merge 2 commits intoapache:python-sdkfrom
pabloem:job_name_regexp

Conversation

@pabloem
Copy link
Member

@pabloem pabloem commented Dec 27, 2016

Be sure to do all of the following to help us incorporate your contribution
quickly and easily:

  • Make sure the PR title is formatted like:
    [BEAM-<Jira issue #>] Description of pull request
  • Make sure tests pass via mvn clean verify. (Even better, enable
    Travis-CI on your fork and ensure the whole test matrix passes).
  • Replace <Jira issue #> in the title with the actual Jira issue
    number, if there is one.
  • If this contribution is large, please file an Apache
    Individual Contributor License Agreement.

@pabloem
Copy link
Member Author

pabloem commented Dec 27, 2016

r: @aaltay

@aaltay
Copy link
Member

aaltay commented Dec 27, 2016

LGTM (please wait for the tests)

@asfbot
Copy link

asfbot commented Dec 27, 2016

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/6272/

Build result: FAILURE

[...truncated 10992 lines...] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)Caused by: org.apache.maven.plugin.MojoExecutionException: Command execution failed. at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:276) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) ... 31 moreCaused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404) at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166) at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:660) at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:265) ... 33 more2016-12-27T23:26:03.027 [ERROR] 2016-12-27T23:26:03.027 [ERROR] Re-run Maven using the -X switch to enable full debug logging.2016-12-27T23:26:03.027 [ERROR] 2016-12-27T23:26:03.027 [ERROR] For more information about the errors and possible solutions, please read the following articles:2016-12-27T23:26:03.027 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException2016-12-27T23:26:03.027 [ERROR] 2016-12-27T23:26:03.027 [ERROR] After correcting the problems, you can resume the build with the command2016-12-27T23:26:03.027 [ERROR] mvn -rf :beam-sdks-pythonchannel stoppedSetting status of 30862d0 to FAILURE with url https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/6272/ and message: 'Build finished. 'Using context: Jenkins: Maven clean install
--none--

@pabloem
Copy link
Member Author

pabloem commented Dec 27, 2016

@dhalperi could you merge this, Dan?
Note: Failures in Jenkins are not related to the Python SDK.

job_name = apiclient.Job.default_job_name(None)
regexp = 'beamapp-[a-z]*-[0-9]{10}-[0-9]{6}'
self.assertTrue(re.match(regexp, job_name))
regexp = 'beamapp-.*-[0-9]{10}-[0-9]{6}'
Copy link
Contributor

Choose a reason for hiding this comment

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

is it really any character or is it letters+other stuff? Is & legal, and > ?

Copy link
Member

Choose a reason for hiding this comment

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

That is a very good question.

That group matches the user name, it can contain arbitrary things and not all of them will make legal job names. If it is an invalid name it will fail in the validation phase but I think the default name should never be invalid.

I think this should be fixed in the default name creation. I do not think it needs to be fixed in this PR, but we at least need a JIRA for it.

Copy link
Member Author

Choose a reason for hiding this comment

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

As a note, this is also the default behavior in Java, with the only difference that in Python we also lowercase the whole job name.

@pabloem pabloem changed the title Fixing test_default_job_name case [BEAM-1219] Fixing test_default_job_name case Dec 28, 2016
asfgit pushed a commit that referenced this pull request Dec 28, 2016
@dhalperi
Copy link
Contributor

LGTM, merged

@pabloem pabloem closed this Dec 29, 2016
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.

5 participants