feat: run all step scripts, passing output data from previous scripts to next#161
feat: run all step scripts, passing output data from previous scripts to next#161levibostian merged 2 commits intomainfrom
Conversation
decafRunning deployments in test mode. Results will appear below. ...🟩 squash 🟩 merge method... 🚢 The next version of the project will be: 0.13.0 Learn moreLatest release: 0.12.1 Commit of latest release: 3100912 Commits since last release: - feat: run all step scripts, passing output data from previous scripts to next Related GitHub Issues<!-- Link to any related GitHub issues that this pull request addresses or closes. --> Problem<!-- A clear description of the problem that this pull request is solving. --> There are scripts that I want to write where they do one specific thing, like getting the Git commit hash from a different branch for a release. For example, if you use a main branch and a latest branch. But I don't want to have any bias towards the single source of truth of where it's stored. So, if we have this feature that allows you to run a script that gets the latest version from the single source of truth, then I can run another script after it to tweak some of that output data to point to the latest commit on the main branch, for example. Solution<!-- Describe the approach you took to solve the problem and the changes made in this pull request. --> Modify the step runner logic to run all scripts for every step. Previously, we would exit early at the very first script that had valid data, but we changed that logic to run all of them. The final output is the cumulative result of all of them. Essentially, what that means is that if a script runs and it simply can't find anything or it just can't give a valid output for any reason, then if it outputs a partial object, like only some of the properties, not all of them, or if it returns an empty object, undefined, or whatever, we just throw that output away and continue to use the combined result from the previous steps. Testing<!-- Choose one of the below options for how you tested the code change. Include any specific setup or instructions for testing. -->
I do plan on testing this out in a project of mine before merging, too. Notes for reviewers<!-- If there is any additional information you would like to share with the person reviewing this pull request, please provide it here. --> This PR contains the following updates:
| Release Notesgranodigital/report-annotate (granodigital/report-annotate)What's Changed
Full Changelog: Full Changelog: Configuration📅 Schedule: Branch creation - "every weekend" in timezone 🚦 Automerge: Enabled. ♻ Rebasing: Whenever PR is behind base branch, or you tick the 🔕 Ignore: Close this PR and you won't be reminded about this update
This PR was generated by Mend Renovate. Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> This PR contains the following updates:
Release Notesdenoland/deno (deno)
(#32889)
(#32714)
(#32980)
(#32917)
(#32927)
(#32885)
(#32958)
(#32874)
(#32811)
(#32911)
(#32842)
Configuration📅 Schedule: Branch creation - "every weekend" in timezone 🚦 Automerge: Enabled. ♻ Rebasing: Whenever PR is behind base branch, or you tick the 🔕 Ignore: Close this PR and you won't be reminded about this update
This PR was generated by Mend Renovate. Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> This PR contains the following updates:
Configuration📅 Schedule: Branch creation - "every weekend" in timezone 🚦 Automerge: Enabled. ♻ Rebasing: Whenever PR is behind base branch, or you tick the 🔕 Ignore: Close this PR and you won't be reminded about this update
This PR was generated by Mend Renovate. Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> This PR contains the following updates:
Release Notesdenoland/deno (deno)
(#32808)
(#32817)
(#32806)
(#32572)
(#32749)
(#32702)
(#32599)
(#32713)
(#32325)
(#32618)
(#32791)
(#32606)
(#32535)
(#32244)
(#32632)
(#32450)
(#32776)
Configuration📅 Schedule: Branch creation - "every weekend" in timezone 🚦 Automerge: Enabled. ♻ Rebasing: Whenever PR is behind base branch, or you tick the 🔕 Ignore: Close this PR and you won't be reminded about this update
This PR was generated by Mend Renovate. Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> ...🟩 rebase 🟩 merge method... 🚢 The next version of the project will be: 0.13.0 Learn moreLatest release: 0.12.1 Commit of latest release: 3100912 Commits since last release: - feat: run all step scripts, passing output data from previous scripts via command line args This feature was already implemented in: 97d2c09 But I didn't like the design where we're passing the data from one script to the next using the input JSON data. I don't like that design because it makes the scripts very much like a black box. Part of the design of Decaf is that a beginner could look at the config files and get a decent idea of what's going on. I want to be more transparent and straightforward. So, I'm changing the design with this commit. Rather than passing the previous script output into it with the JSON input, we instead just give it to you with the command template so you can inject it from there. why? There are scripts that I want to write where they do one specific thing, like getting the Git commit hash from a different branch for a release. For example, if you use a main branch and a latest branch. But I don't want to have any bias towards the single source of truth of where it's stored. So, if we have this feature that allows you to run a script that gets the latest version from the single source of truth, then I can run another script after it to tweak some of that output data to point to the latest commit on the main branch, for example. solution: Modify the step runner logic to run all scripts for every step. Previously, we would exit early at the very first script that had valid data, but we changed that logic to run all of them. The final output is the cumulative result of all of them. Essentially, what that means is that if a script runs and it simply can't find anything or it just can't give a valid output for any reason, then if it outputs a partial object, like only some of the properties, not all of them, or if it returns an empty object, undefined, or whatever, we just throw that output away and continue to use the combined result from the previous steps. testing: automated tests. I do plan on testing this out in a project of mine before merging, too. This PR contains the following updates:
| Release Notesgranodigital/report-annotate (granodigital/report-annotate)What's Changed
Full Changelog: Full Changelog: Configuration📅 Schedule: Branch creation - "every weekend" in timezone 🚦 Automerge: Enabled. ♻ Rebasing: Whenever PR is behind base branch, or you tick the 🔕 Ignore: Close this PR and you won't be reminded about this update
This PR was generated by Mend Renovate. Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> This PR contains the following updates:
Release Notesdenoland/deno (deno)
(#32889)
(#32714)
(#32980)
(#32917)
(#32927)
(#32885)
(#32958)
(#32874)
(#32811)
(#32911)
(#32842)
Configuration📅 Schedule: Branch creation - "every weekend" in timezone 🚦 Automerge: Enabled. ♻ Rebasing: Whenever PR is behind base branch, or you tick the 🔕 Ignore: Close this PR and you won't be reminded about this update
This PR was generated by Mend Renovate. Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> This PR contains the following updates:
Configuration📅 Schedule: Branch creation - "every weekend" in timezone 🚦 Automerge: Enabled. ♻ Rebasing: Whenever PR is behind base branch, or you tick the 🔕 Ignore: Close this PR and you won't be reminded about this update
This PR was generated by Mend Renovate. Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> This PR contains the following updates:
Release Notesdenoland/deno (deno)
(#32808)
(#32817)
(#32806)
(#32572)
(#32749)
(#32702)
(#32599)
(#32713)
(#32325)
(#32618)
(#32791)
(#32606)
(#32535)
(#32244)
(#32632)
(#32450)
(#32776)
Configuration📅 Schedule: Branch creation - "every weekend" in timezone 🚦 Automerge: Enabled. ♻ Rebasing: Whenever PR is behind base branch, or you tick the 🔕 Ignore: Close this PR and you won't be reminded about this update
This PR was generated by Mend Renovate. Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
… to next why? There are scripts that I want to write where they do one specific thing, like getting the Git commit hash from a different branch for a release. For example, if you use a main branch and a latest branch. But I don't want to have any bias towards the single source of truth of where it's stored. So, if we have this feature that allows you to run a script that gets the latest version from the single source of truth, then I can run another script after it to tweak some of that output data to point to the latest commit on the main branch, for example. solution: Modify the step runner logic to run all scripts for every step. Previously, we would exit early at the very first script that had valid data, but we changed that logic to run all of them. The final output is the cumulative result of all of them. Essentially, what that means is that if a script runs and it simply can't find anything or it just can't give a valid output for any reason, then if it outputs a partial object, like only some of the properties, not all of them, or if it returns an empty object, undefined, or whatever, we just throw that output away and continue to use the combined result from the previous steps. testing: automated tests. I do plan on testing this out in a project of mine before merging, too.
… via command line args This feature was already implemented in: 97d2c09 But I didn't like the design where we're passing the data from one script to the next using the input JSON data. I don't like that design because it makes the scripts very much like a black box. Part of the design of Decaf is that a beginner could look at the config files and get a decent idea of what's going on. I want to be more transparent and straightforward. So, I'm changing the design with this commit. Rather than passing the previous script output into it with the JSON input, we instead just give it to you with the command template so you can inject it from there.
ff53cec to
ab52881
Compare
Related GitHub Issues
Problem
There are scripts that I want to write where they do one specific thing, like getting the Git commit hash from a different branch for a release. For example, if you use a main branch and a latest branch. But I don't want to have any bias towards the single source of truth of where it's stored.
So, if we have this feature that allows you to run a script that gets the latest version from the single source of truth, then I can run another script after it to tweak some of that output data to point to the latest commit on the main branch, for example.
Solution
Testing
I do plan on testing this out in a project of mine before merging, too.
Notes for reviewers