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

fix: checking git material active status for multiple places : 1) while triggering ci 2) while getting commit info 3) while getting ci pipeline #2636

Merged
merged 5 commits into from
Nov 19, 2022

Conversation

prakash100198
Copy link
Contributor

@prakash100198 prakash100198 commented Nov 15, 2022

Description

If an app is using multiple git repositories and if someone deletes a git repository from those, workflow doesn't get updated with the changes. It keeps showing the same git repositories which were before deletion of any one of them.
Even if you add the same repo again, Workflow doesn't update the id for the same. Triggered ci pipeline with multiple git repositories and when one of the git material is deleted, it should have affected multiple places but deletion was not reflecting at all anywhere.
Places where git material deletion should be reflected are:-

  1. Workflow editor
    Deleted git repository node will be removed
    Current Behavior:- Git material deleted in the git repositories section but it still appears in the pipeline.
  2. Build & deploy
    Deleted git repositoryke node will be removed
    Current Behavior:- Git material deleted in the git repositories section but it still appears in the pipeline.
  3. WorkFlow Editor> Edit Build Pipeline > Select Source Code
    Deleted git repository should not be shown as an option here.
    Current Behavior:- Git material deleted in the git repositories section but it still appears in the source code options.
  4. CI > Select material
    Deleted git repository will not be shown for commit selection
    Current Behavior:- Git material deleted in the git repositories section but it still appears as an option in the select material section.
  5. CD > Select image > Source info
    Only those “repo + commits” will be shown which were used to build the image
    Current Behavior:- Git material deleted in the git repositories section but it still appears in the source info in deployment
    card.
  6. Build history > Source code
    For each triggered build, show the state at that point of time I.e. If 2 repos were connected during the build trigger, 2
    repos and the selected commits will be shown. Later if the user removed a repo and triggered a build, only 1 repo will be
    shown against that build trigger.
    Current Behavior:- Builds triggered with one git repertory, also shows history of 2nd git material, which was deleted from
    the git repositories.
  7. Deployment history > Source code
    For each triggered deployment, show only those “repo + commits” which were used to build the deployed image.
    Current Behavior:- Deployments triggered with one git repertory, also shows history of 2nd git material, which was deleted
    from the git repositories.
  8. App Details > Commit Info
    As this is the current state of a deployed commit(which commits are being deployed from which git material), if
    deployment is triggered by 2 git material then 2 git materials should reflect here, else if there is only one then only 1 git
    material should reflect here.

Fixes #1397

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • I tested the code locally as well as on personal vm multiple times. Tested all the cases and implications when a git repo is deleted and where it should be reflected.

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR requires documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have tested it for all user roles.
  • I have added all the required unit/api test cases.

Does this PR introduce a user-facing change?


1) while triggering ci
2) while getting commit info
3) while getting ci pipeline
 Please enter a commit message to explain why this merge is necessary,
@prakash100198 prakash100198 requested review from kartik-579 and removed request for manish-agrawal-ai November 19, 2022 06:03
@kartik-579 kartik-579 merged commit d3cd555 into main Nov 19, 2022
@kartik-579 kartik-579 deleted the issue_1397_fix branch November 19, 2022 13:08
sohel-rp added a commit that referenced this pull request Nov 22, 2022
…: 1) while triggering ci 2) while getting commit info 3) while getting ci pipeline (#2636)"

This reverts commit d3cd555.
kartik-579 pushed a commit that referenced this pull request Nov 22, 2022
…: 1) while triggering ci 2) while getting commit info 3) while getting ci pipeline (#2636)" (#2668)

This reverts commit d3cd555.
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.

Workflow doesn't get updated if we delete a Git Material and blocks further deployments for the application
3 participants