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

oblt-cli/setup: version input precedence #73

Merged
merged 3 commits into from
Jul 2, 2024

Conversation

reakaleek
Copy link
Member

@reakaleek reakaleek commented Jul 1, 2024

It's not a breaking change because #69 has not been released yet.

This change makes the action prefer the version input if both version and version-file are defined.

Additionally, it will add a warning annotation.

image

It will also add a notice annotation informing you about the downloaded version.

image

@reakaleek reakaleek force-pushed the feature/fix-version-version-file-precedence branch from e66c3c6 to ebcfe0b Compare July 1, 2024 20:50
@reakaleek reakaleek added the changelog:enhancement When you enhance an existing feature label Jul 1, 2024
@reakaleek reakaleek changed the title Version precedence. Prefer version over version-file oblt-cli/setup: version input precedence Jul 1, 2024
@reakaleek reakaleek marked this pull request as ready for review July 1, 2024 21:01
@reakaleek reakaleek requested a review from a team July 1, 2024 21:01
@reakaleek reakaleek self-assigned this Jul 1, 2024
else
echo "[ERROR] ${OBLT_CLI_VERSION_FILE} file not found."
echo "::error title=elastic/oblt-actions/oblt-cli/setup::version-file not found: ${version_file}"
Copy link
Member

Choose a reason for hiding this comment

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

If version is nil, what's the reason this condition fails rather than installing the latest version?

I see # Downloads the latest release if OBLT_CLI_VERSION is not set is not anymore the case.

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 removed the comment. But I think the behavior already changed in #54

Copy link
Member

Choose a reason for hiding this comment

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

      - uses: elastic/oblt-actions/oblt-cli/setup@v1
        with:
          github-token: ${{ secrets.PAT }}
          version: ""

Maybe version: "" is not valid but version: latest as you pointed out earlier. Then this comment/error can be set in that particular case. WDYT?

Copy link
Member

@v1v v1v left a comment

Choose a reason for hiding this comment

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

I think this change is a breaking change

@reakaleek
Copy link
Member Author

I think this change is a breaking change

For the reason mentioned in #73 (comment)
I don't think this is a breaking change.

Also, the version-file input has not yet been released.

@reakaleek reakaleek requested a review from v1v July 2, 2024 10:16
@reakaleek reakaleek merged commit f149593 into main Jul 2, 2024
11 checks passed
@reakaleek reakaleek deleted the feature/fix-version-version-file-precedence branch July 2, 2024 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:enhancement When you enhance an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants