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

Fleet commit version of bundledeployments is not changing when checking via API #1488

Closed
kkaempf opened this issue Apr 25, 2023 · 3 comments
Closed

Comments

@kkaempf
Copy link
Collaborator

kkaempf commented Apr 25, 2023

SURE-6120

Issue description:

Fleet - continuous delivery, a Git repo offers to watch Revision and stores the value in "Tag or commit Hash" and sees that this value is adopted as fleet.cattle.io/commit in the deployment. However, when the value evolves in git, it stays the same in the deployment and does not evolve with the Git revision commit.

Business impact:

Customers use a dashboard to monitor their continuous deployments, and the dashboard uses API and gives a wrong Info.

Troubleshooting steps:

As a prerequisite, keep a Git repo with 2-3 Revion ( Tag )

Go to Continuous Delivery > Add repository > Watch " A Revision" > Put the Tag >> Save

Go to the YAML of Git Repo and See the Filed fleet.cattle.io/commit under Label, and you can see the Tag version updated.

  generation: 8
  labels:
    *fleet.cattle.io/commit: “1.2"*
    fleet.cattle.io/repo-name: nginx-test

Repeat the same using the API call https:///v1/fleet.cattle.io.bundledeployments and we can see the same Tag

generation”: 8,
“labels”: {
“fleet.cattle.io/bundle-name”: “nginx-test-nginx”,
“fleet.cattle.io/bundle-namespace”: “fleet-default”,
“*fleet.cattle.io/commit”: “1.2”,*

Now, please edit the Git repo with another version. And repeat the below.

Go to the YAML of Git Repo and See the Filed fleet.cattle.io/commit under Label, and you can see the Tag version updated. >> It should be ne one

  generation: 9
  labels:
    *fleet.cattle.io/commit: “1.4"*
    fleet.cattle.io/repo-name: nginx-test

Repeat the same using the API call https:///v1/fleet.cattle.io.bundledeployments >> It's keeping the old one and not getting changed.

generation”: 9,
“labels”: {
“fleet.cattle.io/bundle-name”: “nginx-test-nginx”,
“fleet.cattle.io/bundle-namespace”: “fleet-default”,
*“fleet.cattle.io/commit”: “1.2”,*

Repro steps:

Above

Workaround:

Is a work araround available and implemented? NO

Actual behaviour:

The commit version ( Tag ) is not getting changed for Git Bundle when calling the API

Expected behaviour:

The commit version ( Tag ) should be changed for Git Bundle when calling the API

@manno
Copy link
Member

manno commented Apr 28, 2023

This should be fixed by #1153

@sbulage
Copy link
Contributor

sbulage commented May 16, 2023

QA TEST PLAN

Scenarios

Scenario Test Case
1 Test if Bundle and BundleDeployment adpot changes in the github repository when tag/commit updated.

@sbulage
Copy link
Contributor

sbulage commented May 17, 2023

Verified first two test cases QE Test Plan in above comment.

Rancher Version: 2.7.5-rc1
fleet version: 0.7.0-rc.2

TEST RESULT

Scenarios

Scenario Test Case Result
1 Test if Bundle and BundleDeployment adpot changes in the github repository when tag/commit updated.

REPRO STEPS

Scenario 1

  1. Released tag of existing GitHub repository.(https://github.com/sbulage/test-fleet)
  2. Created a GitRepo using above repository and used the latest tag (v1.0.0).
  3. Checked the bundle and bundledeployment of the GitRepo as follows:
    satya@rancher:~> kubectl get bundle -n fleet-default hash-git-tag-nginx-helm  -o json | jq -r .metadata.labels
    {
      "fleet.cattle.io/commit": "v1.0.0",   <-------------- Initial value
    "fleet.cattle.io/repo-name": "hash-git-tag"
    }
    
    satya@rancher:~> kubectl get bundledeployment -n cluster-fleet-default-cluster2-6cc6b63b324c hash-git-tag-nginx-helm -o json | jq -r .metadata.labels
    {
    "fleet.cattle.io/bundle-name": "hash-git-tag-nginx-helm",
    "fleet.cattle.io/bundle-namespace": "fleet-default",
    "fleet.cattle.io/commit": "v1.0.0",   <-------------- Initial value
    "fleet.cattle.io/managed": "true",
    "fleet.cattle.io/repo-name": "hash-git-tag",
    "objectset.rio.cattle.io/hash": "8736b21952ba2a7e9920b115b02a92490acf62bf"
    }
    
  4. Made some changes to repository and released another version v1.0.1
  5. Verified that the bundle and bundledeployment of the GitRepo as follows:
    satya@rancher:~> kubectl get bundle -n fleet-default hash-git-tag-nginx-helm  -o json | jq -r .metadata.labels
    {
    "fleet.cattle.io/commit": "v1.0.1", <-------------- Updated value
    "fleet.cattle.io/repo-name": "hash-git-tag"
    }
    
    satya@rancher:~> kubectl get bundledeployment -n cluster-fleet-default-cluster2-6cc6b63b324c hash-git-tag-nginx-helm -o json | jq -r .metadata.labels
    {
    "fleet.cattle.io/bundle-name": "hash-git-tag-nginx-helm",
    "fleet.cattle.io/bundle-namespace": "fleet-default",
    "fleet.cattle.io/commit": "v1.0.1", <-------------- Updated value
    "fleet.cattle.io/managed": "true",
    "fleet.cattle.io/repo-name": "hash-git-tag",
    "objectset.rio.cattle.io/hash": "8736b21952ba2a7e9920b115b02a92490acf62bf"
    }
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants