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

creating cron-workflow to invoke job template for the sync-job #2524

Merged

Conversation

Gregory-Pereira
Copy link
Member

Related Issues and Dependencies

Partially Addresses: #2513
Related to: thoth-station/sync-job#61

Does this require new deployment ?

  • Deployment for Test and Stage AICoE/aicoe-cd and Prod operate-first/argocd-apps.

Description

Creating a cron-workflow for the sync-job

/cc @harshad16

@sesheta sesheta requested a review from harshad16 April 20, 2022 18:23
@sesheta sesheta added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 20, 2022
@sesheta
Copy link
Member

sesheta commented Apr 20, 2022

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@sesheta sesheta added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 20, 2022
@Gregory-Pereira
Copy link
Member Author

I know that when going from stage to production we should be syncing adviser, revsolver, and security-indicator documents, but what about from production to stage?

Copy link
Member

@harshad16 harshad16 left a comment

Choose a reason for hiding this comment

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

good start
i have added some suggestions.

sync-job/base/cron-worfklow.yaml Outdated Show resolved Hide resolved
sync-job/base/cron-worfklow.yaml Outdated Show resolved Hide resolved
sync-job/base/openshift.yaml Outdated Show resolved Hide resolved
@Gregory-Pereira Gregory-Pereira force-pushed the adding-sync-job-cron-workflow branch 2 times, most recently from 7bcc1ba to bff2b7b Compare April 22, 2022 19:47
@Gregory-Pereira
Copy link
Member Author

It uses 3 templates because both for prod and stage, there are 3 separate types of documents to be synced. Additionally I can apply the resources (it is correct YAML syntax), however, the workflow controller rejects this CronWorkflow by giving me the following error: "Unable to convert unstructured to CronWorkflow when syncing CronWorkflows" error="cannot restore slice from map"

@Gregory-Pereira Gregory-Pereira marked this pull request as ready for review April 26, 2022 23:18
@sesheta sesheta removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 26, 2022
@Gregory-Pereira Gregory-Pereira force-pushed the adding-sync-job-cron-workflow branch 3 times, most recently from 6c828b9 to e431284 Compare April 28, 2022 14:55
@Gregory-Pereira
Copy link
Member Author

Cron-workflow is now accepted, ready for review.

@harshad16 harshad16 linked an issue May 2, 2022 that may be closed by this pull request
2 tasks
@Gregory-Pereira
Copy link
Member Author

Attempting to implement this with a cron-workflow which uses a workflow template so the changes be used to both invoke a cronworkflow to run sync-job periodically, as well as be invoked from the management api via workflow. That being said I am encountering an Argo issue: template reference exceeded max depth (10).

@Gregory-Pereira Gregory-Pereira force-pushed the adding-sync-job-cron-workflow branch 3 times, most recently from 5c9ec50 to d7b4c5a Compare May 3, 2022 03:18
@Gregory-Pereira
Copy link
Member Author

Issue about template reference exceeding max depth has been resolved, hoping that @harshad16 could take a look when you have time.

@Gregory-Pereira Gregory-Pereira force-pushed the adding-sync-job-cron-workflow branch 3 times, most recently from 86c0fc0 to 1f0a839 Compare May 5, 2022 17:42
Copy link
Member

@harshad16 harshad16 left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve
thanks 💯

@sesheta sesheta added the lgtm Indicates that a PR is ready to be merged. label May 6, 2022
@sesheta
Copy link
Member

sesheta commented May 6, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: harshad16

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sesheta sesheta added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 6, 2022
@sesheta sesheta merged commit 9b21e27 into thoth-station:master May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[3pt] create sync-job cronworkflow in thoth-application
3 participants