Skip to content
This repository has been archived by the owner on Feb 4, 2025. It is now read-only.

[CCXDEV-6834] Show the ocp rules version in /info #402

Merged
merged 3 commits into from
Jul 11, 2022
Merged

Conversation

juandspy
Copy link
Collaborator

@juandspy juandspy commented Jul 8, 2022

Description

Pass the OCP rules version as build params and return the value in the /info endpoint.

Fixes #CXDEV-6834

IMPORTANT: this change will modify a v1 endpoint at smart proxy!

Type of change

  • New feature (non-breaking change which adds functionality)

Testing steps

Content service:

❯ curl localhost:8080/api/v1/info | jq
{
  "info": {
    "BuildBranch": "master",
    "BuildCommit": "e3cc637c1db1b1e1c0649d83c266c9a58842f89a",
    "BuildTime": "Fri Jul  8 12:21:32 PM CEST 2022",
    "BuildVersion": "0.1",
    "OCPRulesVersion": "ccx-rules-ocp:2022.07.06",    <----------------
    "UtilsVersion": "v1.22.0"
  },
  "status": "ok"
}

Smart Proxy:

❯ curl localhost:8081/api/v1/info | jq
{
  "info": {
    "SmartProxy": {
      "BuildBranch": "CCXDEV-6834",
      "BuildCommit": "4205beb1dc0bf46285fa5e334431c2b4afcda4ac",
      "BuildTime": "Fri Jul  8 12:37:46 PM CEST 2022",
      "BuildVersion": "0.1",
      "UtilsVersion": "v1.23.3",
      "status": "ok"
    },
    "Aggregator": {
      "BuildBranch": "CCXDEV-6834",
      "BuildCommit": "51d62933c0866705b65e4f858a3be91dac8f85b4",
      "BuildTime": "Fri Jul  8 12:28:56 PM CEST 2022",
      "BuildVersion": "0.1",
      "OCPRulesVersion": "ccx-rules-ocp:2022.07.06 ",
      "UtilsVersion": "v1.22.0",
      "status": "ok"
    },
    "ContentService": {
      "BuildBranch": "CCXDEV-6834",
      "BuildCommit": "51d62933c0866705b65e4f858a3be91dac8f85b4",
      "BuildTime": "Fri Jul  8 12:28:56 PM CEST 2022",
      "BuildVersion": "0.1",
      "OCPRulesVersion": "ccx-rules-ocp:2022.07.06", <-----------------
      "UtilsVersion": "v1.22.0",
      "status": "ok"
    }
  },
  "status": "ok"
}

Checklist

  • make before_commit passes
  • updated documentation wherever necessary
  • added or modified tests if necessary
  • updated schemas and validators in insights-data-schemas in case of input/output change

@codecov-commenter
Copy link

codecov-commenter commented Jul 8, 2022

Codecov Report

Merging #402 (ed6b562) into master (e3cc637) will increase coverage by 0.14%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #402      +/-   ##
==========================================
+ Coverage   72.53%   72.68%   +0.14%     
==========================================
  Files          11       11              
  Lines         579      582       +3     
==========================================
+ Hits          420      423       +3     
  Misses        134      134              
  Partials       25       25              
Impacted Files Coverage Δ
content-service.go 43.70% <100.00%> (+1.27%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e3cc637...ed6b562. Read the comment docs.

@juandspy juandspy changed the title [CCXDEV-6834] Show the ocp rules version in /info Draft: [CCXDEV-6834] Show the ocp rules version in /info Jul 8, 2022
@juandspy juandspy changed the title Draft: [CCXDEV-6834] Show the ocp rules version in /info WIP: [CCXDEV-6834] Show the ocp rules version in /info Jul 8, 2022
Copy link
Collaborator

@tisnik tisnik left a comment

Choose a reason for hiding this comment

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

LGTM

@juandspy juandspy changed the title WIP: [CCXDEV-6834] Show the ocp rules version in /info [CCXDEV-6834] Show the ocp rules version in /info Jul 11, 2022
Copy link
Collaborator

@epapbak epapbak left a comment

Choose a reason for hiding this comment

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

lgtm

@juandspy juandspy merged commit bd122b5 into master Jul 11, 2022
@tisnik tisnik deleted the CCXDEV-6834 branch April 25, 2023 15:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants