question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow semi-permanent selection of a subset of projects

See original GitHub issue

🚀 Feature Proposal

Add the possibility to select a subset of the projects defined in .meta so that commands executed have an effect only on those.

Motivation

As a maintainer/developer of 50+ microservices, I have frequently the need to select and work only on a subset of those based on criteria X. This is a temporary filter that lasts only for the time needed to implement a feature, for example.

Example

In a meta-repository, the user could create a .meta-filter file that contains the projects to work on, either separated by a comma or new-line. Once this file is present, meta will apply all commands issued only to this subset of projects so that, for example, I can run npm install --save my-updated-library@new-version only in the projects I know need that update. Then I can commit and open a Merge Request via other commands for those repositories only. Once I am done I can remove the file and meta behaves normally.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:7

github_iconTop GitHub Comments

2reactions
patrickleetcommented, Oct 7, 2021

you can also execute things inline

meta exec "npm install --save my-updated-library@new-version" --include-only=$(sh get-node-projects.sh)

I’ve done something like this in the past - created a script that returns each folder name that contains package.json - you could even grep for a particular package.

2reactions
patrickleetcommented, Oct 7, 2021

We’ve talked about something similar a few times.

I have frequently the need to select and work only on a subset of those based on criteria X. This is a temporary filter that lasts only for the time needed to implement a feature, for example.

FWIW, this can be accomplished with an environment variable in a single shell

export PROJECTS=one,two,three
meta git status --include-only=$PROJECTS

If you’re ok with changing the .meta file with current projects (which would be committed to git) may I suggest a workaround that you can use to accomplish this today?

Makefile
PROJECTS?=one,two,three
COMMAND?=git status

meta:
	meta $(COMMAND) --include-only=$(PROJECTS)
> COMMAND="exec pwd" make meta 
# command that's run: meta exec pwd --include-only=one,two,three

or

PROJECTS=one COMMAND="exec pwd" make meta

And when you want to change the default set you could update that in the Makefile.

I agree the syntax could be nicer by including it in meta, but I think it probably accomplishes the task.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Selecting subsets of projects - Rush.js
The projects selected by this command are A , B , and E : ... Rush allows you to omit the scope for...
Read more >
Issues · mateodelnorte/meta - GitHub
Allow semi-permanent selection of a subset of projects enhancement ... Allow use of main as primary branch in edge cases like migrate enhancement...
Read more >
Load a subset of projects - Visual Studio (Windows)
Right-click on your solution and select Show Unloaded Projects or Hide Unloaded Projects. · Select the solution node to enable the Show All...
Read more >
Governance rules! The principles of effective project governance
Assign ownership and accountability for project governance.​​ More than an individual, a select group of experienced resources should be assigned to deliver, ...
Read more >
PMP Exam Chapter 3 Basics of Project Management - quiz only
LGd PMP® Exam Prep Course - Projects have unique charters, goals and defined start and end dates. Operations have semi-permanent charters, semi-permanent ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found