eclipse / xtext

Eclipse Xtext™ is a language development framework
http://www.eclipse.org/Xtext
Eclipse Public License 2.0
754 stars 317 forks source link

GH actions on pushes #3040

Open cdietrich opened 2 months ago

cdietrich commented 2 months ago

Hi @LorenzoBettini

i see no build started for [cd/jetty11021](https://github.com/eclipse/xtext/tree/cd/jetty11021) any idea?

LorenzoBettini commented 2 months ago

@cdietrich I suspect something is broken in your GitHub account/setting...

the problem seems to happen only to you. It started a few days ago if I recall correctly.

I've just pushed a branch https://github.com/eclipse/xtext/tree/lb_3001, and the GH Action has started on push.

Have you changed something in your settings recently? Or maybe it's some problem introduced by the Eclipse Foundation?

cdietrich commented 2 months ago

no i dont know anything. @eclipsewebmaster do you have an idea?

cdietrich commented 2 months ago

created https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/4640

LorenzoBettini commented 2 months ago

I don't know if it's related or simply delayed, but the PR build does not start on JIRO either https://github.com/eclipse/xtext/pull/3041 for you

cdietrich commented 2 months ago

In ci hitting scan repository now usually works

LorenzoBettini commented 2 months ago

In ci hitting scan repository now usually works

I still don't see that, neither in the PR...

cdietrich commented 2 months ago

IMG_0405

LorenzoBettini commented 2 months ago

Yes, but I meant I don't see the PR build on JIRO... maybe there we do the same on JIRO, not building internal PRs?

Anyway, the PR doesn't show the link to the build on JIRO.

cdietrich commented 2 months ago

Yes think so

fredg02 commented 2 months ago

i see no build started for cd/jetty11021 any idea?

I see two attempts that were skipped:

Not sure why they were skipped.

Or maybe it's some problem introduced by the Eclipse Foundation?

I'm not aware of any changes from our side that could have caused GH actions to be skipped.

FTR: There was an incident with GH actions recently: https://www.githubstatus.com/incidents/2bglpcjvg7xb

I don't know if it's related or simply delayed, but the PR build does not start on JIRO either https://github.com/eclipse/xtext/pull/3041 for you

Jenkins Multibranch pipeline scan log shows:

Checking pull request [#3041](https://github.com/eclipse/xtext/pull/3041)
    Submitted from origin repository, skipping
fredg02 commented 2 months ago

Side note: the xtext GH repo has not been using a webhook to trigger builds on their EF Jenkins instance. Instead, it relied on polling for changes every 2 minutes.

I have set up a new webhook that triggers builds on pushes and pull requests. The polling frequency has been adjusted to once per day, if not otherwise run (e.g. by the webhook trigger).

@cdietrich there are webhooks that don't seem to work any more (xtext-builds.itemis.de and hooks.slack.com). Can they be removed?

LorenzoBettini commented 2 months ago

@fredg02 some more information: PR jobs are intentionally skipped for internal PRs https://github.com/eclipse/xtext/blob/main/.github/workflows/maven.yml#L14

The problem is that for @cdietrich standard jobs for pushes are simply not started (they're not even skipped).

fredg02 commented 2 months ago

@fredg02 some more information: PR jobs are intentionally skipped for internal PRs https://github.com/eclipse/xtext/blob/main/.github/workflows/maven.yml#L14

Ok. That explains the behavior for PRs then.

The problem is that for @cdietrich standard jobs for pushes are simply not started (they're not even skipped).

I see that actions ran for recent commits from @cdietrich here https://github.com/eclipse/xtext/commits/cd-jetty11021 and https://github.com/eclipse/xtext/commits/main. Can you point me to a commit where actions were not started?

LorenzoBettini commented 2 months ago

@fredg02 some more information: PR jobs are intentionally skipped for internal PRs https://github.com/eclipse/xtext/blob/main/.github/workflows/maven.yml#L14

Ok. That explains the behavior for PRs then.

The problem is that for @cdietrich standard jobs for pushes are simply not started (they're not even skipped).

I see that actions ran for recent commits from @cdietrich here https://github.com/eclipse/xtext/commits/cd-jetty11021 and https://github.com/eclipse/xtext/commits/main. Can you point me to a commit where actions were not started?

@fredg02 I don't see any actions for recent @cdietrich commits you mentioned above. I only see the intended skipped jobs for PR, but I don't see the actions for pushes:

image

This is how it should look like

image

note the skipped jobs for PR, but the executed jobs for pushes.

What I'm saying is that jobs for pushes just don't appear (they're not skipped)

cdietrich commented 2 months ago

just pushed cd-xyzwithout a pr and nothing starts

fredg02 commented 2 months ago

@LorenzoBettini

It worked for at least for the merge commit here: image

For the other commits in the cd-jetty11021 branch, where one can still see the checks, the GH action attributes the commits to PRs and skips it.

cdietrich commented 2 months ago

and for cd-xyz?

fredg02 commented 2 months ago

just pushed cd-xyzwithout a pr and nothing starts

@cdietrich "nothing starts" is not what I see here:

image

CI build on Jenkins is pending, and GH actions are skipped since (again) they are (for some reason) recognized as pull request.

Instead of creating a new branch, can you commit and push a simple change to cd-xyz, e.g. add a whitespace in a readme file or something else that is not a code change?

LorenzoBettini commented 2 months ago

@fredg02 by trying to debug the thing more, it looks like it works only when @cdietrich commits to main, but not on any other branches.. if you look at the "Update to LSP4J 0.23.0. Fixes..." commit above, you'll see that build jobs were not started.

And we don't mean the build in JIRO. We do mean the jobs in GitHub Actions.

Sorry if I insist on this: the problem is not that the jobs corresponding to (pull request) are skipped. The problem is that the jobs corresponding to (push) are not even skipped: they just don't appear.

cdietrich commented 2 months ago

did a dummy change

cdietrich commented 2 months ago

how are the "Workflow permissions" configured in the repos settings?

fredg02 commented 2 months ago

if you look at the "Update to LSP4J 0.23.0. Fixes..." commit above, you'll see that build jobs were not started.

The build jobs were skipped, the checks say Build / build (pull_request) Skipped. This is different from "build jobs were not started".

image

What you were talking about, and I did not see and asking about was such a dummy commit (in the screenshot) where NOTHING (no checks) are running.

And at least for this case, there is a good reason here: https://github.com/eclipse/xtext/blob/main/.github/workflows/maven.yml#L6-L7

I had not noticed the path-ignores until after I asked @cdietrich to commit a change to a readme file. @cdietrich can you commit a dummy change that is not in a *.md file, please?

cdietrich commented 2 months ago

ok will change something else

fredg02 commented 2 months ago

how are the "Workflow permissions" configured in the repos settings?

Look normal to me. Nothing that should cause different behavior for different users.

cdietrich commented 2 months ago

hmmm now it starts

cdietrich commented 2 months ago

but in the jetty case i also changed other stuff.

cdietrich commented 2 months ago

hmmmm kinda redid the jetty change and now it starts too.

cdietrich commented 2 months ago

maybe there was something wrong with the polling

LorenzoBettini commented 2 months ago

Or the mentioned recent problem wasn't yet completely fixed...

LorenzoBettini commented 1 month ago

Side note: the xtext GH repo has not been using a webhook to trigger builds on their EF Jenkins instance. Instead, it relied on polling for changes every 2 minutes.

I have set up a new webhook that triggers builds on pushes and pull requests. The polling frequency has been adjusted to once per day, if not otherwise run (e.g. by the webhook trigger).

@fredg02 not related to this issue, but I guess your change is the cause of this new issue https://github.com/eclipse/xtext/issues/3049

currently, we are checking the build cause like that

currentBuild.getBuildCauses().toString().contains('BranchIndexingCause')

But of course, now this doesn't work anymore... could you please help us change the condition so that it is true when the event is a push?

I cannot seem to find documentation on the expected output of such obscure and untyped groovy calls...

thanks in advance

LorenzoBettini commented 1 month ago

Side note: the xtext GH repo has not been using a webhook to trigger builds on their EF Jenkins instance. Instead, it relied on polling for changes every 2 minutes. I have set up a new webhook that triggers builds on pushes and pull requests. The polling frequency has been adjusted to once per day, if not otherwise run (e.g. by the webhook trigger).

@fredg02 not related to this issue, but I guess your change is the cause of this new issue #3049

currently, we are checking the build cause like that

currentBuild.getBuildCauses().toString().contains('BranchIndexingCause')

But of course, now this doesn't work anymore... could you please help us change the condition so that it is true when the event is a push?

I cannot seem to find documentation on the expected output of such obscure and untyped groovy calls...

thanks in advance

Never mind: I fixed that