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

[WIP] Fix the version info for building from tar files #929

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tuhaihe
Copy link
Member

@tuhaihe tuhaihe commented Feb 14, 2025

Fow now, if we build Cloudberry from a source zip file (not using git
clone), the version information displayed is not matched the right one,
always return 1.0.0 like this:

   PostgreSQL 14.4 (Apache Cloudberry 1.0.0 build dev)

In this PR, I change the string from 1.0.0 to main to let the version
right, and create one new file VERSION for us to update the release
info easier. When users build Cloudberry from main tar files, then
will return the right info.

Please take a note that, for each release, we need to change the
VERSION file to match the version manually.

Note

this pr is based on #924

What does this PR do?

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


In this PR, including the following changes:

* Rename the project name from "Cloudberry Database" to "Apache
  Cloudberry"
* Update the website url to "cloudberry.apache.org"
* Update the contact email from "[email protected]" to
  "[email protected]" mailing list
Fow now, if we build Cloudberry from a source zip file (not using git
clone), the version information displayed is not matched the right one,
always return 1.0.0 like this:

```
   PostgreSQL 14.4 (Apache Cloudberry 1.0.0 build dev)
```

In this PR, I change the string from 1.0.0 to main to let the version
right, and create one new file `VERSION` for us to update the release
info easier. When users build Cloudberry from main tar files, then
will return the right info.

Please take a note that, for each release, we need to change the
VERSION file to match the version manually.
@yjhjstz
Copy link
Member

yjhjstz commented Feb 18, 2025

from the code dbeaver

public class CloudberryDataSource extends GreenplumDataSource {

    private static final Log log = Log.getLog(CloudberryDataSource.class);

    private Version cbVersion;

    public CloudberryDataSource(DBRProgressMonitor monitor, DBPDataSourceContainer container) throws DBException {
        super(monitor, container);
    }

    @Override
    public void initialize(@NotNull DBRProgressMonitor monitor) throws DBException {
        super.initialize(monitor);
        // Read server version
        if (serverVersion != null) {
            Matcher matcher = Pattern.compile("Cloudberry Database ([0-9\\.]+)").matcher(serverVersion);
            if (matcher.find()) {
                cbVersion = new Version(matcher.group(1));
            }
            gpVersion = new Version(7, 0, 0);
        }

        if (cbVersion == null) {
            cbVersion = new Version(1, 0, 0);
        }
    }
}

Cloudberry Database need a version, but not main .

@tuhaihe
Copy link
Member Author

tuhaihe commented Feb 20, 2025

Cloudberry Database need a version, but not main .

Agreed. For PG, I found they always use the next release version + devel, like 18devel. It's hard for us to define the next major version, right? One simple way is to set the main branch release as 99.0.0 or 999.0.0?

https://github.com/postgres/postgres/blob/7da344b9f84f0c63590a34136f3fa5d0ab128657/configure.ac#L20

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.

2 participants