louiscad
11/16/2023, 5:12 AMresult
missing in Job
?
I'm trying to rewrite this in Kotlin, and I don't find how to do so properly.Piotr Krzemiński
11/16/2023, 5:27 AMJob
since there's needs.
in front. It's something new to me, it's in fact an unsupported context. As a short-term approach, try needs.${yourJob.id}.result
. Long-term, please create a feature request to add support for needs
context (so far we support these contexts).Vampire
11/16/2023, 7:39 AMPiotr Krzemiński
11/16/2023, 9:44 AMresult
- probably yes, should be added to Job
to return an expression "${this.id}.result"
. @louiscad do you fancy adding it?louiscad
11/16/2023, 10:04 AMnexus-actions
you see referenced in what I originally linked (in a separate PR)?Piotr Krzemiński
11/16/2023, 10:05 AMVampire
11/16/2023, 10:06 AMshould be added toNotto return an expressionJob
. @louiscad do you fancy adding it?"${this.id}.result"
needs.${this.id}.result
? Can you otherwise refer to the job result besides within needs
?Piotr Krzemiński
11/16/2023, 10:07 AMneeds
should be implicitjob.result
in other contexts than needs
louiscad
11/16/2023, 10:08 AMneeds
for all use cases where another job is referred to?Vampire
11/16/2023, 10:09 AMAlso, can I add Action Bindings for theYou should also try to make them add action typings too in that action, so that the typings are not needed to be maintained here.nexus-actions
louiscad
11/16/2023, 10:11 AMPiotr Krzemiński
11/16/2023, 10:12 AMDon't you needI can imagine a case where I want to access e.g. jobs ID somewhere in the logicfor all use cases where another job is referred to?needs
mbonnin
11/16/2023, 10:12 AMPiotr Krzemiński
11/16/2023, 10:12 AMneeds
explicit for nowlouiscad
11/16/2023, 10:13 AMVampire
11/16/2023, 10:14 AMI can imagine a case where I want to access e.g. jobs ID somewhere in the logicBut that would be
job.id
, wouldn't it? Not job.result
which then is ${job/this.id}.result
That said, I don't expect those actions to ever be touched again, so I'm not sure it's worth the complication.It is, it is not only meant for this action, but also as documentation for users and input for other automation tools yet to come 🙂
for yaml ? 😅@mbonnin yes, a simple additional yaml that defines the types for inputs and outputs of the action
mbonnin
11/16/2023, 10:17 AMVampire
11/16/2023, 10:19 AMmbonnin
11/16/2023, 10:20 AMVampire
11/16/2023, 10:20 AMCreated this for tracking https://github.com/nexus-actions/create-nexus-staging-repo/issues/7. I'm a bit under the waters right now but we'll add that eventuallyAs @louiscad wants to have it, maybe he will also come up with a PR for your repo
louiscad
11/16/2023, 10:22 AMmbonnin
11/16/2023, 10:22 AMVampire
11/16/2023, 10:24 AMPiotr Krzemiński
11/16/2023, 10:25 AMlouiscad
11/16/2023, 10:27 AMPiotr Krzemiński
11/16/2023, 10:35 AMneeds
- I think what we need to check is if it's possible to use my-job-id.result
alone, without needs.
in front. I'm busy right now, happy to revisit it in the evening - @louiscad could you create a ticket so that we keep track of it?louiscad
11/16/2023, 10:44 AMneeds
, I'm quite sure it doesn't work if omitted, but I will double-check.Piotr Krzemiński
11/16/2023, 10:45 AMjob-id.result
in some job's stepVampire
11/16/2023, 12:44 PMneeds
- I think what we need to check is if it's possible to use my-job-id.result
alone, without needs.
Yes, that was exactly my question, and my guess is, that it is not.
Because if you don't needs
it, it is also not guaranteed that it run before and finished already.
And within the same job it also does not make sense.
But we will see what Louis' experiments show.
> I'm also thinking about making higher level stuff going forward, so one can call a function, easily change a few parameters, and get a full workflow for complicated stuff like publishing to Maven Central
If you need some inspiration from excessive usage, you can have a look at https://github.com/Vampire/setup-wsl/blob/master/.github/workflows/test.main.kts 🙂louiscad
11/16/2023, 12:48 PMPiotr Krzemiński
11/16/2023, 12:48 PMVampire
11/16/2023, 12:59 PMI don't imagine having to check that as YAML 😨I had it in YAML before @louiscad, but also with a preprocessing step due to the lack of anchor support in GitHub's YAML implementation: https://github.com/Vampire/setup-wsl/commit/4eea7c92d6c56a39bfcebcdcb93be63388497f59#diff-e79daa51dba0aab57ebc5872b[…]bfb9d609beb0757b4373e2e2a6b9c8
louiscad
11/16/2023, 2:30 PMVampire
11/16/2023, 2:38 PMlouiscad
11/16/2023, 2:40 PM==
and !=
without a compiler pluginVampire
11/16/2023, 2:43 PMlouiscad
11/16/2023, 2:45 PMVampire
11/16/2023, 2:45 PMlouiscad
11/16/2023, 2:47 PMVampire
11/16/2023, 2:47 PMlouiscad
11/16/2023, 2:47 PMVampire
11/16/2023, 2:48 PMlouiscad
11/16/2023, 2:49 PMVampire
11/16/2023, 2:50 PMlouiscad
11/16/2023, 2:50 PMResult
class and have isSuccess()
, isNotSuccess()
, wasSkipped()
, wasNotSkipped()
, etcVampire
11/16/2023, 2:53 PMcondition
like here: https://github.com/Vampire/setup-wsl/blob/master/.github/workflows/test.main.kts#L241louiscad
11/16/2023, 2:53 PMVampire
11/16/2023, 2:55 PMPiotr Krzemiński
11/16/2023, 2:55 PMlouiscad
11/16/2023, 2:55 PMVampire
11/16/2023, 2:56 PMPiotr Krzemiński
11/16/2023, 2:57 PMlouiscad
11/17/2023, 11:30 AMPiotr Krzemiński
11/17/2023, 11:31 AMVampire
11/17/2023, 12:18 PMlouiscad
11/17/2023, 1:06 PMeq
and neq
infix? @VampireVampire
11/17/2023, 1:13 PMlouiscad
11/17/2023, 1:29 PMeq
and neq
for nowmbonnin
11/17/2023, 2:53 PMlouiscad
11/17/2023, 2:55 PMmbonnin
11/17/2023, 2:55 PMVampire
11/17/2023, 2:55 PMmbonnin
11/17/2023, 2:57 PMv1.3
. Is that important to github-workflows-kt
?louiscad
11/17/2023, 2:58 PMv1
tag should probably be renamed to v1.0
and v1
recreated to point to whatever the latest ismbonnin
11/17/2023, 2:59 PMlouiscad
11/17/2023, 2:59 PMmbonnin
11/17/2023, 2:59 PMlouiscad
11/17/2023, 3:00 PMmbonnin
11/17/2023, 3:00 PMPiotr Krzemiński
11/17/2023, 3:01 PMmbonnin
11/17/2023, 3:04 PMlouiscad
11/17/2023, 3:06 PMmbonnin
11/17/2023, 3:06 PMlouiscad
11/17/2023, 3:07 PMmbonnin
11/17/2023, 3:10 PMupdating the workflows is cumbersomeIt's a pet peeve of mine 😄
louiscad
11/17/2023, 3:11 PMmbonnin
11/17/2023, 3:36 PMlouiscad
11/17/2023, 3:36 PMmbonnin
11/17/2023, 3:37 PMlouiscad
11/17/2023, 3:39 PMv1.3
tagVampire
11/17/2023, 3:56 PMI'm against branches in GitHub actions
Oh my... Is GitHub actually recommending referencing a moving tag? Isn't that breaking build reproducibility 100%?@mbonnin exactly and imho that is a total no-go. That's why I do not have a rolling tag for the major version, but a branch for the major version and made Piotr accept that for this action too. 🙂 I also don't like having build results in VCS. So I indeed have a branch for the major version and on release merge
master
into that branch, and add the build artifacts only in that branch which is at least a bit cleaner imho than a rolling tag and having the build artifacts in the normal branches.
You can have a look at https://github.com/Vampire/setup-wsl if you like 🙂mbonnin
11/17/2023, 4:07 PMI think you're missing theIs that useful? I only kepttagv1.3
v1.1
and v1.2
for backward compat but I don't think they should be actually used anymore. Just use the path version vx.y.z
or the current major v1
. Is there a need for the current minor as well?Vampire
11/17/2023, 4:08 PMlouiscad
11/17/2023, 4:08 PMmbonnin
11/17/2023, 4:08 PMVampire
11/17/2023, 4:08 PMmbonnin
11/17/2023, 4:10 PMa branch for the major version and made Piotr accept that for this action toonice! I switched to that as well
Vampire
11/17/2023, 4:12 PMmbonnin
11/17/2023, 4:23 PMAlright, last 2 PRs done on my sideAnd all PRs should be merged and tags/branches pushed. Hope I didn't mess things up 🤞
Piotr Krzemiński
11/17/2023, 4:43 PMvN
where N
is an integer :) in the world of client-side binding generation (currently experimental) it will be possible to consume any action version, even a concrete commit hash, like in a pure YAML workflowlouiscad
11/17/2023, 5:32 PMPiotr Krzemiński
11/17/2023, 5:34 PMlouiscad
11/17/2023, 10:53 PMresult
of a job
, and my previous workflow runs in publishing (or failing to) several projects to Maven Central confirm it is working as documented, so I see no point in trying a made-up, undocumented way.
However, one interesting thing would be to check that the job looking at the result of another job indeed depends on said former job (via needs
) when generating the YAML. If you have ideas on how to implement this, let me know, but what we have in the PR is already better than the status quo IMO.Piotr Krzemiński
11/18/2023, 11:22 AMlouiscad
11/18/2023, 1:19 PMPiotr Krzemiński
11/18/2023, 2:35 PM