Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[admin] Validate version format in release workflow #7627

Closed
mx-psi opened this issue May 4, 2023 · 11 comments
Closed

[admin] Validate version format in release workflow #7627

mx-psi opened this issue May 4, 2023 · 11 comments
Assignees
Labels
easy Complexity: Easy good first issue Good for newcomers help wanted Good issue for contributors to OpenTelemetry Service to pick up priority:p2 Medium release:retro Issues discussed in a release retrospective

Comments

@mx-psi
Copy link
Member

mx-psi commented May 4, 2023

We don't do any validation on the version introduced for the prepare-release workflow, but we have some restrictions on the version format as documented here:

on:
workflow_dispatch:
# Determine the version number that will be assigned to the release. During the beta phase, we increment
# the minor version number and set the patch number to 0.
inputs:
candidate-stable:
required: true
description: Release candidate version (stable, like 1.0.0-rc4). Don't include `v`.
current-stable:
required: true
description: Current version (stable, like 1.0.0-rc3). Don't include `v`.
candidate-beta:
required: true
description: Release candidate version (beta, like 0.70.0). Don't include `v`.
current-beta:
required: true
description: Current version (beta, like 0.69.1). Don't include `v`.

We should add some validation to make the release workflow fail fast if the tags don't match the expected schema.

Relates to #7576

@mx-psi mx-psi added priority:p2 Medium release:retro Issues discussed in a release retrospective help wanted Good issue for contributors to OpenTelemetry Service to pick up good first issue Good for newcomers easy Complexity: Easy labels May 4, 2023
@Abhishek-569
Copy link
Contributor

I want to work on this.

@mx-psi
Copy link
Member Author

mx-psi commented May 30, 2023

Assigned to you @Abhishek-569 :)

@Abhishek-569
Copy link
Contributor

Thanks. @mx-psi is there any place to learn on how to add validation in a workflow?

@mx-psi
Copy link
Member Author

mx-psi commented May 30, 2023

Github does not have any form of input validation built-in, so you will have to add a new step to this job

and write a small bash script to check for the format (e.g. by using a regular expression)

@Abhishek-569
Copy link
Contributor

okay thanks.

@Abhishek-569
Copy link
Contributor

Please check this PR #8135 for this issue. @mx-psi

@mx-psi
Copy link
Member Author

mx-psi commented Aug 1, 2023

We ran into this on v0.82.0 as well

@serverless-mom
Copy link

I'd like to work on this.

@Sanket-0510
Copy link
Contributor

Hey @mx-psi I would like to take over this issue, I'll try to open PR very you assign this to me for sure.

mx-psi pushed a commit that referenced this issue Mar 1, 2024
**Description:** <Describe what has changed.>
enhance the "Automation - Prepare Release" GitHub Actions workflow by
adding version format validation. The workflow now includes a new job,
"validate-version," which checks whether the provided version inputs
match the expected schema

**Link to tracking Issue:** <Issue number if applicable> #7627

---------

Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>
@mx-psi
Copy link
Member Author

mx-psi commented Mar 1, 2024

Thanks for fixing this @Sanket-0510 !

@mx-psi mx-psi closed this as completed Mar 1, 2024
@Sanket-0510
Copy link
Contributor

Thanks for fixing this @Sanket-0510 !

My pleasure ❤️❤️✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy Complexity: Easy good first issue Good for newcomers help wanted Good issue for contributors to OpenTelemetry Service to pick up priority:p2 Medium release:retro Issues discussed in a release retrospective
Projects
None yet
Development

No branches or pull requests

4 participants