Skip to content

Allow to use component.reference, component.sha, component.version and component.name - #1836

Merged
firecow merged 5 commits into
firecow:masterfrom
jrd:master
Jun 22, 2026
Merged

Allow to use component.reference, component.sha, component.version and component.name#1836
firecow merged 5 commits into
firecow:masterfrom
jrd:master

Conversation

@jrd

@jrd jrd commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

When including another component B from a component A, allow to use $[[ component.reference ]] notation for component B.

@jrd jrd changed the title Allow to use components.reference or components.sha Allow to use component.reference or component.sha Apr 20, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 1 file

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread src/parser-includes.ts Outdated
Comment thread src/parser-includes.ts Outdated
@firecow

firecow commented May 9, 2026

Copy link
Copy Markdown
Owner

Apply cubic's component\. suggestion — it's still open. And drop the compList.includes(...) check in getComponentValue; upstream GitLab doesn't require declaring spec.component, so just always allow reference, version, sha.

@jrd

jrd commented May 29, 2026

Copy link
Copy Markdown
Contributor Author

I updated my pull request, also borrowing the better idea from #1839

It should be all good now.

@jrd
jrd force-pushed the master branch 2 times, most recently from c72e5db to 2294253 Compare May 29, 2026 21:52
@jrd jrd changed the title Allow to use component.reference or component.sha Allow to use component.reference, component.sha, component.version and component.name May 29, 2026
Comment thread src/parser-includes.ts Outdated
@firecow

firecow commented May 31, 2026

Copy link
Copy Markdown
Owner

One behavior note (not blocking): getComponentSha runs a full git ls-remote on every remote component include, even when the template never uses $[[ component.sha ]]. Previously only semver ranges hit the network. Could the SHA be resolved lazily — only when the placeholder is actually present?

@jrd

jrd commented May 31, 2026

Copy link
Copy Markdown
Contributor Author

One behavior note (not blocking): getComponentSha runs a full git ls-remote on every remote component include, even when the template never uses $[[ component.sha ]]. Previously only semver ranges hit the network. Could the SHA be resolved lazily — only when the placeholder is actually present?

Yes, a lazy version is preferable in that case. I see what I can manage to do it in typescript. If I can find a better solution, a lambda/arrow function will do it.

[Edit] I think typescript have property, at least there is getter function in javascript, that could do the trick to compute it only when required.

@jrd

jrd commented May 31, 2026

Copy link
Copy Markdown
Contributor Author

@firecow Do you want me to squash the last two commits with the first one?

@firecow

firecow commented Jun 3, 2026

Copy link
Copy Markdown
Owner

@firecow Do you want me to squash the last two commits with the first one?

Nah, don't care.. I'll squash into master anyway

@jrd

jrd commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

So… what’s missing for merge?

jrd and others added 5 commits June 15, 2026 23:07
@jrd jrd mentioned this pull request Jun 15, 2026
@jrd
jrd requested a review from firecow June 15, 2026 21:19
@jrd

jrd commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Why no answer? Why not merge this?

@firecow
firecow merged commit 846456e into firecow:master Jun 22, 2026
23 checks passed
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Jul 9, 2026
This MR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Adoption](https://docs.renovatebot.com/merge-confidence/) | [Passing](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|---|---|
| [npm:gitlab-ci-local](https://github.com/firecow/gitlab-ci-local) | `4.72.0` → `4.73.0` | ![age](https://developer.mend.io/api/mc/badges/age/npm/gitlab-ci-local/4.73.0?slim=true) | ![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/gitlab-ci-local/4.73.0?slim=true) | ![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/gitlab-ci-local/4.72.0/4.73.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/gitlab-ci-local/4.72.0/4.73.0?slim=true) |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>firecow/gitlab-ci-local (npm:gitlab-ci-local)</summary>

### [`v4.73.0`](https://github.com/firecow/gitlab-ci-local/releases/tag/4.73.0)

[Compare Source](firecow/gitlab-ci-local@4.72.0...4.73.0)

#### What's Changed

- fix: prevent ENAMETOOLONG crash for long parallel:matrix job names by [@&#8203;gyanranjan](https://github.com/gyanranjan) in [#&#8203;1865](firecow/gitlab-ci-local#1865)
- fix: reject non-array needs with clear error by [@&#8203;firecow](https://github.com/firecow) in [#&#8203;1863](firecow/gitlab-ci-local#1863)
- A support for GPU by [@&#8203;zapadinsky](https://github.com/zapadinsky) in [#&#8203;1866](firecow/gitlab-ci-local#1866)
- fix: validate spec:inputs:regex instead of logging a no-op warning by [@&#8203;ApoorvaMohan](https://github.com/ApoorvaMohan) in [#&#8203;1869](firecow/gitlab-ci-local#1869)
- feat: support image.docker.platform by [@&#8203;inistor](https://github.com/inistor) in [#&#8203;1856](firecow/gitlab-ci-local#1856)
- Allow to use `component.reference`, `component.sha`, `component.version` and `component.name` by [@&#8203;jrd](https://github.com/jrd) in [#&#8203;1836](firecow/gitlab-ci-local#1836)

#### New Contributors

- [@&#8203;zapadinsky](https://github.com/zapadinsky) made their first contribution in [#&#8203;1866](firecow/gitlab-ci-local#1866)
- [@&#8203;ApoorvaMohan](https://github.com/ApoorvaMohan) made their first contribution in [#&#8203;1869](firecow/gitlab-ci-local#1869)
- [@&#8203;jrd](https://github.com/jrd) made their first contribution in [#&#8203;1836](firecow/gitlab-ci-local#1836)

**Full Changelog**: <firecow/gitlab-ci-local@4.72.0...4.73.0>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNTYuMCIsInVwZGF0ZWRJblZlciI6IjQzLjI1Ni4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiLCJhdXRvbWF0aW9uOmJvdC1hdXRob3JlZCIsImRlcGVuZGVuY3ktdHlwZTo6bWlub3IiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants