Skip to content

Restrict trigger push branch for GitHub Workflow#5451

Open
apupier wants to merge 1 commit into
apache:masterfrom
apupier:restrictTriggerPushForGitHubWorkflow
Open

Restrict trigger push branch for GitHub Workflow#5451
apupier wants to merge 1 commit into
apache:masterfrom
apupier:restrictTriggerPushForGitHubWorkflow

Conversation

@apupier

@apupier apupier commented Jul 1, 2026

Copy link
Copy Markdown

What is the purpose of the change

Feature branches rarely need their own CI runs: the code is already tested when a pull request is opened against a release branch. If the push trigger has no branch restriction and pull_request is also configured, every push to a branch with an open PR runs the workflow twice: once for the push and once for the PR synchronisation.

Always give the push trigger an explicit list of branches: this stops branches created from a release branch from inheriting its workflow runs.

see https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=430408443#GitHubActionsRecommendedPractices-Restrictthepushtriggertospecificbranches

Related issues/PRs

Brief change log

Checklist

  • I have read the Contributing Guidelines on pull requests.
  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the Linkis mailing list first)
  • If this is a code change: I have written unit tests to fully verify the new behavior.

Feature branches rarely need their own CI runs: the code is already
tested when a pull request is opened against a release branch. If the
push trigger has no branch restriction and pull_request is also
configured, every push to a branch with an open PR runs the workflow
twice: once for the push and once for the PR synchronisation.

Always give the push trigger an explicit list of branches: this stops
branches created from a release branch from inheriting its workflow
runs.

see https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=430408443#GitHubActionsRecommendedPractices-Restrictthepushtriggertospecificbranches

Signed-off-by: Aurélien Pupier <apupier@ibm.com>
@apupier

apupier commented Jul 1, 2026

Copy link
Copy Markdown
Author

all the failures are unrelated to my changes:

[07105](https://github.com/apache/linkis/actions/runs/28510646714/job/84509860685?pr=5451#step:5:107106)
Error:  Failed to execute goal on project linkis-dist: Could not resolve dependencies for project org.apache.linkis:linkis-dist:pom:1.9.0-spark3: The following artifacts could not be resolved: org.apache.hadoop:hadoop-hdfs-client:jar:2.7.2 (absent): Could not find artifact org.apache.hadoop:hadoop-hdfs-client:jar:2.7.2 in central (https://repo.maven.apache.org/maven2) -> [Help 1]
2026-07-01T10:39:11.0062869Z [ERROR] Failed to execute goal on project linkis-dist: Could not resolve dependencies for project org.apache.linkis:linkis-dist:pom:1.9.0: The following artifacts could not be resolved: org.apache.hadoop:hadoop-hdfs-client:jar:2.7.2 (absent): Could not find artifact org.apache.hadoop:hadoop-hdfs-client:jar:2.7.2 in central (https://repo.maven.apache.org/maven2) -> [Help 1]
Error:  Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:2.24.1:check (default-cli) on project linkis-eureka: The following files had format violations:
Error:      src/main/java/org/apache/linkis/eureka/EurekaSecurityConfig.java
Error:          @@ -17,14 +17,15 @@
Error:           
Error:           package·org.apache.linkis.eureka;
Error:           
Error:          -import·org.slf4j.Logger;
Error:          -import·org.slf4j.LoggerFactory;
Error:           import·org.springframework.beans.factory.annotation.Value;
Error:           import·org.springframework.context.annotation.Bean;
Error:           import·org.springframework.context.annotation.Configuration;
Error:           import·org.springframework.security.config.annotation.web.builders.HttpSecurity;
Error:           import·org.springframework.security.web.SecurityFilterChain;
Error:           
Error:          +import·org.slf4j.Logger;
Error:          +import·org.slf4j.LoggerFactory;
Error:          +
Error:           @Configuration
Error:           public·class·EurekaSecurityConfig·{
Error:           
Error:  Run 'mvn spotless:apply' to fix these violations.
ERROR 1136 (21S01) at line 670 in file: './linkis-dist/package/db/linkis_dml.sql': Column count doesn't match value count at row 11

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.

1 participant