Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .github/workflows/bump-gem-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ on: # yamllint disable-line rule:truthy
workflow_dispatch:
inputs:
version:
description: Version to update to
description: Version to update to; should usually have .dev suffix e.g. 2.23.0.dev
required: true
type: string
workflow_call:
inputs:
version:
description: Version to update to
description: Version to update to; should usually have .dev suffix e.g. 2.23.0.dev
required: true
type: string
Comment on lines 6 to 15
Copy link
Member

Choose a reason for hiding this comment

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

Minor: Rather than an indication, should we make the rake task actually fail if it's not .dev?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know if this would be OK...

Copy link
Member

Choose a reason for hiding this comment

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

If it turns out to not be great, we can always undo it -- what's the worst thing that can happen if a rake task used to bump the version refuses to bump it?

Copy link
Member

Choose a reason for hiding this comment

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

(You can say it was my fault 🤣 )

Copy link
Member Author

Choose a reason for hiding this comment

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

This comment is on a GH workflow change but you suggest changing the rake task. The rake task is used during release process where it's getting the version-to-be-released as the argument (e.g. 2.23.0), so that definitely cannot be constrained to dev only. Did you mean the rake task or the GH workflow restriction? For GH workflow I'd have to research how to do that.

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually I thought the release bump was triggered from https://github.com/DataDog/fast_castle/blob/main/dd-trace-rb/steps.rb but I don't see where now, maybe I'm wrong on that too.

Copy link
Member

Choose a reason for hiding this comment

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

Actually, it wasn't needed before, but we may need to adjust that. If you think about it, before, there was only 1 thing needed: previous version -> next version. Master would be all set for release.

Now due to this PR we'll have previous version -> next dev. We'll need to change fast_castle (or something else) to have next dev -> next version.


Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Update version file
run: |
echo "Updating version to ${NEXT_VERSION}"
bundle exec rake version:bump["${NEXT_VERSION}]"
bundle exec rake "version:bump[${NEXT_VERSION}]"

- name: Generate GitHub App Token
id: generate-token
Expand Down
25 changes: 18 additions & 7 deletions .gitlab/patch_gem_version.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
#!/bin/bash

set -e

echo CI=$1
echo MONOTONIC_ID=$2
echo GIT_REF=$3
echo GIT_COMMIT_SHA=$4
CI=$1
MONOTONIC_ID=$2
GIT_REF=$3
GIT_COMMIT_SHA=$4

if test -z "$CI" || test -z "$MONOTONIC_ID" || test -z "$GIT_REF" || test -z "$GIT_COMMIT_SHA"; then
echo Some required variables are missing - this script is meant to run in a CI enviroment 1>&2
exit 1
fi

echo CI=$CI
echo MONOTONIC_ID=$MONOTONIC_ID
echo GIT_REF=$GIT_REF
echo GIT_COMMIT_SHA=$GIT_COMMIT_SHA

git_branch="${3#refs/heads/}"
git_branch="${GIT_REF#refs/heads/}"
echo git_branch="${git_branch}"

git_branch_hash=$(echo "$git_branch" | ruby -rdigest -n -e 'print Digest::SHA256.hexdigest($_.chomp)[0, 6]')
echo git_branch_hash="${git_branch_hash}"

git_short_sha=${4:0:8}
git_short_sha=${GIT_COMMIT_SHA:0:8}
echo git_short_sha=$git_short_sha

PRE=dev
Expand All @@ -26,7 +37,7 @@ echo PRE="${PRE}"
# for identification.
# - BUILD has commit next for traceability, prefixed git-describe
# style by `g` for identification.
BUILD="b${git_branch_hash}.${1}${2}.g${git_short_sha}"
BUILD="b${git_branch_hash}.${CI}${MONOTONIC_ID}.g${git_short_sha}"
echo BUILD="${BUILD}"

# Patch in components
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_activesupport.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_aws.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_contrib.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_contrib_old.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_core_old.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_dalli_2.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_dalli_latest.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_elasticsearch_7.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_elasticsearch_latest.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_excon_latest.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_faraday_latest.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_graphql_1.13.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_graphql_2.0.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_graphql_2.1.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_graphql_2.2.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_graphql_2.3.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_http.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_karafka_latest.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_karafka_min.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_mongo_latest.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_mongo_min.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_opensearch_2.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_opensearch_latest.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_rack_1.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_rack_2.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_rack_latest.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_rails61_mysql2.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_rails61_postgres.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_rails61_postgres_redis.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_rails61_semantic_logger.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_rails_old_redis.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_redis_3.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_redis_4.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_redis_latest.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_10.0_relational_db.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading