:tada: <v0.35.0 released!>
# github-workflows-kt
p
🎉 1
thanks @Vampire for fixing the YAML serialization bug! I'm curious if you'll be able to use DSL after this fix in Vampire/setup-wsl
v
Yeah, I'm still on converting, or rather picked up converting and thereby had that issue. 🙂
That actually used to work properly, but I guess with the switch to the proper YAML generator it broke
p
yeah, before using snakeyaml-engine I hand-crafted this stuff and apparently I got it correct back then, and now some edge cases surface. Hopefully it gets stable finally
one thought I have in mind if such errors keep appearing: err on the side of correctness and sacrifice YAML readability. Now I want to keep some balance, hence somewhat complicated logic for scalar serialization
v
Yep. I thought for a moment to PR just always using quotes. But decided to also keep the nicer result. 🙂 While it is probably also two errors on the snakeyaml side. I would have expected if you give empty string in, it would automatically use quotes as it does for a single colon as string. And the same for
"null"
, which would still need special casing in your lib to differ between
null
and
"null"
. I would have expected from snakeyaml
Copy code
strategy:
    matrix:
        distribution:
            - id: invalid
              label: invalid
            - id: ''
              label: ''
            - id: 'null'
              label: 'null'
Actually
false
and
true
might also be affected. At least the YAML schema validation is unhappy if there is
false
or
true
where a
String
is expected. Could be the same with other special values.
Also sad, that https://github.com/krzema12/github-workflows-kt/issues/296 was not fixed, I hoped it would be available in the meantime as I heavily use it in that workflow. 😄
p
ah, we’ve pushed forward https://github.com/krzema12/github-workflows-kt/issues/368 a bit instead, together with @jmfayard , as I figured you and generally people may benefit more from it
my bandwidth is unfortunately not as wide as I’d want for this project, hence the feature requests sit tight in the backlog. Contributions welcome 🙈 will find some time to review PRs
v
As always and everywhere 😄
p
exactly
 😅 anyway, I hope the project brings some value even in this state
v
exactly
 😅 anyway, I hope the project brings some value even in this state
Definitely 🙂
Btw. I'd say https://github.com/krzema12/github-workflows-kt/issues/616 is a third bug you should report to SnakeYaml. It should have worked fine, to have a linebreak, even within a GitHub expression, but SnakeYaml lost the necessary space. It generated
Copy code
role-to-assume: arn:aws:iam::12345678901234567890:role/github-actions-role/${{
  github.token }}
which is identical to
Copy code
role-to-assume: arn:aws:iam::12345678901234567890:role/github-actions-role/${{github.token }}
when it should have generated
Copy code
role-to-assume: arn:aws:iam::12345678901234567890:role/github-actions-role/${{
  \ github.token }}
to not loose the space.
Then the line length could be reduced again to a sane value 😄
p
makes sense, I couldn’t grasp this issue so I just made this fix. I’ll have a tracking ticket with all issues worth reporting to snakeyaml-engine. Or maybe do you have a moment to create such ticket and simply list what you think is worth reporting in an ordered way? I don’t have access to my regular laptop right now and I don’t want to forget about it (setting a Slack reminder anyway)
v
Btw. when working on the matrix support, would be nice if a matrix value could then also somehow impersonate as arbitrary input for actions if possible. Currently I have to do
Copy code
distribution = Distribution.Custom(expr("matrix.distribution.user-id")
So something like this would be marginally better / more type-safe:
Copy code
distribution = Distribution.Custom(expr { matrix.distribution.userId })
But still quite some boilerplate that could maybe be made nicer by magic from your lib. 🙂
p
Will do my best!
v
thanks @Vampire for fixing the YAML serialization bug! I'm curious if you'll be able to use DSL after this fix in Vampire/setup-wsl
It's done. 🙂 https://github.com/Vampire/setup-wsl/commit/4eea7c92d6c56a39bfcebcdcb93be63388497f59
p
Wohoo! Welcome aboard!