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 upgrade status cli #7480

Merged
merged 8 commits into from
Oct 19, 2022
Merged

Conversation

kalroy
Copy link
Collaborator

@kalroy kalroy commented Oct 14, 2022

🔩 Description: What code changed, and why?

Add an automate cli to test the status of the control index migration.

⛓️ Related Resources

https://chefio.atlassian.net/browse/STALWART-252

👍 Definition of Done

  • You should be able to run the command chef-automate enhanced-compliance migrate status
  • The command should return Automate is not configured to support enhance compliance reporting. when enhanced_compliance_reporting is not configured.
  • The command should return The Migration of compliance controls and assets is yet to start. when migration is yet to start
  • The command should return The Migration of compliance controls and assets is in progress. when migration is in progress.
  • The command should return The Migration of compliance controls and assets have completed. when migration is completed.

👟 How to Build and Test the Change

  • hab studio enter
  • rebuild components/compliance-service
  • rebuild components/automate-deployment
  • rebuild components/automate-cli
  • hab install -b -f

✅ 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

@kalroy kalroy changed the base branch from enhanced_compliance_reporting to add_compliance_config October 14, 2022 13:23
@kalroy kalroy marked this pull request as draft October 14, 2022 13:23
@kalroy kalroy self-assigned this Oct 16, 2022
@kalroy kalroy marked this pull request as ready for review October 16, 2022 18:05
@daveaugustus daveaugustus removed the request for review from GorillaGigabytes October 17, 2022 06:18
Base automatically changed from add_compliance_config to enhanced_compliance_reporting October 19, 2022 10:40
@Dmaddu Dmaddu force-pushed the enhanced_compliance_reporting branch from 5209d0d to 863d7b9 Compare October 19, 2022 10:44
@Dmaddu Dmaddu requested a review from a team as a code owner October 19, 2022 10:44
Signed-off-by: Kallol Roy <kallol.roy@progress.com>
Signed-off-by: Kallol Roy <kallol.roy@progress.com>
Signed-off-by: Kallol Roy <kallol.roy@progress.com>
Signed-off-by: Kallol Roy <kallol.roy@progress.com>
Signed-off-by: Kallol Roy <kallol.roy@progress.com>
Signed-off-by: Kallol Roy <kallol.roy@progress.com>
Signed-off-by: Kallol Roy <kallol.roy@progress.com>
Signed-off-by: Kallol Roy <kallol.roy@progress.com>
@netlify
Copy link

netlify bot commented Oct 19, 2022

Deploy Preview for chef-automate ready!

Name Link
🔨 Latest commit 6438042
🔍 Latest deploy log https://app.netlify.com/sites/chef-automate/deploys/63500e5b862a7a0008e045a5
😎 Deploy Preview https://deploy-preview-7480--chef-automate.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@sonarcloud
Copy link

sonarcloud bot commented Oct 19, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

34.4% 34.4% Coverage
0.0% 0.0% Duplication

@Dmaddu Dmaddu merged commit 9f26f6a into enhanced_compliance_reporting Oct 19, 2022
@Dmaddu Dmaddu deleted the add_upgrade_status_cli branch October 19, 2022 16:08
kalroy added a commit that referenced this pull request Oct 20, 2022
* enhanced_compliance_reporting

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

* Making Enhanced Compliance Reporting configurable (#7477)

* Making Enhanced Compliance Reporting configurable

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

* Adding delta upgrade logic

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

* Serving Enhanced Reporting APIs based on configuration

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

* updating getStartDateFromEndDate based on enhanced_reporting configuration

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

* adding upgrade time for upgrade process (#7490)

* adding upgrade time for upgrade process

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

* adding the correct names

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

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

* control report with date range logic update (#7491)

* logic fix

Signed-off-by: Abdul-Az <aazeez@progress.com>

* modifying the control summary

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

* error message fix

Signed-off-by: Abdul-Az <aazeez@progress.com>

Signed-off-by: Abdul-Az <aazeez@progress.com>
Signed-off-by: Durga Sarat Chandra Maddu <dmaddu@progress.com>
Co-authored-by: dmaddu <dmaddu@progress.com>

* Addressing review comments

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

Signed-off-by: Durga Sarat Chandra Maddu <dmaddu@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Abdul-Az <aazeez@progress.com>
Co-authored-by: dmaddu <dmaddu@progress.com>
Co-authored-by: Yashvi Jain <91940132+YashviJain01@users.noreply.github.com>
Co-authored-by: Abdul Azeez <aazeez@progress.com>

* Adding smart logic for upgrade and ingestion in parallel (#7488)

* Adding Functions for upgrade with smart logic

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

* Refactoring

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

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

* Add upgrade status cli (#7480)

* Initial checkin

Signed-off-by: Kallol Roy <kallol.roy@progress.com>

* Update columns

Signed-off-by: Kallol Roy <kallol.roy@progress.com>

* Added command for migration status

Signed-off-by: Kallol Roy <kallol.roy@progress.com>

* Use latest storage function

Signed-off-by: Kallol Roy <kallol.roy@progress.com>

* Delete unused sql file

Signed-off-by: Kallol Roy <kallol.roy@progress.com>

* Updated the unit tests

Signed-off-by: Kallol Roy <kallol.roy@progress.com>

* Introduced constants for status messages

Signed-off-by: Kallol Roy <kallol.roy@progress.com>

* Rebased

Signed-off-by: Kallol Roy <kallol.roy@progress.com>

Signed-off-by: Kallol Roy <kallol.roy@progress.com>
Co-authored-by: Kallol Roy <kallol.roy@progress.com>

* Added the configuration for control workers (#7496)

* Making Enhanced Compliance Reporting configurable

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

* Adding delta upgrade logic

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

* updating getStartDateFromEndDate based on enhanced_reporting configuration

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

* Adding config for control workers

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

* adding proto files

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

* Resolving conflicts from base branch

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

* Fixing errors

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

Signed-off-by: Durga Sarat Chandra Maddu <dmaddu@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Co-authored-by: dmaddu <dmaddu@progress.com>

* Pipeline fix for enhanced reporting (#7499)

* Fixing pipeline issues

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

* pipeline fix

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>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Abdul-Az <aazeez@progress.com>
Signed-off-by: Kallol Roy <kallol.roy@progress.com>
Co-authored-by: dmaddu <dmaddu@progress.com>
Co-authored-by: Yashvi Jain <91940132+YashviJain01@users.noreply.github.com>
Co-authored-by: Abdul Azeez <aazeez@progress.com>
Co-authored-by: Kallol Roy <karoy@progress.com>
Co-authored-by: Kallol Roy <kallol.roy@progress.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants