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

Path filtering should produce a commit ID based on the last commit to touch the filtered paths #643

Open
Tobias-08 opened this issue Aug 23, 2021 · 3 comments

Comments

@Tobias-08
Copy link

Hi,
we are using pathFilter to increment versions only for affected components in a monorepo structure. This is working fine regarding the height but the behavior of commit ID for non-public releases is different to what (at least) I expected.

Given a monorepo with /componentA and /componentB subdirectories and according pathFilter configurations. Assuming a commit in /componentA-subfolder:

  • Current behavior
    • height+1 and new commit ID for componentA (expected)
    • height+0 for componentB (expected), but also new commit ID (not expected)
  • Expected behavior
    • commit ID only changes if the commit falls in the range of the pathFilter

Does this make sense or am I missing something?

@AArnott
Copy link
Collaborator

AArnott commented Aug 28, 2021

Interesting that you bring this up now, because only this week someone internally on my own team seemed to have hit this too. I agree the commit ID (including both its direct appearance when PublicRelease=false and also its indirect presence in the 4th integer of certain versions) should be the last commit to have touched the filtered paths.

@saul, how do you feel about this? If you agree, do you think you could find time to make this enhancement? (it doesn't have to be immediately).

@AArnott AArnott changed the title Behavior of pathFilter and commit ID Path filtering should produce a commit ID based on the last commit to touch the filtered paths Aug 28, 2021
@AArnott
Copy link
Collaborator

AArnott commented Aug 28, 2021

Maybe we should only use that path-filter based commit ID for package versions, but keep the real (HEAD) commit ID in other places like the AssemblyInformationalVersion attribute. I'm open to suggestions here.

@Tobias-08
Copy link
Author

I would prefer using the same (path-filter based) commit ID in all versions in order to have a consistent behavior. That said my primary focus is the package version so that a differing approach that might be better for the majority is fine for me, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants