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

Merged
merged 3 commits into from
Nov 6, 2024
Merged

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
Copy link

codspeed-hq bot commented Oct 30, 2024

CodSpeed Performance Report

Merging #4788 will not alter performance

Comparing lgu-migrate-git-repository-add (ae35bf1) with develop (366ff71)

Summary

✅ 10 untouched benchmarks

@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.

@dgarros dgarros changed the base branch from develop-1.1 to develop November 1, 2024 07:13
@dgarros dgarros force-pushed the lgu-migrate-git-repository-add branch 3 times, most recently from 9997d32 to 28fc789 Compare November 3, 2024 07:59
@dgarros
Copy link
Collaborator

dgarros commented Nov 4, 2024

@LucasG0 FYI I rebased this branch after the latest changes in develop to see if resolving the merge conflicts would be enough to fix the tests ... it was not, looks like some tests still need to be fixed

@LucasG0 LucasG0 force-pushed the lgu-migrate-git-repository-add branch 7 times, most recently from 4926295 to ba46d12 Compare November 5, 2024 17:39
@github-actions github-actions bot added the group/ci Issue related to the CI pipeline label Nov 5, 2024
@LucasG0 LucasG0 force-pushed the lgu-migrate-git-repository-add branch from ba46d12 to 22cf2fa Compare November 6, 2024 10:53
@github-actions github-actions bot removed the group/ci Issue related to the CI pipeline label Nov 6, 2024
@LucasG0 LucasG0 force-pushed the lgu-migrate-git-repository-add branch from 22cf2fa to ae35bf1 Compare November 6, 2024 10:54
Copies car-dealership local repository to a temporary folder, with a new name.
This is needed for this test as using car-dealership folder leads to issues most probably
related to https://github.com/opsmill/infrahub/issues/4296 as some other tests use this same repository.
"""
Copy link
Contributor Author

Choose a reason for hiding this comment

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

#4296 for reference

@LucasG0 LucasG0 merged commit 4936737 into develop Nov 6, 2024
32 checks passed
@LucasG0 LucasG0 deleted the lgu-migrate-git-repository-add branch November 6, 2024 11:13
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