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

Update maven download urls #208

Merged
merged 23 commits into from
Jul 16, 2024
Merged

Update maven download urls #208

merged 23 commits into from
Jul 16, 2024

Conversation

JonoYang
Copy link
Member

@JonoYang JonoYang commented Nov 3, 2023

No description provided.

@JonoYang JonoYang force-pushed the update-maven-download-urls branch 4 times, most recently from 7b0a7fc to 146ca02 Compare November 8, 2023 03:04
@JonoYang JonoYang force-pushed the update-maven-download-urls branch from 7e13b87 to 142e7b0 Compare November 15, 2023 20:47
JonoYang added 21 commits July 10, 2024 12:13
Signed-off-by: Jono Yang <[email protected]>
Signed-off-by: Jono Yang <[email protected]>
    * Do this when we cannot find a package download url using existing purl values

Signed-off-by: Jono Yang <[email protected]>
    * Create command to update or create package from the maven index

Signed-off-by: Jono Yang <[email protected]>
Signed-off-by: Jono Yang <[email protected]>
    * Append to ProcessError table whenever we encounter a package we cant create or update in update_maven_package_data

Signed-off-by: Jono Yang <[email protected]>
    * Deindent code block

Signed-off-by: Jono Yang <[email protected]>
Signed-off-by: Jono Yang <[email protected]>
Signed-off-by: Jono Yang <[email protected]>
    * Remove unused code

Signed-off-by: Jono Yang <[email protected]>
@JonoYang JonoYang force-pushed the update-maven-download-urls branch from c8293d4 to dc76cc2 Compare July 10, 2024 19:14
    * Remove vendored virtualenv.pyz

Signed-off-by: Jono Yang <[email protected]>
Copy link
Member

@AyanSinhaMahapatra AyanSinhaMahapatra left a comment

Choose a reason for hiding this comment

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

@JonoYang LGTM, thanks!
See comments for some questions.



# This is from https://stackoverflow.com/questions/4856882/limiting-memory-use-in-a-large-django-queryset/5188179#5188179
class MemorySavingQuerysetIterator(object):
Copy link
Member

Choose a reason for hiding this comment

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

Is this being used here in this command?
Also maybe we want to have some sort of utils and have this class there as this can be used else where too, like it's used in packagedb/management/commands/fix_purl_values.py

Copy link
Member Author

Choose a reason for hiding this comment

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

I've moved this to minecode/utils.py. This is only use in fix_purl_values.py for now, but I think this is a useful piece of code when we run into memory problems.



def query_sha1_on_maven(sha1, timeout=DEFAULT_TIMEOUT):
maven_api_search_url = f'https://search.maven.org/solrsearch/select?q=1:{sha1}'
Copy link
Member

Choose a reason for hiding this comment

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

We have an issue here on this: #498 what do you think about this?

Copy link
Member

@keshav-space keshav-space left a comment

Choose a reason for hiding this comment

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

Thanks @JonoYang, LGTM!
Few nits for your consideration.

@JonoYang JonoYang force-pushed the update-maven-download-urls branch from e32299b to 4aa19f2 Compare July 11, 2024 19:54
@JonoYang JonoYang merged commit 6498c87 into main Jul 16, 2024
8 checks passed
@JonoYang JonoYang deleted the update-maven-download-urls branch July 16, 2024 17:26
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.

3 participants