Skip to content

Replace commitDate format to ISO8601#176

Open
palindrom615 wants to merge 2 commits into
line:mainfrom
palindrom615:fix-commitdate
Open

Replace commitDate format to ISO8601#176
palindrom615 wants to merge 2 commits into
line:mainfrom
palindrom615:fix-commitdate

Conversation

@palindrom615

Copy link
Copy Markdown

According to git document, git is using unique datetime format with --iso option.

Replacing it with strict ISO8601 format will improve usability.

@CLAassistant

CLAassistant commented Feb 15, 2024

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@ikhoon

ikhoon commented Feb 29, 2024

Copy link
Copy Markdown
Contributor

Replacing it with strict ISO8601 format will improve usability.

@palindrom615 May I know what usability is improved? For humans, --iso would be better for readability.
I am asking because this change could break the parsing logic of versions.properties in Armeria.
https://github.com/line/armeria/blob/2e99b180518f2543c9189a1fe00d5a711a4a7a49/core/src/main/java/com/linecorp/armeria/common/util/Version.java#L202-L204

@palindrom615

Copy link
Copy Markdown
Author

@ikhoon I see. that should not break anything. WDYT about adding commitISODate property as in 6b12c4e?

@palindrom615 May I know what usability is improved? For humans, --iso would be better for readability.

It saves some codes for parsing dateformat. For instance, jib uses iso8601.

jib {
    ...

    container {
        // depends on `common-git.gradle`
        if (
            project.ext.has("repoStatus") &&
            (project.ext.get("repoStatus") as Map<String, Any>)["repoStatus"] as String == "clean"
        ) {
            val repoStatus = project.ext.get("repoStatus") as Map<String, String>
            val commitISODate = repoStatus.get("commitISODate")
            creationTime.set(commitISODate)
        }
    }
}

@ikhoon

ikhoon commented Mar 15, 2024

Copy link
Copy Markdown
Contributor

WDYT about adding commitISODate property as in 6b12c4e?

Sounds good. I think we can keep both of them for a while and then deprecate and remove commitDate when all usages are migrated.

Would you be interested in sending a PR to Armeria as well when this PR is merged?

@ikhoon ikhoon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, @palindrom615!

@palindrom615

Copy link
Copy Markdown
Author

Would you be interested in sending a PR to Armeria as well when this PR is merged?

sure I can 🙇

@trustin trustin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sounds like a good idea. Thanks, @palindrom615 🙇

@minwoox minwoox left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, @palindrom615!

@minwoox

minwoox commented Jun 10, 2024

Copy link
Copy Markdown
Contributor

@jrhee17 Do you mind reviewing this PR? >_<

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.

5 participants