You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudberry.apache.org by "tuhaihe (via GitHub)" <gi...@apache.org> on 2025/02/08 10:30:33 UTC

[D] [Ideas] Improve Version Information for Source Builds [cloudberry]

GitHub user tuhaihe created a discussion: [Ideas] Improve Version Information for Source Builds

### Description

Currently, when Cloudberry is built from a source zip file (not cloned via git), the version information displayed is not matched the right info, always like this:

```
PostgreSQL 14.4 (Cloudberry Database 1.0.0 build dev) on x86_64-pc-linux-gnu...
```

This is not user-friendly for those compiling and installing Cloudberry from a downloaded source zip files. It makes it difficult for users to report issues, perform version upgrades, or confirm the exact build version, a concern raised multiple times across community channels in the past months.

I noticed that PostgreSQL addresses this by defining the version information explicitly in cases where git metadata is unavailable, as seen in this [commit](https://github.com/postgres/postgres/commit/6304632eaa2107bb1763d29e213ff166ff6104c0).

Would it be possible to adopt a similar approach in Cloudberry for non-git builds? I believe this could greatly improve version traceability. Would like to have your ideas.

### Use case/motivation

_No response_

### Related issues

_No response_

### Are you willing to submit a PR?

- [ ] Yes I am willing to submit a PR!

GitHub link: https://github.com/apache/cloudberry/discussions/909

----
This is an automatically sent email for dev@cloudberry.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@cloudberry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: dev-help@cloudberry.apache.org


Re: [D] [Ideas] Improve Version Information for Source Builds [cloudberry]

Posted by "my-ship-it (via GitHub)" <gi...@apache.org>.
GitHub user my-ship-it added a comment to the discussion: [Ideas] Improve Version Information for Source Builds

Is there a bug for versioning scripts? Why it is always 1.0.0 for Cloudberry Database.
How about following format for debug/release?

```
PostgreSQL 14.4 (Cloudberry Database 1.5.2+4859142 build dev) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 9.5.0, 64-bit compiled on Dec 12 2024 22:18:23
or
PostgreSQL 14.4 (Cloudberry Database 1.5.2+4859142 build release) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 9.5.0, 64-bit compiled on Dec 12 2024 22:18:23
```
Where 4859142 is the commit sha1 so that we could track down to commit point.


GitHub link: https://github.com/apache/cloudberry/discussions/909#discussioncomment-12102225

----
This is an automatically sent email for dev@cloudberry.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@cloudberry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: dev-help@cloudberry.apache.org


Re: [D] [Ideas] Improve Version Information for Source Builds [cloudberry]

Posted by "tuhaihe (via GitHub)" <gi...@apache.org>.
GitHub user tuhaihe added a comment to the discussion: [Ideas] Improve Version Information for Source Builds

Hey, I found we need to change the string `[1.0.0]` in this file for each release, like `[2.0.0-Aplha]`, `[2.0.0-Beta]`:

https://github.com/apache/cloudberry/blob/dd5aa2092f8a7b073ca6cf0ad53d575148e5339d/configure.ac#L23

Also need to generate a new configure file, and then return the right release number when building from the source tar files.

GitHub link: https://github.com/apache/cloudberry/discussions/909#discussioncomment-12169040

----
This is an automatically sent email for dev@cloudberry.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@cloudberry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: dev-help@cloudberry.apache.org


Re: [D] [Ideas] Improve Version Information for Source Builds [cloudberry]

Posted by "tuhaihe (via GitHub)" <gi...@apache.org>.
GitHub user tuhaihe closed a discussion: [Ideas] Improve Version Information for Source Builds

### Description

Currently, when Cloudberry is built from a source zip file (not cloned via git), the version information displayed is not matched the right info, always like this:

```
PostgreSQL 14.4 (Cloudberry Database 1.0.0 build dev) on x86_64-pc-linux-gnu...
```

This is not user-friendly for those compiling and installing Cloudberry from a downloaded source zip files. It makes it difficult for users to report issues, perform version upgrades, or confirm the exact build version, a concern raised multiple times across community channels in the past months.

I noticed that PostgreSQL addresses this by defining the version information explicitly in cases where git metadata is unavailable, as seen in this [commit](https://github.com/postgres/postgres/commit/6304632eaa2107bb1763d29e213ff166ff6104c0).

Would it be possible to adopt a similar approach in Cloudberry for non-git builds? I believe this could greatly improve version traceability. Would like to have your ideas.

### Use case/motivation

_No response_

### Related issues

_No response_

### Are you willing to submit a PR?

- [ ] Yes I am willing to submit a PR!

GitHub link: https://github.com/apache/cloudberry/discussions/909

----
This is an automatically sent email for dev@cloudberry.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@cloudberry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: dev-help@cloudberry.apache.org


Re: [D] [Ideas] Improve Version Information for Source Builds [cloudberry]

Posted by "my-ship-it (via GitHub)" <gi...@apache.org>.
GitHub user my-ship-it edited a comment on the discussion: [Ideas] Improve Version Information for Source Builds

Is there a bug for versioning scripts? Why it is always 1.0.0 for Cloudberry Database.
How about follow format below for debug/release?

```
PostgreSQL 14.4 (Cloudberry Database 1.5.2+4859142 build dev) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 9.5.0, 64-bit compiled on Dec 12 2024 22:18:23
or
PostgreSQL 14.4 (Cloudberry Database 1.5.2+4859142 build release) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 9.5.0, 64-bit compiled on Dec 12 2024 22:18:23
```
Where 4859142 is the commit sha1 so that we could track down to commit point.


GitHub link: https://github.com/apache/cloudberry/discussions/909#discussioncomment-12102225

----
This is an automatically sent email for dev@cloudberry.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@cloudberry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: dev-help@cloudberry.apache.org


Re: [D] [Ideas] Improve Version Information for Source Builds [cloudberry]

Posted by "tuhaihe (via GitHub)" <gi...@apache.org>.
GitHub user tuhaihe added a comment to the discussion: [Ideas] Improve Version Information for Source Builds

I can help create one PR to fix this.

GitHub link: https://github.com/apache/cloudberry/discussions/909#discussioncomment-12169109

----
This is an automatically sent email for dev@cloudberry.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@cloudberry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: dev-help@cloudberry.apache.org


Re: [D] [Ideas] Improve Version Information for Source Builds [cloudberry]

Posted by "tuhaihe (via GitHub)" <gi...@apache.org>.
GitHub user tuhaihe added a comment to the discussion: [Ideas] Improve Version Information for Source Builds

One PR has been created for this discussion: https://github.com/apache/cloudberry/pull/929. Welcome to have your comments.

GitHub link: https://github.com/apache/cloudberry/discussions/909#discussioncomment-12639371

----
This is an automatically sent email for dev@cloudberry.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@cloudberry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: dev-help@cloudberry.apache.org


Re: [D] [Ideas] Improve Version Information for Source Builds [cloudberry]

Posted by "tuhaihe (via GitHub)" <gi...@apache.org>.
GitHub user tuhaihe added a comment to the discussion: [Ideas] Improve Version Information for Source Builds

> Is there a bug for versioning scripts? Why it is always 1.0.0 for Cloudberry Database. How about follow format below for debug/release?

I guess there is no mechanism to detect the version information for the downloaded source tar files. It would be better if an engineer could help debug it.

> 
> ```
> PostgreSQL 14.4 (Cloudberry Database 1.5.2+4859142 build dev) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 9.5.0, 64-bit compiled on Dec 12 2024 22:18:23
> or
> PostgreSQL 14.4 (Cloudberry Database 1.5.2+4859142 build release) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 9.5.0, 64-bit compiled on Dec 12 2024 22:18:23
> ```
> 
> Where [4859142](https://github.com/apache/cloudberry/commit/48591423d310e2ae189abd1f3d13bbc861d25e6a) is the commit sha1 so that we could track down to commit point.

Agree. If we build the Cloudberry by git clone the source, will return like this.


GitHub link: https://github.com/apache/cloudberry/discussions/909#discussioncomment-12113311

----
This is an automatically sent email for dev@cloudberry.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@cloudberry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: dev-help@cloudberry.apache.org


Re: [D] [Ideas] Improve Version Information for Source Builds [cloudberry]

Posted by "my-ship-it (via GitHub)" <gi...@apache.org>.
GitHub user my-ship-it added a comment to the discussion: [Ideas] Improve Version Information for Source Builds

There is a script called https://github.com/apache/cloudberry/blob/main/getversion to do this. @edespino Could you please double check with it, thanks.

GitHub link: https://github.com/apache/cloudberry/discussions/909#discussioncomment-12114206

----
This is an automatically sent email for dev@cloudberry.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@cloudberry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: dev-help@cloudberry.apache.org


Re: [D] [Ideas] Improve Version Information for Source Builds [cloudberry]

Posted by "tuhaihe (via GitHub)" <gi...@apache.org>.
GitHub user tuhaihe edited a comment on the discussion: [Ideas] Improve Version Information for Source Builds

Hey, I found we need to change the string `[1.0.0]` in this file for each release, like `[2.0.0-Aplha]`, `[2.0.0-Beta]`:

https://github.com/apache/cloudberry/blob/dd5aa2092f8a7b073ca6cf0ad53d575148e5339d/configure.ac#L23

Also need to generate a new configure file, and then return the right release number when building from the source tar files.

Also, we can create one file `VERSION`, and input the version number, then it also can work.

In summary, for a lower workforce, we can set `[1.0.0]` to `[main]` in the configure.ac file—keep it unchanged in the future. We can also create a new text file, `VERSION,` and update it when a new version is released. It will be easier to change one text file than to regenerate the configure file by the `autoconf` command.

GitHub link: https://github.com/apache/cloudberry/discussions/909#discussioncomment-12169040

----
This is an automatically sent email for dev@cloudberry.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@cloudberry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: dev-help@cloudberry.apache.org