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

Validate plugins removed from hub before marking them stale #1301

Merged
merged 12 commits into from
Feb 22, 2024

Conversation

manasaV3
Copy link
Collaborator

Description

Relates to: #1275

In cases where a plugin is being marked stale without a new version, we validate if the version is no longer active by validating it against npe2api repository's public/classifiers.json.

TODO:

Update the documentation to reflect it can now take upto 2 hours for a plugin to be removed from the site.

@manasaV3 manasaV3 added the improvement Release Label: Used for categorizing improvements in automated CI release notes label Jan 16, 2024
@manasaV3 manasaV3 changed the title Mvenkatakrishnan/validate stale versions Validate plugins removed from hub before marking them stale Jan 16, 2024
@manasaV3 manasaV3 force-pushed the mvenkatakrishnan/validate_stale_versions branch 2 times, most recently from a33d3ca to afddf5d Compare January 17, 2024 23:20
@manasaV3 manasaV3 force-pushed the mvenkatakrishnan/validate_stale_versions branch from 16f9214 to b9b3320 Compare January 18, 2024 01:35
Copy link
Collaborator

@DragaDoncila DragaDoncila left a comment

Choose a reason for hiding this comment

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

@manasaV3 thanks for working on this! Left a couple of comments.

@@ -341,6 +341,7 @@ module data_workflows_lambda {
"GITHUB_CLIENT_ID" = local.github_client_id
"GITHUB_CLIENT_SECRET" = local.github_client_secret
"PLUGINS_LAMBDA_NAME" = local.plugins_function_name
"ZULIP_CREDENTIALS" = local.zulip_credentials
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this re-enabling the zulip stream @manasaV3? Perhaps it would be good to do that in a separate PR once we've merged this and confirmed all is working as intended? Ideally tbh I would like to actually capture one of the events reported in #1725 before we re-enable.

Also regardless of that, we should flag to folks on zulip before we re-enable the channel.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agreed that we should decouple adding the Zulip credentials from this PR. Opened this PR for that.

We could let this run in prod for up to a month to see if we can catch the issue occurring. But, if we aren't able to, I think we could add Zulip notifications to let the community know that we are cautiously positive about having fixed the issue. What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@manasaV3 yep I think that sounds reasonable!

data-workflows/plugin/tests/test_classifier_adapter.py Outdated Show resolved Hide resolved
data-workflows/plugin/processor.py Show resolved Hide resolved
data-workflows/plugin/classifier_adapter.py Outdated Show resolved Hide resolved
data-workflows/plugin/tests/test_classifier_adapter.py Outdated Show resolved Hide resolved
.github/workflows/backend-tests.yml Outdated Show resolved Hide resolved
github_client_helper = GithubClientHelper(REPOSITORY)
data = github_client_helper.get_file(FILE_NAME, "json")
if not data:
raise RuntimeError(f"Unable to fetch {FILE_NAME} from {REPOSITORY}")
Copy link
Collaborator

Choose a reason for hiding this comment

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

might be worth logging here?

Copy link
Collaborator Author

@manasaV3 manasaV3 Feb 22, 2024

Choose a reason for hiding this comment

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

data-workflows/plugin/processor.py Show resolved Hide resolved
@@ -341,6 +341,7 @@ module data_workflows_lambda {
"GITHUB_CLIENT_ID" = local.github_client_id
"GITHUB_CLIENT_SECRET" = local.github_client_secret
"PLUGINS_LAMBDA_NAME" = local.plugins_function_name
"ZULIP_CREDENTIALS" = local.zulip_credentials
Copy link
Collaborator

Choose a reason for hiding this comment

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

@manasaV3 yep I think that sounds reasonable!

Copy link
Collaborator

@DragaDoncila DragaDoncila left a comment

Choose a reason for hiding this comment

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

@manasaV3 looks good to me - just left a small comment about perhaps logging when the classifiers file is unavailable

@manasaV3 manasaV3 merged commit 67271cc into main Feb 22, 2024
9 checks passed
@manasaV3 manasaV3 deleted the mvenkatakrishnan/validate_stale_versions branch February 22, 2024 21:58
Copy link

github-actions bot commented Mar 8, 2024

This PR has been included in release: v24.03.0, see the release notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Release Label: Used for categorizing improvements in automated CI release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants