Skip to content
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

fix(gitlabci): Support named services #9732

Merged

Conversation

caiofbpa
Copy link
Contributor

Changes:

This PR makes Renovate recognize named services in .gitlab-ci.yml.

Context:

Resolve #9731

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added unit tests, or
  • No new tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@caiofbpa caiofbpa changed the title Fix GitLabCI named services recognition fix: GitLabCI named services recognition Apr 27, 2021
lib/manager/gitlabci/extract.spec.ts Outdated Show resolved Hide resolved
lib/manager/gitlabci/extract.ts Outdated Show resolved Hide resolved
@viceice viceice changed the title fix: GitLabCI named services recognition fix(gitlabci): Support named services Apr 27, 2021
@viceice
Copy link
Member

viceice commented Apr 27, 2021

@zharinov What do you think is better for parsing yaml? Creating a custom moo lexer or use a yaml-js and replace non supported tokens before?

I like to get rid of the complex regex, which are pretty hard to read and understand.

@zharinov
Copy link
Collaborator

My plan is to extract configurable lexer fabric that is meant to support generic lexical features of languages, while being liberal with unknown fragments. And I'm thinking of indent-based languages too.

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
@caiofbpa
Copy link
Contributor Author

caiofbpa commented Apr 27, 2021

@viceice I've accepted your first suggestion to simplify the test, thanks!

I'm not sure what could be done with the regex in this PR, using what @zharinov mentioned sounds like a refactor to be done later.

What do you think? Could this PR be merged as is?

@zharinov
Copy link
Collaborator

Yes I think, current regular expressions are my requirements for future lexer refactoring

lib/manager/gitlabci/extract.ts Outdated Show resolved Hide resolved
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
@caiofbpa
Copy link
Contributor Author

@viceice you're right, I left those *s by accident actually. Regex is so hard to read that it slipped through. I just double checked the cases you mentioned and a couple more with a regex REPL, should be fine now.

@viceice viceice enabled auto-merge (squash) April 27, 2021 13:39
@viceice viceice disabled auto-merge April 27, 2021 13:39
@viceice viceice enabled auto-merge (squash) April 27, 2021 13:40
@viceice viceice merged commit 3d29ce3 into renovatebot:main Apr 27, 2021
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 25.4.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2021
@caiofbpa caiofbpa deleted the fix-gitlab-ci-named-service-recognition branch June 1, 2021 13:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Renovate doesn't recognize dependency in .gitlab-ci.yml when service has verbose name
4 participants