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

Build Number #896

Open
sils opened this issue Jul 16, 2015 · 19 comments
Open

Build Number #896

sils opened this issue Jul 16, 2015 · 19 comments

Comments

@sils
Copy link
Contributor

sils commented Jul 16, 2015

Hey,

we want to use rultor for deploying our project when stuff gets merged to master. However for that we need some unique ID that is guaranteed to be higher than the last time the action was done, some may call this a build number :) Your docs don't really state such a thing exist, at least I didn't find it.

We'd love to switch to rultor for such things, currently we're using CI which is very comfortable but lacks the "pre-merge-security" and simulating deployment steps on wip branches isn't really the same.

@yegor256
Copy link
Owner

@sils1297 can't you use current date in milliseconds for that?

date +%s 

@sils
Copy link
Contributor Author

sils commented Jul 16, 2015

@yegor256 that is a very high number and feels somewhat hacky, I'd rather prefer real build numbers.

@yegor256
Copy link
Owner

@sils1297 each "talk" (a Github issue, for example) in rultor has its own number, and each build inside the talk has a number as well. Thus, we have two numbers... We can expose them both to all scripts, like ${talk} and ${build}. What do you think?

@sils
Copy link
Contributor Author

sils commented Jul 16, 2015

@yegor256 sounds good, I assume the build is not unique across talks though? I think people would prefer simplicity, i.e. a simple build number from which in the best case they even can generate an URL to the rultor log. (CircleCI does this.)

@yegor256
Copy link
Owner

@sils1297 yes, each build has a unique number and it's a combination of these two, for example, your build: http:https://www.rultor.com/t/4513-122032736 Pay attention to the end of the URL. 4513 is the talk number and 122032736 is a unique ID of the build inside the talk. We're using Github message ID for simplicity.

So, a unique address of this build is 4513-122032736

@yegor256
Copy link
Owner

@sils1297 but there is no guarantee that they will go consequentially :(

@sils
Copy link
Contributor Author

sils commented Jul 16, 2015

@yegor256 so I guess we have no choice but use the good old time at least on short term.

@yegor256
Copy link
Owner

@sils1297 well, we can add a unique incremental number to the system, which will uniquely identify builds across the entire Rultor. It's not a big problem, but do we need this? Let's think.. How much difference will it have from good old date?

@sils
Copy link
Contributor Author

sils commented Jul 16, 2015

@yegor256

  • It's a bit less useful because date actually provides a hidden information.
  • It's probably a high number too but probably lower.
  • It doesn't feel hacky for your users because they are just using something as intended. (Actually even providing the date in a $BUILD_NUM variable would be better for the usability I think.)

FWIW, the ideal solution would be a number that is only unique per repository IMO. This would then be a real build number.

Just make sure you use the right time, in some time zones theres summer/winter time and stuff that needs to be avoided. Other than that I see no big risks.

@yegor256 yegor256 self-assigned this Jul 16, 2015
@alex-palevsky alex-palevsky added this to the 2.0 milestone Jul 17, 2015
@alex-palevsky
Copy link
Contributor

@sils1297 attached this issue to milestone "2.0" (let me know if this is wrong)

@alex-palevsky
Copy link
Contributor

@yegor256 this is your task now,help us

@sils
Copy link
Contributor Author

sils commented Jul 18, 2015

@yegor256 fyi we ended up using date --utc +%Y%m%d%H%M%S to get the full "meaning" advantage.

@yegor256
Copy link
Owner

@alex-palevsky assign someone else pls

@alex-palevsky
Copy link
Contributor

@alex-palevsky assign someone else pls

@yegor256 30 points deducted from your rating

@alex-palevsky
Copy link
Contributor

@alex-palevsky assign someone else pls

@yegor256 right, I'll try to find someone else for this task

@original-brownbear
Copy link
Contributor

@alex-palevsky this is postponed

@alex-palevsky
Copy link
Contributor

@alex-palevsky this is postponed

@original-brownbear got it, "postponed" label here

@alex-palevsky
Copy link
Contributor

@alex-palevsky this is postponed

@original-brownbear someone else will help in this task, no problem at all

@yegor256 yegor256 removed DEV labels Nov 1, 2017
@yegor256 yegor256 reopened this Sep 10, 2022
@yegor256 yegor256 removed their assignment Sep 10, 2022
@0crat
Copy link
Collaborator

0crat commented Sep 10, 2022

Job gh:yegor256/rultor#896 is not assigned, can't get performer

@yegor256 yegor256 removed this from the 2.0 milestone Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants