Skip to content

Commit

Permalink
chore(build): fix flaky validate examples step (#11705)
Browse files Browse the repository at this point in the history
**What this PR does / why we need it**:
`validate-example-configs` step is flaky and fails with the following
error: `[Text file busy](bash: line 1: ./cmd/loki/loki: Text file busy)`

looks like the recently added `validate-dev-cluster-config` runs in
parallel. since both steps run loki target first, they often end up
updating the binary when the other step is executing it.

this pr fixes this by running these steps sequentially

**Which issue(s) this PR fixes**:
Fixes #<issue number>

**Special notes for your reviewer**:

**Checklist**
- [x] Reviewed the
[`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md)
guide (**required**)
- [ ] Documentation added
- [ ] Tests updated
- [ ] `CHANGELOG.md` updated
- [ ] If the change is worth mentioning in the release notes, add
`add-to-release-notes` label
- [ ] Changes that require user attention or interaction to upgrade are
documented in `docs/sources/setup/upgrade/_index.md`
- [ ] For Helm chart changes bump the Helm chart version in
`production/helm/loki/Chart.yaml` and update
`production/helm/loki/CHANGELOG.md` and
`production/helm/loki/README.md`. [Example
PR](d10549e)
- [ ] If the change is deprecating or removing a configuration option,
update the `deprecated-config.yaml` and `deleted-config.yaml` files
respectively in the `tools/deprecated-config-checker` directory.
[Example
PR](0d4416a)
  • Loading branch information
ashwanthgoli committed Jan 18, 2024
1 parent e7b782b commit 423f3e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .drone/drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ local build_image_tag = '0.33.0';
'GIT_TARGET_BRANCH="$DRONE_TARGET_BRANCH"',
]) { depends_on: ['loki'], when: onPRs },
make('validate-example-configs', container=false) { depends_on: ['loki'] },
make('validate-dev-cluster-config', container=false) { depends_on: ['loki'] },
make('validate-dev-cluster-config', container=false) { depends_on: ['validate-example-configs'] },
make('check-example-config-doc', container=false) { depends_on: ['clone'] },
{
name: 'build-docs-website',
Expand Down
4 changes: 2 additions & 2 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ steps:
- commands:
- make BUILD_IN_CONTAINER=false validate-dev-cluster-config
depends_on:
- loki
- validate-example-configs
environment: {}
image: grafana/loki-build-image:0.33.0
name: validate-dev-cluster-config
Expand Down Expand Up @@ -2113,6 +2113,6 @@ kind: secret
name: gpg_private_key
---
kind: signature
hmac: fe7669a21410ae5f2d1ad6b6205fdc582af874f65f7bd6a679731a88174e3a1c
hmac: 457592d17208477ceb480f81dbdb88f7b95a5ad015c88d9d6fed06c2422a52f9

...

0 comments on commit 423f3e9

Please sign in to comment.