Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Publish Buildkite Packages — Fix Urls #2833

Merged
merged 3 commits into from
Jun 13, 2024
Merged

Conversation

sj26
Copy link
Member

@sj26 sj26 commented Jun 13, 2024

Continuing from #2824, it's now failing with a "not found":

image

I found the matching trace in Datadog APM:

https://app.datadoghq.com/apm/trace/1355574743850893837

which revealed the request path was:

/v2/packages/organizations/buildkite/agent-rpm-experimental/registries/buildkite/agent-rpm-experimental/packages

The problem is the organization and registry slug weren't being split up quite right. The glob was the wrong way around 🤦

Given:

REGISTRY="acme-inc/widgets"

Before:

ORGANIZATION_SLUG="${REGISTRY%*/}"
# => ORGANIZATION_SLUG=acme-inc/widgets

REGISTRY_SLUG="${REGISTRY#/*}"
# => REGISTRY_SLUG=acme-inc/widgets

After:

ORGANIZATION_SLUG="${REGISTRY%/*}"
# => ORGANIZATION_SLUG=acme-inc

REGISTRY_SLUG="${REGISTRY#*/}"
# => REGISTRY_SLUG=widgets

(I swear I tested these to check they were the right way around, but clearly have done something silly along the way.)

I've also adjusted the curl command to exit non-zero on HTTP error codes, so the step wouldn't have been green in this case or for any future errors.

sj26 added 2 commits June 13, 2024 10:17
The glob was the wrong way around 🤦

Given:

   REGISTRY="acme-inc/widgets"

Before:

   ORGANIZATION_SLUG="${REGISTRY%*/}"
   # => ORGANIZATION_SLUG=acme-inc/widgets

After:

   ORGANIZATION_SLUG="${REGISTRY%/*}"
   # => ORGANIZATION_SLUG=acme-inc
@sj26 sj26 requested review from a team June 13, 2024 00:24
@sj26 sj26 self-assigned this Jun 13, 2024
@sj26 sj26 changed the title Publish buildkite packages fix urls Publish Buildkite Packages — Fix Urls Jun 13, 2024
@sj26 sj26 enabled auto-merge June 13, 2024 00:49
@sj26 sj26 merged commit 907c5a5 into main Jun 13, 2024
1 check passed
@sj26 sj26 deleted the publish-buildkite-packages-fix-urls branch June 13, 2024 00:55
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants