You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/10/01 19:52:00 UTC

[jira] [Work logged] (BEAM-5515) beam_Release_Gradle_NightlySnapshot failed

     [ https://issues.apache.org/jira/browse/BEAM-5515?focusedWorklogId=150135&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-150135 ]

ASF GitHub Bot logged work on BEAM-5515:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 01/Oct/18 19:51
            Start Date: 01/Oct/18 19:51
    Worklog Time Spent: 10m 
      Work Description: yifanzou closed pull request #6520: Do Not Merge. [BEAM-5515] fix beam java sdk nightly snapshot
URL: https://github.com/apache/beam/pull/6520
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.test-infra/jenkins/CommonJobProperties.groovy b/.test-infra/jenkins/CommonJobProperties.groovy
index 40725c42c2b..428ac0de449 100644
--- a/.test-infra/jenkins/CommonJobProperties.groovy
+++ b/.test-infra/jenkins/CommonJobProperties.groovy
@@ -63,14 +63,14 @@ class CommonJobProperties {
                                            String branch = 'master',
                                            int timeout = 100,
                                            boolean allowRemotePoll = true,
-                                           String jenkinsExecutorLabel =  'beam') {
+                                           boolean localPerfTest = false) {
     setTopLevelJobProperties(
             context,
             'beam',
             branch,
             timeout,
             allowRemotePoll,
-            jenkinsExecutorLabel)
+            localPerfTest)
   }
 
   // Sets common top-level job properties. Accessed through one of the above
@@ -80,7 +80,12 @@ class CommonJobProperties {
                                                String defaultBranch,
                                                int defaultTimeout,
                                                boolean allowRemotePoll = true,
-                                               String jenkinsExecutorLabel = 'beam') {
+                                               boolean localPerfTest = false) {
+    def jenkinsExecutorLabel = 'beam'
+    if (localPerfTest) {
+      jenkinsExecutorLabel = 'beam-perf'
+    }
+
     // GitHub project.
     context.properties {
       githubProjectUrl('https://github.com/apache/' + repositoryName + '/')
diff --git a/.test-infra/jenkins/PostcommitJobBuilder.groovy b/.test-infra/jenkins/PostcommitJobBuilder.groovy
index 460555fb368..45b841e64c4 100644
--- a/.test-infra/jenkins/PostcommitJobBuilder.groovy
+++ b/.test-infra/jenkins/PostcommitJobBuilder.groovy
@@ -35,15 +35,6 @@ class PostcommitJobBuilder {
     this.job = null
   }
 
-  /**
-   * Set the job details.
-   *
-   * @param nameBase Job name for the postcommit job, a _PR suffix added if the trigger is set.
-   * @param triggerPhrase Phrase to trigger jobs, empty to not have a trigger.
-   * @param githubUiHint Short description in the github UI.
-   * @param scope Delegate for the job.
-   * @param jobDefinition Closure for the job.
-   */
   static void postCommitJob(nameBase,
                             triggerPhrase,
                             githubUiHint,
@@ -51,9 +42,7 @@ class PostcommitJobBuilder {
                             jobDefinition = {}) {
     PostcommitJobBuilder jb = new PostcommitJobBuilder(scope, jobDefinition)
     jb.defineAutoPostCommitJob(nameBase)
-    if (triggerPhrase) {
-      jb.defineGhprbTriggeredJob(nameBase + "_PR", triggerPhrase, githubUiHint, false)
-    }
+    jb.defineGhprbTriggeredJob(nameBase + "_PR", triggerPhrase, githubUiHint, false)
   }
 
   void defineAutoPostCommitJob(name) {
diff --git a/.test-infra/jenkins/job_PostCommit_Java_Nexmark_Direct.groovy b/.test-infra/jenkins/job_PostCommit_Java_Nexmark_Direct.groovy
index 80dff3cd118..a2dc54c83d9 100644
--- a/.test-infra/jenkins/job_PostCommit_Java_Nexmark_Direct.groovy
+++ b/.test-infra/jenkins/job_PostCommit_Java_Nexmark_Direct.groovy
@@ -26,7 +26,7 @@ NoPhraseTriggeringPostCommitBuilder.postCommitJob('beam_PostCommit_Java_Nexmark_
   description('Runs the Nexmark suite on the Direct runner.')
 
   // Set common parameters.
-  commonJobProperties.setTopLevelMainJobProperties(delegate, 'master', 240, true, 'beam-perf')
+  commonJobProperties.setTopLevelMainJobProperties(delegate, 'master', 240, true, true)
 
   // Gradle goals for this job.
   steps {
diff --git a/.test-infra/jenkins/job_PostCommit_Java_Nexmark_Flink.groovy b/.test-infra/jenkins/job_PostCommit_Java_Nexmark_Flink.groovy
index 05434afabaf..e21f14d0968 100644
--- a/.test-infra/jenkins/job_PostCommit_Java_Nexmark_Flink.groovy
+++ b/.test-infra/jenkins/job_PostCommit_Java_Nexmark_Flink.groovy
@@ -26,7 +26,7 @@ NoPhraseTriggeringPostCommitBuilder.postCommitJob('beam_PostCommit_Java_Nexmark_
   description('Runs the Nexmark suite on the Flink runner.')
 
   // Set common parameters.
-  commonJobProperties.setTopLevelMainJobProperties(delegate, 'master', 240, true, 'beam-perf')
+  commonJobProperties.setTopLevelMainJobProperties(delegate, 'master', 240, true, true)
 
   // Gradle goals for this job.
   steps {
diff --git a/.test-infra/jenkins/job_PostCommit_Java_Nexmark_Spark.groovy b/.test-infra/jenkins/job_PostCommit_Java_Nexmark_Spark.groovy
index dbf2333c312..c6690f75c97 100644
--- a/.test-infra/jenkins/job_PostCommit_Java_Nexmark_Spark.groovy
+++ b/.test-infra/jenkins/job_PostCommit_Java_Nexmark_Spark.groovy
@@ -26,7 +26,7 @@ NoPhraseTriggeringPostCommitBuilder.postCommitJob('beam_PostCommit_Java_Nexmark_
   description('Runs the Nexmark suite on the Spark runner.')
 
   // Set common parameters.
-  commonJobProperties.setTopLevelMainJobProperties(delegate, 'master', 240, true, 'beam-perf')
+  commonJobProperties.setTopLevelMainJobProperties(delegate, 'master', 240, true, true)
 
   // Gradle goals for this job.
   steps {
diff --git a/.test-infra/jenkins/job_PostCommit_Website_Publish.groovy b/.test-infra/jenkins/job_PostCommit_Website_Publish.groovy
deleted file mode 100644
index 669a84abcfe..00000000000
--- a/.test-infra/jenkins/job_PostCommit_Website_Publish.groovy
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import CommonJobProperties as commonJobProperties
-import PostcommitJobBuilder
-
-
-// This job builds and publishes the website into the asf-site branch of the beam repo.
-PostcommitJobBuilder.postCommitJob('beam_PostCommit_Website_Publish', '',
-  'Website Publish', this) {
-
-  description('Publish generated website content into asf-site branch for hosting.')
-
-  // Set common parameters.
-  commonJobProperties.setTopLevelMainJobProperties(delegate, 'master', 30, true, 'git-websites')
-
-  // Gradle goals for this job.
-  steps {
-    gradle {
-      rootBuildScriptDir(commonJobProperties.checkoutDir)
-      tasks(':beam-website:clean')
-      tasks(':beam-website:publishWebsite')
-      commonJobProperties.setGradleSwitches(delegate)
-    }
-  }
-}
diff --git a/.test-infra/jenkins/job_Release_Gradle_NightlySnapshot.groovy b/.test-infra/jenkins/job_Release_Gradle_NightlySnapshot.groovy
index df1e29e16ca..89a0841b536 100644
--- a/.test-infra/jenkins/job_Release_Gradle_NightlySnapshot.groovy
+++ b/.test-infra/jenkins/job_Release_Gradle_NightlySnapshot.groovy
@@ -30,10 +30,10 @@ job('beam_Release_Gradle_NightlySnapshot') {
   commonJobProperties.setTopLevelMainJobProperties(delegate)
 
   // This is a post-commit job that runs once per day, not for every push.
-  commonJobProperties.setAutoJob(
-      delegate,
-      '0 7 * * *',
-      'dev@beam.apache.org')
+//  commonJobProperties.setAutoJob(
+//      delegate,
+//      '0 7 * * *',
+//      'dev@beam.apache.org')
 
 
   // Allows triggering this build against pull requests.
diff --git a/build.gradle b/build.gradle
index 63ee9d4d044..00415791724 100644
--- a/build.gradle
+++ b/build.gradle
@@ -63,7 +63,6 @@ buildscript {
     classpath "gradle.plugin.io.pry.gradle.offline_dependencies:gradle-offline-dependencies-plugin:0.3" // Enable creating an offline repository
     classpath "net.ltgt.gradle:gradle-errorprone-plugin:0.0.13"                                         // Enable errorprone Java static analysis
     classpath "com.github.ben-manes:gradle-versions-plugin:0.17.0"                                      // Enable dependency checks
-    classpath "org.ajoberstar.grgit:grgit-gradle:3.0.0-beta.1"                                          // Enable website git publish to asf-site branch
 
     // Plugins which require online access should not be enabled when running in offline mode.
     if (!gradle.startParameter.isOffline()) {
diff --git a/website/Rakefile b/website/Rakefile
index 5160bad45f5..c39a12e348e 100644
--- a/website/Rakefile
+++ b/website/Rakefile
@@ -3,7 +3,7 @@ require 'html-proofer'
 require 'etc'
 
 task :test do
-  HTMLProofer.check_directory("./generated-content", {
+  HTMLProofer.check_directory("./content", {
     :typhoeus => {
       :timeout => 60,
       :connecttimeout => 40 },
diff --git a/website/_config.yml b/website/_config.yml
index 4a421474a92..5b1444acab5 100644
--- a/website/_config.yml
+++ b/website/_config.yml
@@ -33,7 +33,7 @@ baseurl: ""
 
 # input and output directory
 source: src
-destination: generated-content
+destination: content
 
 # the base hostname & protocol for your site
 url: "https://beam.apache.org"
diff --git a/website/build.gradle b/website/build.gradle
index 7d22492e988..7f5892600c2 100644
--- a/website/build.gradle
+++ b/website/build.gradle
@@ -19,15 +19,9 @@
 // Define common lifecycle tasks and artifact types
 apply plugin: "base"
 
-// Publish website to asf-git branch.
-apply plugin: 'org.ajoberstar.grgit'
-
 def dockerImageTag = 'beam-website'
 def dockerWorkDir = "/repo"
-def buildDir = "${project.rootDir}/build/website"
-def buildContentDir = "${project.rootDir}/build/website/generated-content"
-def repoContentDir = "${project.rootDir}/website/generated-content"
-def commitedChanges = false
+def buildDir = "$project.rootDir/build/website"
 
 task buildDockerImage(type: Exec) {
   inputs.files 'Gemfile', 'Gemfile.lock'
@@ -76,7 +70,7 @@ task buildWebsite(type: Exec) {
   inputs.files 'Gemfile.lock', '_config.yml'
   inputs.dir 'src'
   outputs.dir "$buildDir/.sass-cache"
-  outputs.dir buildContentDir
+  outputs.dir "$buildDir/content"
   commandLine 'docker', 'exec',
     "${->startDockerContainer.containerId()}", '/bin/bash', '-c',
     """cd $dockerWorkDir/build/website && \
@@ -93,97 +87,20 @@ task testWebsite(type: Exec) {
   finalizedBy stopAndRemoveDockerContainer
 
   inputs.files "$buildDir/Rakefile"
-  inputs.dir buildContentDir
+  inputs.dir "$buildDir/content"
   commandLine 'docker', 'exec',
     "${->startDockerContainer.containerId()}", '/bin/bash', '-c',
     """cd $dockerWorkDir/build/website && \
       bundle exec rake test"""
 }
 
-check.dependsOn testWebsite
+/**
+ * Removed testWebsite from the Beam build dependency because it is broken and obsolete.
+ * See https://issues.apache.org/jira/browse/BEAM-5367 for more info.
+ */
+
+// check.dependsOn testWebsite
 
 task preCommit {
   dependsOn testWebsite
 }
-
-// Creates a new commit on asf-site branch
-task commitWebsite << {
-  assert file("${buildContentDir}/index.html").exists()
-  // Generated javadoc and pydoc content is not built or stored in this repo.
-  assert !file("${buildContentDir}/documentation/sdks/javadoc").exists()
-  assert !file("${buildContentDir}/documentation/sdks/pydoc").exists()
-
-  def git = grgit.open()
-  // get the latest commit on master
-  def latestCommit = grgit.log(maxCommits: 1)[0].abbreviatedId
-  git.checkout(branch: 'asf-site')
-
-  // Delete the previous content.
-  git.remove(patterns: [ 'website/generated-content' ])
-  assert !file("${repoContentDir}/index.html").exists()
-  delete repoContentDir
-
-  // Copy the built content and add it.
-  copy {
-    from buildContentDir
-    into repoContentDir
-  }
-  assert file("${repoContentDir}/index.html").exists()
-  git.add(patterns: ['website/generated-content'])
-
-  def currentDate = new Date().format('yyyy/MM/dd HH:mm:ss')
-  String message = "Publishing website ${currentDate} at commit ${latestCommit}"
-  if (git.status().isClean()) {
-    println 'No changes to commit'
-  } else {
-    println 'Creating commit for changes'
-    commitedChanges = true
-    git.commit(message: message)
-  }
-}
-
-
-/*
- * Pushes the asf-site branch commits.
- *
- * This requires write access to the asf-site branch and can be run on
- * Jenkins executors with the git-websites label.
- *
- * For more details on publishing, see:
- * https://www.apache.org/dev/project-site.html
- * https://github.com/apache/infrastructure-puppet/blob/deployment/modules/gitwcsub/files/config/gitwcsub.cfg
- *
- * You can test this locally with a forked repository by manually adding the
- * website-publish remote pointing to your forked repository, for example:
- *   git remote add website-publish git@github.com:${GITUSER}/beam.git
- * because the remote is only added if it doesn't exist. The remote needs
- * to be added before every execution of the publishing.
- */
-task publishWebsite << {
-  def git = grgit.open()
-  git.checkout(branch: 'asf-site')
-  if (!commitedChanges) {
-    println 'No changes to push'
-    return
-  }
-  if (!git.remote.list().find { it.name == 'website-publish' }) {
-    println "Adding website-publish remote"
-    // Cannot authenticate to the default github uri, so specify gitbox.
-    git.remote.add(name: 'website-publish',
-                   url: 'https://gitbox.apache.org/repos/asf/beam.git',
-                   pushRefSpecs: ['refs/heads/asf-site'])
-  }
-  // Because git.push() fails to authenticate, run git push directly.
-  exec {
-    executable 'sh'
-    args '-c', "git push website-publish asf-site"
-  } 
-  // Remove the remote. grgit does not have a remote.remove method.
-  exec {
-    executable 'sh'
-    args '-c', "git remote remove website-publish"
-  }
-}
-
-commitWebsite.dependsOn testWebsite
-publishWebsite.dependsOn commitWebsite


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 150135)
    Time Spent: 1h  (was: 50m)

> beam_Release_Gradle_NightlySnapshot failed
> ------------------------------------------
>
>                 Key: BEAM-5515
>                 URL: https://issues.apache.org/jira/browse/BEAM-5515
>             Project: Beam
>          Issue Type: Bug
>          Components: testing
>            Reporter: Ahmet Altay
>            Assignee: yifan zou
>            Priority: Major
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> [https://builds.apache.org/job/beam_Release_Gradle_NightlySnapshot/184/consoleFull]
>  
> *01:30:18* * What went wrong:*01:30:18* Execution failed for task ':beam-sdks-java-io-xml:publishMavenJavaPublicationToMavenRepository'.*01:30:18* > Failed to publish publication 'mavenJava' to repository 'maven'*01:30:18*    > Could not write to resource '
> [https://repository.apache.org/content/repositories/snapshots/org/apache/beam/beam-sdks-java-io-xml/2.8.0-SNAPSHOT/beam-sdks-java-io-xml-2.8.0-20180926.082948-14.jar]
> '.*01:30:18*       > Could not PUT '
> [https://repository.apache.org/content/repositories/snapshots/org/apache/beam/beam-sdks-java-io-xml/2.8.0-SNAPSHOT/beam-sdks-java-io-xml-2.8.0-20180926.082948-14.jar]
> '. Received status code 401 from server: Unauthorized



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)