microsoft / vscode-black-formatter

Formatting support for Python using the Black formatter
https://marketplace.visualstudio.com/items?itemName=ms-python.black-formatter
MIT License
146 stars 35 forks source link

The patch number is invalid sometimes if using GITHUB_RUN_ID #375

Closed EeyoreLee closed 8 months ago

EeyoreLee commented 8 months ago

It must be one to four numbers in the range 0 to 2147483647 for version number. The value of GITHUB_RUN_ID may out of range. How about GITHUB_RUN_NUMBER that will OOR after 2147483647 times update ? The only one disadvantages is that it's not fixed length.

karthiknadig commented 8 months ago

@EeyoreLee Can you clarify what the issue you are running into is? We don't really use GITHUB_RUN_ID for anything.

EeyoreLee commented 8 months ago

@karthiknadig - I noticed the step Update extension build number in .github/actions/build-vsix/action.yml that uses GITHUB_RUN_ID to generate version number. It may out of range like vscode-extension-yapf/actions. I change to version format by commit datetime now.

karthiknadig commented 8 months ago

@EeyoreLee That build is not published. It is specifically to validate that any PR does not break package building. For Microsoft extension they are built on azure, see here: https://github.com/microsoft/vscode-black-formatter/tree/main/build

for you case, you can change it as needed for yapf extension.

EeyoreLee commented 8 months ago

@jrieken - Thanks so much. How convenient xd. I saw we also use the 1 placeholder and the datetime. But the script in this repo, the version number will be inconsistent in retrying.