Modify

Opened 21 months ago

Closed 21 months ago

Last modified 21 months ago

#22753 closed defect (fixed)

Fix GitHub actions

Reported by: stoecker Owned by: team
Priority: normal Milestone:
Component: Unit tests Version:
Keywords: github Cc:

Description

Could someone please fix the GitHub actions?

E.g. here 3 actions fail although they have no reason. It seems they are simply misconfigured.
https://github.com/JOSM/josm/pull/114

Also the relase checks fails since they have been implemented.

https://github.com/JOSM/josm/actions/runs/4197647762
Currently two tests fail: java-8 and 17 on windows.

If I need to fix something tell me, I'll do.

Running tests which constantly fail make no sense.

Attachments (0)

Change History (11)

comment:1 by taylor.smock, 21 months ago

In 18668/josm:

See #22753: Fix GitHub Actions

This *should* fix the failing Java 8 and Java 17 tests on Windows by forcing
the worker thread to finish instead of sending an empty call to the method,
under the assumption that the thread will sync (this works for only some test
threads).

comment:2 by taylor.smock, 21 months ago

In 18669/josm:

See #22753: Fix GitHub Actions

This drops the sync call in the test itself and makes it part of the worker
thread call.

comment:3 by taylor.smock, 21 months ago

E.g. here 3 actions fail although they have no reason. It seems they are simply misconfigured.

I'm going to to go through the actions (we have a lot of warnings now) and try and update or replace actions.

Of note, I don't think I would consider jwgmeligmeyling/checkstyle-github-action and jwgmeligmeyling/pmd-github-action as supported anymore, so we'll either have to find replacements or write our own.

Anyway, I've got some GH Action code setup for JOSM plugins (https://github.com/JOSM/JOSMPluginAction). I think we can reuse the setup-ant action from it and remove the ant install stuff we have in the JOSM copy.

comment:4 by taylor.smock, 21 months ago

Resolution: fixed
Status: newclosed

In 18670/josm:

Fix #22753: Fix GitHub Actions

This uses actions from https://github.com/JOSM/JOSMPluginAction, updates
other external actions and fixes many deprecation warnings.

EDIT: I made a change to fix the failing PMD job in the JOSMPluginAction repository. I didn't test against a PMD file with no issues...

Last edited 21 months ago by taylor.smock (previous) (diff)

comment:5 by stoecker, 21 months ago

Hmm, now all test failed, but actually I don't see why. Looks all fine to me and then comes a failed state.

comment:6 by taylor.smock, 21 months ago

The last commit I made appears to have done something. I haven't been able to get the 3 failing tests to fail locally, so I think the failing tests are due to an order change and state pollution. The test order is "deterministic, but intentionally non-obvious", so adding a new test class is probably why we have 3 failing tests (note: 1 of those is the new test, which passed locally when run by itself).

Anyway, the commit before last ( https://github.com/JOSM/josm/commit/645b955f9a366ccf29f28450ddc9f1877ba2c049 ) is fine except for the PMD job -- that was fixed in the action repo. If you want to, you can rerun that job.

Note -- those tests are failing in Jenkins as well, so it isn't limited to GitHub CI.

in reply to:  6 ; comment:7 by stoecker, 21 months ago

Replying to taylor.smock:

Note -- those tests are failing in Jenkins as well, so it isn't limited to GitHub CI.

Ooops. Forgot to look. I looked at the GitHub log and wasn't able to see the reason. Jenkins (this time) shows the failure.

Anyway the feature "show relevant results" is missing in both interfaces... ;-)

in reply to:  7 ; comment:8 by taylor.smock, 21 months ago

Replying to stoecker:

Ooops. Forgot to look. I looked at the GitHub log and wasn't able to see the reason. Jenkins (this time) shows the failure.

No worries. The test failure was totally unexpected on my part. Especially since it was 3 tests instead of the single test I had just added. The simple fix is easy (add the @HTTP annotation, but looking at the defaults for JosmTestRules, it might be better to add the extension by default).

Anyway the feature "show relevant results" is missing in both interfaces... ;-)

I have no clue what "show relevant results" would be in this case.

If you wanted failed tests, there is a non-intuitive way to get to the JUnit output from the failed job (click on Summary -> scroll to bottom -> For more details on these failures, see this check. (this check is a link).

If you wanted PMD/checkstyle issues, they will appear in the PR (in the Files changed tab). I don't think we have any active PRs that have the new workflow and have PMD/checkstyle issues, but they will be really obvious when looking through the changed files. During testing, it did show PMD/checkstyle issues in a file that wasn't changed in my test PR, so I could probably hack something together to highlight the test that failed the same way the PMD/checkstyle jobs are highlighting issues.

in reply to:  8 comment:9 by stoecker, 21 months ago

Replying to taylor.smock:

Anyway the feature "show relevant results" is missing in both interfaces... ;-)

I have no clue what "show relevant results" would be in this case.

Whenever I look at Jenkins or GitHub I have to click there and there and look there and there until I find what's relevant. Intuitive interfaces are something else. After a longer learning curve you are able to shorten the work, but that's simply "accept the crap" :-)

comment:10 by taylor.smock, 21 months ago

Fair enough.

comment:11 by gaben, 21 months ago

Keywords: github added
Summary: Fix HitHub actionsFix GitHub actions

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.