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

sql: release version autoincrement #983

Merged
merged 26 commits into from
Oct 13, 2022
Merged

Conversation

egor-ryashin
Copy link
Contributor

@egor-ryashin egor-ryashin commented Oct 4, 2022

version autoincrement & protoc fix for Github Actions

@egor-ryashin egor-ryashin marked this pull request as ready for review October 5, 2022 09:26
Comment on lines 36 to 40
# - name: Install Protoc
# uses: arduino/setup-protoc@v1
# with:
# repo-token: ${{ secrets.GITHUB_TOKEN }}
# version: '21.5'
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you know why this installation option doesn't work? It seems to be widely used. We may also need protoc on the golang side soon, so would be nice to understand

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Are we using any cutting-edge features or could we just downgrade to the highest version it supports until this issue is resolved?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pjain1 , I wonder if need that specific version?

Copy link
Member

Choose a reason for hiding this comment

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

I just started with the latest stable and it was supported on Java side. For the test I installed protoc manually using the installation instructions given here.

Comment on lines 75 to 80
- name: Push version changes
uses: EndBug/add-and-commit@v7
with:
default_author: github_actions
add: sql/pom.xml
message: librillsql release v${{ steps.maven-version.outputs.version }}
Copy link
Contributor

Choose a reason for hiding this comment

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

This is going to cause a push directly to main, which feels a little dangerous – we would prefer always to have manual merges to main. I can see a few options:

  • Either run this once per PR and commit the version update to the PR. This has the risk that two simultaneous PRs will update to the same version, which requires manual intervention.
  • Or, have the developer manually bump the version (put the command in sql/README.md for convenience) and then have CI check that a pull request does not have the same version number as the one on main (so we don't forget)
  • Or, don't automatically release on merges to main – come up with another release approach (like a manually triggered workflow that checks that the version number has been updated)
  • Or, just use SHAs as version numbers

Any other ideas?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it's more dangerous than committing manually. But as a second option I can propose manual version change by PR committer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've changed it to autoincrement in a PR branch.
It checks version on 'push' and PR approval.

sql/pom.xml Outdated
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: empty newline

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Comment on lines 49 to 51
mvn package -Pnative-lib
mvn --batch-mode -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn test
mvn --batch-mode -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn package -Pnative-lib
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it necessary to add these flags here or could they be set in the pom.xml?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved to the config file

Copy link
Contributor

Choose a reason for hiding this comment

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

Still needs to be removed from this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

Comment on lines 20 to 22
# - os: windows todo fix windows builds, depends on setup-protoc action https://github.com/arduino/setup-protoc/issues/33
# arch: amd64
# runner: windows-latest
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add Windows back now that we fixed the protoc version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

Comment on lines 9 to 11
version_increment:
runs-on: ubuntu-latest
steps:
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of duplicating version_increment in both sql-test and sql-version-check, can you have it just in sql-version-check and then make the action run for both pull_request AND pull_request_review triggers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

Comment on lines 46 to 48
# - os: windows todo see sql-release.yml
# arch: amd64
# runner: windows-latest
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment about adding back as in sql-release?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@begelundmuller begelundmuller merged commit bde890b into main Oct 13, 2022
@begelundmuller begelundmuller deleted the sql-release-autoincrement branch October 13, 2022 14:49
djbarnwal pushed a commit that referenced this pull request Aug 3, 2023
* sql: release version autoincrement

* sql: release version autoincrement

* sql: release version autoincrement

* sql: release version autoincrement

* sql: release version autoincrement

* sql: release version autoincrement

* sql: release version autoincrement

* sql: release version autoincrement

* sql: release version autoincrement

* sql: release version autoincrement

* sql: release version autoincrement

* sql: release version autoincrement

* sql: release version autoincrement

* librillsql release v0.1.1

* sql: release version autoincrement

* sql: version autoincrement

* sql: version autoincrement

* sql: version autoincrement

* sql: version autoincrement

* sql: version autoincrement

* sql: version autoincrement

* sql: version autoincrement

* sql: version autoincrement

* sql: version autoincrement

* sql: version autoincrement

* fixes

Co-authored-by: egor-ryashin <egor.ryashin@rilldata.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants