-
Notifications
You must be signed in to change notification settings - Fork 0
Add initial version of "Enhancements to referring to actions by commit hash" #1
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As it all-in-all is the approach I suggested, LGTM.
Just some nits. :-)
stored in the catalog are versioned by the major versions, so e.g. if a typing change is required because of a change in | ||
the action between v1.0 and v1.1, it may be a breaking change for the Kotlin binding consumer. | ||
|
||
To solve it, we could provide a way to freeze not only the action's commit has, but also the catalog typing's commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To solve it, we could provide a way to freeze not only the action's commit has, but also the catalog typing's commit | |
To solve it, we could provide a way to freeze not only the action's commit hash, but also the catalog typing's commit |
|
||
```kotlin | ||
@file:Repository("https://bindings.krzeminski.it") | ||
@file:DependsOn("actions:checkout__commit:v4.1.2__85e6279cec87321a52edac9c87bce653a07cf6c2") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@file:DependsOn("actions:checkout__commit:v4.1.2__85e6279cec87321a52edac9c87bce653a07cf6c2") | |
@file:DependsOn("actions:checkout___commit:v4.1.2__85e6279cec87321a52edac9c87bce653a07cf6c2") |
two underscores is sub-action, three underscores is version significance
``` | ||
|
||
Additionally, the bindings server would validate if the version ref (here: `v4.1.2`) points to the mentioned commit | ||
hash. Thanks to the extra validation, the user an extra assurance than with the YAML approach - the version is for sure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hash. Thanks to the extra validation, the user an extra assurance than with the YAML approach - the version is for sure | |
hash. Thanks to the extra validation, the user has an extra assurance than with the YAML approach - the version is for sure |
|
||
```kotlin | ||
@file:Repository("https://bindings.krzeminski.it") | ||
@file:DependsOn("actions:checkout__commit_lenient:v4.1.2__85e6279cec87321a52edac9c87bce653a07cf6c2") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@file:DependsOn("actions:checkout__commit_lenient:v4.1.2__85e6279cec87321a52edac9c87bce653a07cf6c2") | |
@file:DependsOn("actions:checkout___commit_lenient:v4.1.2__85e6279cec87321a52edac9c87bce653a07cf6c2") |
|
||
It's similar to the above approach, with these differences: | ||
* the version is just used to add a comment in the YAML - no validation is performed | ||
* the version is used to look up the typings in the catalog |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not really a difference.
With both approaches the typings should be lookupable in the catalog as described if the commit does not have typing information.
This mode is created to closer resemble how the YAML approach works. Because of no extra validation, it allows handling | ||
certain edge cases, when the commit hash is intentionally out of sync with the version. For example: the version tag was | ||
deleted because of a security vulnerability, and the user prefers to keep the action usage pinned to the commit hash to | ||
keep the workflow working, as opposed to failing in the consistency check job. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep the workflow working, as opposed to failing in the consistency check job. | |
keep the workflow working, as opposed to failing in the consistency check job. Or the user wants to use a newer hash with some fix that did not make it into a release yet. |
See typesafegithub/github-workflows-kt#1691.