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

Migrate GitRepositoryAdd to prefect #4788

Open
wants to merge 1 commit into
base: develop-1.1
Choose a base branch
from

Conversation

LucasG0
Copy link
Contributor

@LucasG0 LucasG0 commented Oct 30, 2024

No description provided.

@LucasG0 LucasG0 requested a review from a team October 30, 2024 17:23
@github-actions github-actions bot added type/documentation Improvements or additions to documentation group/backend Issue related to the backend (API Server, Git Agent) labels Oct 30, 2024
backend/infrahub/git/tasks.py Outdated Show resolved Hide resolved
Copy link

codspeed-hq bot commented Oct 30, 2024

CodSpeed Performance Report

Merging #4788 will degrade performances by 18.15%

Comparing lgu-migrate-git-repository-add (2b969d8) with develop (fad721d)

Summary

❌ 2 regressions
✅ 8 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark develop lgu-migrate-git-repository-add Change
test_get_menu 421.5 ms 473.5 ms -10.98%
test_graphql_generate_schema 300.4 ms 367.1 ms -18.15%

@LucasG0 LucasG0 force-pushed the lgu-migrate-git-repository-add branch from 75b3430 to 2b969d8 Compare October 30, 2024 17:46
@ogenstad
Copy link
Contributor

I would vote to enable the disabled tests related to proposed changes before merging this, i.e. these:

    @pytest.mark.xfail(reason="FIXME Works locally but it's failling in Github Actions")
    async def test_happy_pipeline(self, db: InfrahubDatabase, happy_dataset: None, client: InfrahubClient) -> None:

    @pytest.mark.xfail(reason="FIXME Works locally but it's failling in Github Actions")
    async def test_conflict_pipeline(

Then we need to figure out what's required to actually trigger the jobs to be executed in serial, so that the testing experience is somewhat similar to what we had before. In this PR we see it in the failing integration test where some more work will need to be done, but it could also be other things that are required with regards to these disabled tests. It might be that we need to rewrite them from scratch depending on the options we have with prefect. But if we look at this change:

            if context.service:
                context.service.workflow.submit_workflow(
                    workflow=GIT_REPOSITORY_ADD, parameters={"model": git_repo_add_model}
                )

We need the submit_workflow method to actually run the import repo function in the background and add the changes back to the current test instance in the same way as the old RabbitMQ message did.

@dgarros
Copy link
Collaborator

dgarros commented Oct 31, 2024

We need the submit_workflow method to actually run the import repo function in the background and add the changes back to the current test instance in the same way as the old RabbitMQ message did.

That should already work as expected when the tests are using WorkflowLocalExecution

@ogenstad
Copy link
Contributor

That should already work as expected when the tests are using WorkflowLocalExecution

Ah, right so will just need to update that integration test. I still think it would be good to have the other tests enabled again though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
group/backend Issue related to the backend (API Server, Git Agent) type/documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants