Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opendream-detected Errors, More Harddels, Slight CI Improvements #3572

Merged
merged 18 commits into from
Oct 25, 2024

Conversation

MarkSuckerberg
Copy link
Member

@MarkSuckerberg MarkSuckerberg commented Oct 16, 2024

About The Pull Request

I didn't get them all in my last PR, apparently. Also throws in some minor tweaks for ambiguity and such detected by the OpenDream parser since I was messing around with that at the time.

Also adds OpenDream linting to CI because why not.

Ports:
tgstation/tgstation#81892 (which is in turn from Para and Goon)
tgstation/tgstation#82029
BeeStation/BeeStation-Hornet#11464

tgstation/tgstation#86510
tgstation/tgstation#83255
tgstation/tgstation#78225
tgstation/tgstation#78265

Fixes: #3530

Why It's Good For The Game

Harddels still bad, OpenDream good

@github-actions github-actions bot added the Code change Watch something violently break. label Oct 16, 2024
@MarkSuckerberg MarkSuckerberg requested a review from a team as a code owner October 16, 2024 17:07
@github-actions github-actions bot added DME Edit GitHub Our very own Babylon. labels Oct 16, 2024
Copy link
Member

@FalloutFalcon FalloutFalcon left a comment

Choose a reason for hiding this comment

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

open dream.... so cool.....

@MarkSuckerberg MarkSuckerberg changed the title Opendream-detected Errors + More Harddels Opendream-detected Errors, More Harddels, Slight CI Improvements Oct 16, 2024
@MarkSuckerberg MarkSuckerberg requested a review from a team as a code owner October 16, 2024 18:08
@github-actions github-actions bot added the Sprites A bikeshed full of soulless bikes. label Oct 16, 2024
Copy link
Member

@FalloutFalcon FalloutFalcon left a comment

Choose a reason for hiding this comment

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

looks good, the unit test community is eating good.

@github-actions github-actions bot added the Merge Conflict Use Git Hooks, you're welcome. label Oct 16, 2024
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added TGUI and removed Merge Conflict Use Git Hooks, you're welcome. labels Oct 17, 2024
@MarkSuckerberg MarkSuckerberg mentioned this pull request Oct 17, 2024
@github-actions github-actions bot added the Merge Conflict Use Git Hooks, you're welcome. label Oct 18, 2024
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added Merge Conflict Use Git Hooks, you're welcome. and removed Merge Conflict Use Git Hooks, you're welcome. labels Oct 22, 2024
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the Merge Conflict Use Git Hooks, you're welcome. label Oct 23, 2024
@thgvr thgvr added this pull request to the merge queue Oct 24, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 24, 2024
MrMelbert and others added 17 commits October 25, 2024 01:08
This PR does a few things.

The main goal was to have it annotate the code like we do for `Run
Dreamchecker`, which it now does. The code for this was mostly
shamelessly ripped from the very same process I just mentioned, but
stripped down a lot more for the task. Since I had to write a lot more
code to handle the way we get warnings and the like from OpenDream, I
didn't fold both into one program.

![image](https://github.com/tgstation/tgstation/assets/34697715/f4a05b59-5407-412e-a73f-5c069fdb4b02)

![image](https://github.com/tgstation/tgstation/assets/34697715/0d3335aa-0da1-45ed-af19-1d17a7fc4174)

It works! Ta-da.

Anyways, in order to facilitate the code annotation, we need to use a
Python script. This Python script means that we need to use the
bootstrap, and the bootstrap is best used with the bootstrap cache. I
then realized that we should just really fold this special CI runner
into the Run Linters workflow anyways, instead of having it on its own
runner (since it'll cut into the number of runners we have available at
a time anyways).

I think it's a good way to save precious CPU cycles on our dying Earth,
and the issues are now visible enough to the average coder (in the
`Files Changed` tab) to where I feel pretty good about doing this.

There's a bit of weirdness and jank in the Python program, but it's all
done for a reason I assure you (it's always silly when stuff breaks
silently and no one knows to fix it until years later). You can look an
example of a failing run here:
https://github.com/san7890/bruhstation/actions/runs/8303759645/job/22728427623#step:17:14
Co-authored-by: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com>
Start gate means we only need to check `[ci skip]` once

Completion gate means we need only one status check in our rulesets.
This sets concurrency at the workflow level, which should provide a more
concise way to eject if a new commit is entered

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency

I've also added timeouts that are between 5-15 minutes per test. Default
is 360 minutes without this
This PR removes the "Annotate Lints" job step and merges it with the
"Run Linters" step above. To achieve this, I wrote a python script that
should be identical to the action. I even added the ability to read the
output from a file to the script if we ever needed that, but I decided
to have the job step pipe the output into the script instead.

It always bugged me a bit that we had to check the results for a
separate step if we wanted to see the linter results for dm code. I also
noticed a few people getting confused as to why their CI failed on
linters.

Turns out that the action is just a few lines that match the
dreamchecker output and reformat it to a format that GitHub can annotate
code with. It's so brain dead simple that it shouldn't need to be a
whole new step, and for the previous two reasons.
not playerfacing
Splits the big "Run Linters" step into multiple steps. Also since all of
these steps are independent of eachother, I've made them all run
regardless of if the job is currently failing.

<details>
<summary>Proof of testing:</summary>

Fail in install tools, all linting steps are skipped:
https://github.com/distributivgesetz/tgstation/actions/runs/6151628214/job/16692089726
Fail in Run DreamChecker, other steps continue to run:
https://github.com/distributivgesetz/tgstation/actions/runs/6151664705/job/16692203569?pr=2
</details>

<details>
<summary>Pictured: me breaking CI for a day</summary>

https://github.com/tgstation/tgstation/assets/47710522/ea12ad30-2b69-4aa3-9642-7d0818eab2d1

</details>

Going through the Run Linters step has always been a slog. Finding an
error is like finding a needle in a haystack. Seeing what command
exactly went wrong is going to go a long way in helping people find out
which linters have failed.

nothing playerfacing
Modern browsers run the ready script before the DOM is loaded. Also
future proofs us for when Lummox upgrades the web engine.

---------

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
@FalloutFalcon FalloutFalcon added this pull request to the merge queue Oct 25, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 25, 2024
@FalloutFalcon FalloutFalcon added this pull request to the merge queue Oct 25, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 25, 2024
@Sun-Soaked Sun-Soaked added this pull request to the merge queue Oct 25, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 25, 2024
@Sun-Soaked Sun-Soaked added this pull request to the merge queue Oct 25, 2024
Merged via the queue into shiptest-ss13:master with commit c38a3d2 Oct 25, 2024
17 checks passed
zimon9 pushed a commit to zimon9/Shiptest-PR-testing that referenced this pull request Oct 29, 2024
…ptest-ss13#3572)

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
I didn't get them all in my last PR, apparently. Also throws in some
minor tweaks for ambiguity and such detected by the OpenDream parser
since I was messing around with that at the time.

Also adds OpenDream linting to CI because why not.

Ports:
tgstation/tgstation#81892 (which is in turn from Para and Goon)
tgstation/tgstation#82029
BeeStation/BeeStation-Hornet#11464

tgstation/tgstation#86510
tgstation/tgstation#83255
tgstation/tgstation#78225
tgstation/tgstation#78265

Fixes: shiptest-ss13#3530 

## Why It's Good For The Game
Harddels still bad, OpenDream good

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com>
Co-authored-by: Jordan Dominion <Cyberboss@users.noreply.github.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: distributivgesetz <distributivgesetz93@gmail.com>
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
MrCat15352 pushed a commit to MrCat15352/MrCat that referenced this pull request Dec 27, 2024
…ptest-ss13#3572)

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->
I didn't get them all in my last PR, apparently. Also throws in some
minor tweaks for ambiguity and such detected by the OpenDream parser
since I was messing around with that at the time.

Also adds OpenDream linting to CI because why not.

Ports:
tgstation/tgstation#81892 (which is in turn from Para and Goon)
tgstation/tgstation#82029
BeeStation/BeeStation-Hornet#11464

tgstation/tgstation#86510
tgstation/tgstation#83255
tgstation/tgstation#78225
tgstation/tgstation#78265

Fixes: shiptest-ss13#3530
Harddels still bad, OpenDream good

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com>
Co-authored-by: Jordan Dominion <Cyberboss@users.noreply.github.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: distributivgesetz <distributivgesetz93@gmail.com>
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code change Watch something violently break. DME Edit GitHub Our very own Babylon. Sprites A bikeshed full of soulless bikes. TGUI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flaky test create_and_destroy: Cannot execute null.is holding().
9 participants