Nikky
04/18/2024, 12:12 PMGITHUB_TOKEN
when present in env like so
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
as show in githubs own examplePiotr Krzemiński
04/18/2024, 12:27 PMworkflow
DSL builder, traverse to the steps and extract the versions, like
val workflow = workflow(...) { }
workflow.checkIfNewerVersionsExist()
workflow.writeToFile()
• parse the resulting GitHub workflow YAML and extract versions from therePiotr Krzemiński
04/18/2024, 12:32 PMNikky
04/18/2024, 12:32 PMPiotr Krzemiński
04/18/2024, 12:37 PMPiotr Krzemiński
04/18/2024, 12:39 PMaction-versions-updates
• a simple extension function workflow.printActionVersionUpdates()
names TBDPiotr Krzemiński
04/18/2024, 12:43 PMNikky
04/18/2024, 7:51 PMNikky
04/18/2024, 7:52 PMPiotr Krzemiński
04/18/2024, 7:56 PMNikky
04/18/2024, 8:13 PMNikky
04/18/2024, 8:15 PMPiotr Krzemiński
04/19/2024, 5:59 AMUnresolved reference: http
- for some reason, JitPack uses Java 8 (openjdk version "1.8.0_252"
), and the HTTP client was added in 11. We have the toolchain version set to 11 here, but I think it only specifies which JDK should be used to build the actual app's logic, not the buildSrc
. So you need to tell JitPack to use a specific version of JDK to run Gradle in the first placePiotr Krzemiński
04/19/2024, 6:10 AMAwaitMavenCentralDeployTask.kt
file which contains Java 11-specific API since it's needed in the release pipeline onlyNikky
04/19/2024, 6:59 AMPiotr Krzemiński
04/19/2024, 10:50 AMNikky
04/19/2024, 10:54 AMavailable updates
and such but .. minor detailsNikky
04/19/2024, 10:55 AMNikky
04/19/2024, 10:56 AMNikky
04/19/2024, 11:00 AMNikky
04/19/2024, 11:17 AMNikky
04/19/2024, 11:20 AM$
in the urls in the markdown report i think
as far as i can tell this is ready for a release, in the future we can iterate on formatting easier once the base functionality is somewhere in a maven packagePiotr Krzemiński
04/19/2024, 11:21 AMNikky
04/19/2024, 11:26 AMPiotr Krzemiński
04/19/2024, 11:27 AMNikky
04/19/2024, 11:28 AMNikky
04/19/2024, 11:29 AMPiotr Krzemiński
04/19/2024, 11:30 AMNikky
04/19/2024, 11:39 AMPiotr Krzemiński
04/19/2024, 11:40 AMPiotr Krzemiński
04/19/2024, 12:26 PMNikky
04/19/2024, 12:26 PMPiotr Krzemiński
04/19/2024, 12:28 PMshared-internal
so that your PR is simplerNikky
04/20/2024, 11:29 AMPiotr Krzemiński
04/20/2024, 12:26 PMNikky
04/20/2024, 1:04 PMNikky
04/20/2024, 2:23 PMNikky
04/20/2024, 4:15 PMI moved away from JitPack in favor of Maven snapshotscan i use those in .main.kts scripts ? do you have a example ?
Nikky
04/20/2024, 6:21 PMPiotr Krzemiński
04/20/2024, 6:21 PMNikky
04/20/2024, 6:22 PMNikky
04/20/2024, 6:25 PMPiotr Krzemiński
04/20/2024, 6:33 PMNikky
04/20/2024, 6:38 PMNikky
04/20/2024, 6:40 PMNikky
04/20/2024, 6:43 PMktor-client-core
without using a BOM it is ktor-client-core-jvm
only the -jvm
variant actually contains the classes we need.. and scripting is not magically looking this upNikky
04/20/2024, 6:52 PMpublishToMavenlocal
who knows... the gradle specific hacks that kotlin uses for its multiplatform dependneies do not work atm however and ktor dependencies arePiotr Krzemiński
04/20/2024, 6:58 PMNikky
04/20/2024, 7:02 PMPiotr Krzemiński
04/22/2024, 8:46 AMNikky
04/22/2024, 11:45 AM/
is correctly replaced by __
, there was a issue with actions that are in folders like gradle/actions/setup-gradle
i made the logging detect the environment and only print the github specific stuff then, formatting of normal terminal output still needs improvement and feedback
maybe we want to move logging to shared-internal so it can be reused? or even into the main librry .. might be useful in logic stepsPiotr Krzemiński
04/22/2024, 11:49 AMNikky
04/22/2024, 11:55 AMPiotr Krzemiński
04/22/2024, 9:16 PMNikky
04/23/2024, 12:41 AMwe probably need to add an extra step to the consistency job to load the artifact to .m2 prior to compiling the script. This step would exist only for the purpose of the integration tests, so we could add a generic extension point to the library to customize the consistency check jobhttps://kotlinlang.slack.com/archives/C02UUATR7RC/p1713768525002489?thread_ts=1713701263.135969&cid=C02UUATR7RC
Piotr Krzemiński
04/23/2024, 5:45 AMPiotr Krzemiński
04/23/2024, 6:14 AMNikky
04/23/2024, 7:13 AMNikky
04/23/2024, 12:10 PMPiotr Krzemiński
04/23/2024, 12:10 PMPiotr Krzemiński
04/23/2024, 1:20 PMNikky
04/23/2024, 3:40 PMPiotr Krzemiński
04/23/2024, 3:50 PMWorkflow
with minimal API, and that prints something to the job's summary. If some requests appear to provide more customization, we'll consider it then. Even if you are willing to contribute to this module in the future, I'll technically own this code 🙂Nikky
04/23/2024, 3:52 PMNikky
04/23/2024, 4:01 PMPiotr Krzemiński
04/24/2024, 6:40 AMNikky
04/24/2024, 8:46 AMPiotr Krzemiński
04/24/2024, 8:47 AMNikky
04/24/2024, 9:15 AMNikky
04/24/2024, 9:16 AMPiotr Krzemiński
04/24/2024, 9:24 AMif (args[0] == "check-updates") {
workflow.checkForUpdates()
}
Piotr Krzemiński
04/24/2024, 9:25 AMPiotr Krzemiński
04/24/2024, 9:25 AMNikky
04/24/2024, 9:54 AMNikky
04/24/2024, 9:59 AMPiotr Krzemiński
04/24/2024, 9:59 AMPiotr Krzemiński
04/24/2024, 10:00 AMPiotr Krzemiński
04/24/2024, 10:01 AMsetGithubTokenInConsistencyCheckJob
help here? 😛Piotr Krzemiński
04/24/2024, 10:01 AMNikky
04/24/2024, 10:05 AMyamlConsistencyJobCondition
can we add a argument for a env ?
or pass it into writeYaml
?Nikky
04/24/2024, 10:05 AMPiotr Krzemiński
04/24/2024, 10:06 AMyamlConsistencyJobEnv: Map<String, String>
? LGTMPiotr Krzemiński
04/24/2024, 10:07 AMNikky
04/24/2024, 10:07 AMNikky
04/24/2024, 10:10 AMyamlConsistencyJobEnv
ideally it would be consolidated in one place
but .. this would be feedback for v2Piotr Krzemiński
04/24/2024, 10:11 AMyamlConsistencyJobProps
that would group theseNikky
04/24/2024, 10:13 AMPiotr Krzemiński
04/24/2024, 10:14 AMNikky
04/24/2024, 10:15 AMPiotr Krzemiński
04/24/2024, 10:17 AMmapOf
, the order is also de facto deterministic, but I haven't checked if the API guarantees it. So for now it's a bit more verbose linkedMapOf
, but for v2 I'm planning to check if we can make it regular maps across the APINikky
04/24/2024, 10:18 AMPiotr Krzemiński
04/24/2024, 10:24 AMNikky
04/24/2024, 10:34 AMNikky
04/24/2024, 10:42 AMval workflow = workflow() {}.reportVersionUpdates()
or suchPiotr Krzemiński
04/24/2024, 10:52 AMfun Workflow.reportAvailableUpdates(...)
, isn't it the same?Nikky
04/24/2024, 11:02 AMNikky
04/24/2024, 11:02 AMPiotr Krzemiński
04/24/2024, 11:20 AMNikky
04/24/2024, 11:23 AMNikky
04/24/2024, 11:24 AMNikky
04/24/2024, 11:31 AMPiotr Krzemiński
04/24/2024, 11:46 AMPiotr Krzemiński
04/24/2024, 11:47 AMNikky
04/24/2024, 11:55 AMPiotr Krzemiński
04/24/2024, 11:59 AMNikky
04/24/2024, 12:29 PMNikky
04/24/2024, 12:35 PMsnapshot-test.main.kts
depending on the snapshot, setting up java and running publishToMavenLocal
Piotr Krzemiński
04/24/2024, 1:25 PM...env
Nikky
04/24/2024, 1:29 PMPiotr Krzemiński
04/24/2024, 1:48 PMPiotr Krzemiński
04/24/2024, 1:49 PM.github/workflows
, apart from this the PR looks good!Nikky
04/24/2024, 1:49 PMPiotr Krzemiński
04/24/2024, 1:50 PMNikky
04/24/2024, 1:53 PMio.github.typesafegithub:action-versions-updates
which.. yeah.. not on this branchNikky
04/24/2024, 1:53 PMPiotr Krzemiński
04/24/2024, 1:53 PMPiotr Krzemiński
04/24/2024, 1:55 PMNikky
04/24/2024, 3:28 PMPiotr Krzemiński
04/24/2024, 3:51 PMPiotr Krzemiński
04/25/2024, 5:06 AMNikky
04/25/2024, 10:06 AMPiotr Krzemiński
04/25/2024, 10:09 AMPiotr Krzemiński
04/25/2024, 10:09 AMPiotr Krzemiński
04/25/2024, 10:10 AMto have outdated libraries in itwait, there's still some value in running this new module on a workflow with up-to-date actions! it just tests the logic and ensures it doesn't fail
Nikky
04/25/2024, 10:11 AMNikky
04/25/2024, 10:37 AMaction-versions-updates
was just what i came up with so i could start prototyping
maybe we want to change it ?Piotr Krzemiński
04/25/2024, 10:45 AMPiotr Krzemiński
04/25/2024, 10:45 AMPiotr Krzemiński
04/25/2024, 10:52 AMNikky
04/25/2024, 10:56 AMaction-updates-checker
, its better than what it had before...
also.. should the package for the single (maybe 2) exposed fnctions still be [...].workflows.updates
?Piotr Krzemiński
04/25/2024, 11:00 AMupdating
, no strong opinion hereNikky
04/25/2024, 11:05 AMimport io.github.typesafegithub.workflows.updates.reportAvailableUpdates
or import io.github.typesafegithub.workflows.updates.reportAvailableUpdatesInConsistencyCheck
Vampire
04/25/2024, 11:06 AMdo you like naming things?Not particularly, that is one of the hardest things in software development. 😄 Just look at how creatively I called my command framework. 😄
that will basically fill in for refreshVersions, just for action bindingsWould probably more handy to just extend refreshVersions with the functionality if possible. 😄
action-updates-checkerdoes not sound too bad to me 🙂
Piotr Krzemiński
04/25/2024, 11:07 AMWould probably more handy to just extend refreshVersions with the functionality if possible. 😄I think Nikky tried that, but abandoned the idea?
Nikky
04/25/2024, 11:07 AMNikky
04/25/2024, 11:08 AMVampire
04/25/2024, 11:09 AMPiotr Krzemiński
04/25/2024, 11:09 AMI'd rather not bundle this functionality in github-workflows-ktgithub-workflows-kt, not refreshVersions 😄 I don't care what happens in refreshVersions
Nikky
04/25/2024, 11:09 AMPiotr Krzemiński
04/25/2024, 11:10 AMPiotr Krzemiński
04/25/2024, 11:10 AMPiotr Krzemiński
04/25/2024, 11:10 AMNikky
04/25/2024, 11:11 AMPiotr Krzemiński
04/25/2024, 11:12 AMNikky
04/25/2024, 11:12 AMNikky
04/25/2024, 11:12 AMPiotr Krzemiński
04/25/2024, 11:12 AMNikky
04/25/2024, 11:14 AM@sample
https://github.com/NikkyAI/github-workflows-kt/blob/dev/action-updates-checker/src[…]/kotlin/io/github/typesafegithub/workflows/updates/Reporting.ktPiotr Krzemiński
04/25/2024, 11:15 AMworkflow { }
, and there will be some extension points so that one can tweak the Workflow
object before dumping to YAMLPiotr Krzemiński
04/25/2024, 11:15 AMNikky
04/25/2024, 11:15 AMNikky
04/25/2024, 11:16 AMPiotr Krzemiński
04/25/2024, 11:16 AMPiotr Krzemiński
04/25/2024, 11:17 AMNikky
04/25/2024, 11:17 AMNikky
04/25/2024, 11:20 AMNikky
04/25/2024, 11:20 AMPiotr Krzemiński
04/25/2024, 11:26 AMgithub token is required, but not set, skipping api calls
Even if there are no actions to be updated, shouldn't there be some message from the new module showing that it actually ran?Nikky
04/25/2024, 11:27 AMNikky
04/25/2024, 11:31 AMNikky
04/25/2024, 11:33 AMNikky
04/25/2024, 11:34 AMPiotr Krzemiński
04/25/2024, 11:35 AMGHWKT_RUN_STEP
env varNikky
04/25/2024, 11:52 AMPiotr Krzemiński
04/25/2024, 11:53 AMPiotr Krzemiński
04/25/2024, 11:55 AMNikky
04/25/2024, 11:56 AMPiotr Krzemiński
04/25/2024, 11:58 AMWorkflow
object, at the time of generating the workflow, not executing itNikky
04/25/2024, 11:58 AMNikky
04/25/2024, 12:01 PMworklfows-kt
to the script?
this kind of bothers me a bit.. that now people wouldnot need to add the main dependency because the new module adds it transitively..Piotr Krzemiński
04/25/2024, 12:02 PMcompileOnly
, I thinkPiotr Krzemiński
04/25/2024, 12:02 PMimplementation
Nikky
04/25/2024, 12:02 PMNikky
04/25/2024, 12:06 PMmavenLocal
makes this so much fasterPiotr Krzemiński
04/25/2024, 12:07 PMcompileOnly
for also shared-internal
, I'm afraid it may not work because if we ever drop depending on it from the main module, it won't be pulled in by anythingNikky
04/25/2024, 12:07 PMPiotr Krzemiński
04/25/2024, 12:08 PMimplementation
, and make a fair assumption that the new module is used as a supplement for the main oneNikky
04/25/2024, 12:08 PMPiotr Krzemiński
04/25/2024, 12:08 PMPiotr Krzemiński
04/25/2024, 12:08 PMPiotr Krzemiński
04/25/2024, 12:09 PMimplementation
👍Nikky
04/25/2024, 12:09 PMNikky
04/25/2024, 12:28 PMPiotr Krzemiński
04/25/2024, 12:33 PMNikky
04/25/2024, 12:33 PMPiotr Krzemiński
04/25/2024, 12:33 PMPiotr Krzemiński
04/25/2024, 12:33 PMNikky
04/25/2024, 12:34 PMNikky
04/25/2024, 12:35 PM__FILE__
Piotr Krzemiński
04/25/2024, 12:35 PMPiotr Krzemiński
04/25/2024, 12:36 PMNikky
04/25/2024, 12:55 PM.main.kts
scripts whenever it wanted)Nikky
04/25/2024, 12:59 PMPiotr Krzemiński
04/25/2024, 1:12 PMPiotr Krzemiński
04/25/2024, 1:15 PMNikky
04/25/2024, 1:18 PMPiotr Krzemiński
04/25/2024, 1:39 PMNikky
04/25/2024, 1:45 PMPiotr Krzemiński
04/25/2024, 1:45 PMNikky
04/25/2024, 1:46 PMNikky
04/25/2024, 1:47 PMPiotr Krzemiński
04/25/2024, 1:48 PM