Skip to content

Conversation

@jdcasey
Copy link
Member

@jdcasey jdcasey commented Dec 4, 2021

We will always regenerate these, so always ignore them for upload.

We will always regenerate these, so always ignore them for upload.
@jdcasey jdcasey requested a review from ligangty December 4, 2021 16:23
Since handle_maven_uploading does BOTH uploads (with ignores) and regeneration of maven-metadata.xml files, we cannot see that those files were ignored in the initial upload. That's mainly because looking for ignored files involves listing the thing that was uploaded...but the metadata generation step will actually upload those anyway.

Instead, to check this, we can use the test_overlap_upload, and modify those archives to both contain maven-metadata.xml files and their corresponding sha1 files. If those metadata files are uploaded, they should collide.
@coveralls
Copy link

coveralls commented Dec 4, 2021

Pull Request Test Coverage Report for Build 1539325245

  • 5 of 5 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 81.487%

Totals Coverage Status
Change from base Build 1539065349: 0.04%
Covered Lines: 1118
Relevant Lines: 1372

💛 - Coveralls

@jdcasey jdcasey merged commit 8bc0cf6 into main Dec 4, 2021
@jdcasey jdcasey deleted the ignored-maven-metadata branch December 4, 2021 23:55
@ligangty
Copy link
Member

ligangty commented Dec 5, 2021

Um...I'm thinking why not use ignore_patterns "maven-metadata.xml.*" to filter out these files?

@jdcasey
Copy link
Member Author

jdcasey commented Dec 5, 2021

Does it filter on path or filename? I've been using path patterns, but couldn't get it to recognize an ignore pattern for these files.

But I guess more generally, why force configuration for something you know will always be true?

@jdcasey
Copy link
Member Author

jdcasey commented Dec 5, 2021

Actually, we do need this to filter on the total path (leaving off the root path or the target prefix path). Some files are hidden away in .nexus directories in the content we've extracted from that system, and we need a way to ignore them.

@ligangty
Copy link
Member

ligangty commented Dec 6, 2021

It is working on files but not paths, because I'm not sure if paths will contain repeated patterns which will cause wrong filter. For example, I'm not sure if this type of path will happen if we have ignore_pattern "ignored".
foo/bar/ignored/xxxx
but actually we just want to filter this type of path:
ignored/foo/bar/xxx
If we don't care about this case, I'll give a fix to let it address on full path.

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.

4 participants