Commit c14ab0c
authored
Handle sync cloudbeat with snapshots not published (#7179)
### Summary of your changes
Makes the hermit.hcl version sync self-healing and safe to automate.
Two changes:
- scripts/sync_internal_cloudbeat_version.sh, before opening a sync PR,
the script now checks that the target ${CLOUDBEAT_VERSION}-SNAPSHOT is
actually published on the Elastic artifacts API (is_snapshot_published).
If it isn't available yet, it reverts the local edit and exits cleanly,
so we never pin a version whose agent artifacts don't exist. If the API
can't be reached, it skips to stay safe.
- .github/workflows/sync-internal-cloudbeat-version.yml, added a daily
schedule trigger (the previous push trigger was commented out, so the
sync only ever ran manually and hermit.hcl drifted out of sync with
version.go).
Together this closes the gap that caused
[security-team#17923](elastic/security-team#17923):
hermit.hcl was stuck at 9.4.0 while version.go had moved on, so the
test-runner requested a 9.4.0-SNAPSHOT agent that no longer exists.
With this, the sync runs daily and opens a hermit.hcl bump PR
automatically as soon as the new snapshot is published, respecting the
"artifacts must exist first" constraint that previously required a
manual run.1 parent 735624b commit c14ab0c
2 files changed
Lines changed: 56 additions & 5 deletions
File tree
- .github/workflows
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
21 | 51 | | |
22 | 52 | | |
23 | 53 | | |
24 | 54 | | |
25 | 55 | | |
26 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
27 | 78 | | |
28 | 79 | | |
29 | 80 | | |
| |||
46 | 97 | | |
47 | 98 | | |
48 | 99 | | |
49 | | - | |
50 | 100 | | |
51 | 101 | | |
52 | 102 | | |
0 commit comments