-
Notifications
You must be signed in to change notification settings - Fork 22
Conversation
0236301
to
40d01c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kewne, @lgp171188 Thanks for the fix. LGTM 👍
- I tested this: Checked output on CircleCI
cleanup
job. Tried to get a list of empty tables using the query provided. - I read through the code
- [N/A] I checked for accessibility issues
- Includes documentation
- [N/A] I made sure any change in configuration variables is reflected in the corresponding client's
configuration-secure
repository.
28928e7
to
0f08136
Compare
@shimulch It seems that making the This isn't a huge deal but maybe it warrants a follow-up? |
This is a huge deal because the PR CI runs are blocked by something they shouldn't be blocked by and additional steps are now needed for something that worked fine before. Let's not create follow-up tasks by creating new issues 😛 I would recommend against changing anything that tweaks how the cleanup job is currently run periodically and separately, outside the typical workflow for the PR CI checks. There is already a way to run the cleanup job on demand - go to CircleCI and re-run the last run of the job. It is expected the automatic runs should do the job and manual run is only needed to debug and fix issues, if any. This cleanup job has had multiple rewrites/fixes to solve each issue that showed up after some time passed after the previous fix/rewrite. Let's not introduce a lot of changes that tend to increase the surface area for the bugs. We are in the process of reinventing/rewriting Ocim as we know it today into something that is going to be totally different and better. So I would recommend against adding more code/new features for something like this cleanup job which will go away soon ™️ , CC @shimulch |
03378b5
to
18d0411
Compare
To clarify, CI runs aren't blocked by the Anyway, I've moved the approval job to a separate workflow, where it shouldn't interfere anymore.
That is the intent of the change: your original PR changed the scheduled job to run on this branch in addition to |
@shimulch it seems that the pending manual job blocks the github checks; IIRC you can make that specific check optional in the repo settings, which I don't have permissions to do. |
@kewne Looks like we can't have an optional job that requires approval. So let's just keep the old way of having Also, can you temporarily enable scheduled cleanup in the PR branch as well? So that we can test if it runs or not? Maybe just remove |
@shimulch I meant making the check optional in Github; this is an example of the setting in one of my personal repos: In this case, you should be able to remove the Let me know if you feel like this is the wrong thing to do and I'll revert my change. |
a792b9a
to
ed62fd8
Compare
@kewne Currently the only required status is the coverage. So the merge is not blocked by that task anyway.
I think we should stay with the "push to the |
c30332c
to
49007a6
Compare
@shimulch The cleanup only runs on the Ironically, I think we've stumbled on a Circle CI bug: the |
@kewne, No worries, we weren't expecting these CI issues. I am not sure either why this job is showing up there. Can you try filtering on the workflow instead? |
49007a6
to
9be911f
Compare
@lgp171188 what do you mean by "re-run the job manually"? If I understood correctly the previous configuration only runs the @shimulch The "issue" is that the Github API for setting statuses uses SHA to identify commits: I've tried pushing "my own" status to the commit here, which resulted in this: What's happening here, then, is that I'm pushing the same commit to CircleCI on both this branch and the I think this can be approved now: if you prefer to take @lgp171188's suggestion just put it in the approval and I'll revert my change before merging. |
@lgp171188, The current change is fine. We now have the option to run clean up jobs by -
The integration failure CI job is failing for a known unrelated issue. @kewne can you remove your own status and rerun CI checks in this branch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kewne, @lgp171188 Thanks a lot for working on improving this. LGTM 👍
- I tested this: checked the output of Circle CI job
- I read through the code
- I checked for accessibility issues: N/A
- Includes documentation
- I made sure any change in configuration variables is reflected in the corresponding client's
configuration-secure
repository: N/A
@kewne can you re-run the CI and fix the small nit I've mentioned? :) Then this is good to merge.
This adds the following to the list of resources deleted by the cleanup job: * DNS records for sub-domains * DNS record for active vm * Empty MySQL databases Additionally, it allows running the cleanup job manually from any branch. Related tickets: * [BB-4378](https://tasks.opencraft.com/browse/BB-4378)
201456e
to
50721ae
Compare
@kewne, it looks like there are some issues in the changes made in this PR that are causing the CC @shimulch |
@lgp171188 thanks for noticing! I don't think I have access to properly debug this though, I'd either need to run it locally but don't have Gandi credentials, and to run it in the pipeline I'd have to break the domain name masking. Any idea what I can do here? |
@kewne, you can re-run the failing job with SSH and that will allow you to log in to the container with your GitHub SSH key(s) and debug the issue. |
This issue will be fixed in #826 |
This PR fixes the issues that were preventing the cleanup of some unused CI resources like MySQL databases, Gandi DNS records, etc.
It also changes the CircleCI workflow definitions to allow pushing to the
ci-cleanup
branch for running cleanup on-demand (similar to howstage
is used for the frontend).Testing
ci-cleanup
cleanup
jobLinks