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

Add license interceptor in automate gateway (#8439) #8452

Merged
merged 39 commits into from
Jul 19, 2024
Merged

Conversation

YashviJain01
Copy link
Collaborator

  • Adding the intercerptors with error only for license

  • Removing the function, will create another PR for this

  • Removing interface, will create another PR for this

  • Adding the function for interceptor

  • Adding interceptor layer for license

  • Adding allow api list if the license needs to be applied from backend

  • Adding license apply

  • Adding license function in default deploy

  • Removing unwanted loggers

  • Adding license apply command in pipelines, and adding create token api in api allow list

  • Applying license at various location to unblock the pipeline

  • Adding changes

  • Adding Applying license in do_dploy for chef server

  • updating the temp license

  • Adding A2_license as a variable from vault

  • Adding A2_license as a environment variable

  • Adding A2 license in the pipeline

  • Adding license in studio pipelines

  • Adding license data

  • Adding license data

  • Adding license data

  • Adding license

  • Adding licrnse in dev from command

  • Adding license from vault and applying it

  • Adding license in gateway intergation

  • Adding license in gateway intergation

  • Adding license key in the pipeline

  • Adding license after upgrade

  • commenting jq line for print


🔩 Description: What code changed, and why?

⛓️ Related Resources

👍 Definition of Done

👟 How to Build and Test the Change

✅ Checklist

All PRs must tick these:

With occasional exceptions, all PRs from Progress employees must tick these:

  • Is the code clear? (complicated code or lots of comments--subdivide and use well-named methods, meaningful variable names, etc.)
  • Consistency checked? (user notifications, user prompts, visual patterns, code patterns, variable names)
  • Repeated code blocks eliminated? (adapt and reuse existing components, blocks, functions, etc.)
  • Spelling, grammar, typos checked? (at a minimum use make spell in any component directory)
  • Code well-formatted? (indents, line breaks, etc. improve rather than hinder readability)

All PRs from Progress employees should tick these if appropriate:

  • Tests added/updated? (all new code needs new tests)
  • Docs added/updated? (all customer-facing changes)

Please add a note next to any checkbox above if you are NOT ticking it.

📷 Screenshots, if applicable

Copy link

netlify bot commented May 20, 2024

👷 Deploy Preview for chef-automate processing.

Name Link
🔨 Latest commit 883f1a1
🔍 Latest deploy log https://app.netlify.com/sites/chef-automate/deploys/669a61911f1b8a0008abd233

@github-actions github-actions bot added the documentation Anything related to the Automate docs. label Jun 5, 2024

SonarQube Quality Gate

Quality Gate failed

Failed condition 27.2% 27.2% Coverage on New Code (is less than 80%)

See analysis details on SonarQube

@daveaugustus daveaugustus force-pushed the feature/CHEF-11824 branch 2 times, most recently from 9f69330 to 7a57dfd Compare July 17, 2024 11:51
YashviJain01 and others added 22 commits July 18, 2024 16:28
* Adding the intercerptors with error only for license

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Removing the function, will create another PR for this

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Removing interface, will create another PR for this

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Adding the function for interceptor

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Adding interceptor layer for license

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Adding allow api list if the license needs to be applied from backend

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Adding license apply

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Adding license function in default deploy

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Removing unwanted loggers

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Adding license apply command in pipelines, and adding create token api in api allow list

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Applying license at various location to unblock the pipeline

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Adding changes

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Adding Applying license in do_dploy for chef server

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* updating the temp license

Signed-off-by: Durga Sarat Chandra Maddu <dmaddu@progress.com>

* Adding A2_license as a variable from vault

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Adding A2_license as a environment variable

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Adding A2 license in the pipeline

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Adding license in studio pipelines

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Adding license data

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Adding license data

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Adding license data

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Adding license

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Adding licrnse in dev from command

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Adding license from vault and applying it

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Adding license in gateway intergation

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Adding license in gateway intergation

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Adding license key in the pipeline

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Adding license after upgrade

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* commenting jq line for print

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

---------

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Durga Sarat Chandra Maddu <dmaddu@progress.com>
Co-authored-by: Yashvi Jain <yashvi.jain@progress.com>
Co-authored-by: dmaddu <dmaddu@progress.com>
* Infrastructure node cli license changes

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Adding test cases for pre functions

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Adding correct message in case of failure

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

---------

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Co-authored-by: Yashvi Jain <yashvi.jain@progress.com>
* adding grace period to the license status1

Signed-off-by: swatign <SwatiGanesh.Naik@Progress.com>

* checking for grace period value in status responce

Signed-off-by: swatign <SwatiGanesh.Naik@Progress.com>

* adding grace period in gateway file

Signed-off-by: swatign <SwatiGanesh.Naik@Progress.com>

* added grace period in gateway

Signed-off-by: swatign <SwatiGanesh.Naik@Progress.com>

* Adding correct pb.go files

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* removed log statements

Signed-off-by: swatign <SwatiGanesh.Naik@Progress.com>

* Helper.go file for warning message (#8464)

* Helper.go function added

Signed-off-by: karan parmar <kparmar@progress.com>

* hook added for airgap file

Signed-off-by: karan parmar <kparmar@progress.com>

* seperate function added

Signed-off-by: karan parmar <kparmar@progress.com>

* Adding helper functions correctly

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* cli changes

Signed-off-by: Aishwarya Aishwarya <aaishwar@progress.com>

* cli changes 2

Signed-off-by: swatign <SwatiGanesh.Naik@Progress.com>

* Prefetch commands added

Signed-off-by: karan parmar <kparmar@progress.com>

* Adding new statements for cli

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* Adding the license itercepter valid grace period of 60

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>

* latest changes done

Signed-off-by: karan parmar <kparmar@progress.com>

* final changes 1

Signed-off-by: karan parmar <kparmar@progress.com>

* final changes 2

Signed-off-by: karan parmar <kparmar@progress.com>

* final changes 3

Signed-off-by: karan parmar <kparmar@progress.com>

* final changes 4

Signed-off-by: karan parmar <kparmar@progress.com>

---------

Signed-off-by: karan parmar <kparmar@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Aishwarya Aishwarya <aaishwar@progress.com>
Signed-off-by: swatign <SwatiGanesh.Naik@Progress.com>
Co-authored-by: Yashvi Jain <yashvi.jain@progress.com>
Co-authored-by: Aishwarya Aishwarya <aaishwar@progress.com>
Co-authored-by: swatign <SwatiGanesh.Naik@Progress.com>

* added license type in api responce and corrected license control service file

Signed-off-by: swatign <SwatiGanesh.Naik@Progress.com>

---------

Signed-off-by: swatign <SwatiGanesh.Naik@Progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: karan parmar <kparmar@progress.com>
Signed-off-by: Aishwarya Aishwarya <aaishwar@progress.com>
Co-authored-by: Yashvi Jain <yashvi.jain@progress.com>
Co-authored-by: kparmar2000 <145539208+kparmar2000@users.noreply.github.com>
Co-authored-by: Aishwarya Aishwarya <aaishwar@progress.com>
Signed-off-by: swatign <SwatiGanesh.Naik@Progress.com>
* Chaged the func to tempfile

Signed-off-by: daveaugustus <pappu.kumar@progress.com>

* Adding check for automate node for HA

Signed-off-by: daveaugustus <pappu.kumar@progress.com>

* Adding check for automate node for HA

Signed-off-by: daveaugustus <pappu.kumar@progress.com>

* added remote command

* cat file

Signed-off-by: daveaugustus <pappu.kumar@progress.com>

* Added license status for HA

Signed-off-by: daveaugustus <pappu.kumar@progress.com>

* Added license status for HA

Signed-off-by: daveaugustus <pappu.kumar@progress.com>

* Added license status for HA

Signed-off-by: daveaugustus <pappu.kumar@progress.com>

* Added license status for HA

Signed-off-by: daveaugustus <pappu.kumar@progress.com>

* Added license status for HA

Signed-off-by: daveaugustus <pappu.kumar@progress.com>

* Removed json output

Signed-off-by: daveaugustus <pappu.kumar@progress.com>

* changed pipeline commands

Signed-off-by: daveaugustus <pappu.kumar@progress.com>

* removed func call for deploy cmds

Signed-off-by: Aishwarya Aishwarya <aaishwar@progress.com>

* new code changes

Signed-off-by: Aishwarya Aishwarya <aaishwar@progress.com>

* Added warning case function

Signed-off-by: daveaugustus <pappu.kumar@progress.com>

* refactored

Signed-off-by: daveaugustus <pappu.kumar@progress.com>

* reverted

Signed-off-by: daveaugustus <pappu.kumar@progress.com>

* error corretcions

Signed-off-by: daveaugustus <pappu.kumar@progress.com>

---------

Signed-off-by: daveaugustus <pappu.kumar@progress.com>
Signed-off-by: Aishwarya Aishwarya <aaishwar@progress.com>
Co-authored-by: daveaugustus <pappu.kumar@progress.com>
Co-authored-by: Aishwarya Aishwarya <aaishwar@progress.com>
Signed-off-by: daveaugustus <pappu.kumar@progress.com>
Signed-off-by: “SanjuPal01” <sanju.sanju@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: daveaugustus <pappu.kumar@progress.com>
Signed-off-by: daveaugustus <pappu.kumar@progress.com>
Signed-off-by: daveaugustus <pappu.kumar@progress.com>
Signed-off-by: daveaugustus <pappu.kumar@progress.com>
Signed-off-by: daveaugustus <pappu.kumar@progress.com>
Signed-off-by: daveaugustus <pappu.kumar@progress.com>
daveaugustus and others added 5 commits July 18, 2024 16:28
Signed-off-by: daveaugustus <pappu.kumar@progress.com>
Signed-off-by: daveaugustus <pappu.kumar@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: daveaugustus <pappu.kumar@progress.com>
daveaugustus and others added 6 commits July 19, 2024 11:58
Signed-off-by: daveaugustus <pappu.kumar@progress.com>
Signed-off-by: daveaugustus <pappu.kumar@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: daveaugustus <pappu.kumar@progress.com>
UTC
Signed-off-by: daveaugustus <pappu.kumar@progress.com>
daveaugustus and others added 2 commits July 19, 2024 14:56
Signed-off-by: daveaugustus <pappu.kumar@progress.com>
Signed-off-by: Durga Sarat Chandra Maddu <dmaddu@progress.com>
@Dmaddu Dmaddu marked this pull request as ready for review July 19, 2024 12:26
daveaugustus added 2 commits July 19, 2024 18:03
Signed-off-by: daveaugustus <pappu.kumar@progress.com>
Signed-off-by: daveaugustus <pappu.kumar@progress.com>

Quality Gate failed Quality Gate failed

Failed conditions
6 New issues
26.6% Coverage on New Code (required ≥ 80%)
5.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube

Catch issues before they fail your Quality Gate with our IDE extension SonarLint SonarLint

@Dmaddu Dmaddu merged commit 56c5768 into main Jul 19, 2024
10 of 12 checks passed
@Dmaddu Dmaddu deleted the feature/CHEF-11824 branch July 19, 2024 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Anything related to the Automate docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants