Checking baseline before publishing

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Checking baseline before publishing

Esteban A. Maringolo
Hi,

How can I check that my baseline works without having to publish
everything, check that it fails and then going to the origin, fixing,
etc?

I might be particularly idiot to always miss something, I usually have
to try at least four times (in a blank image) that my Baseline,
dependencies, etc. works as expected.

There must be some other way.

Esteban A. Maringolo

Reply | Threaded
Open this post in threaded view
|

Re: Checking baseline before publishing

CyrilFerlicot
On 8/27/2020 4:10 AM, Esteban Maringolo wrote:

> Hi,
>
> How can I check that my baseline works without having to publish
> everything, check that it fails and then going to the origin, fixing,
> etc?
>
> I might be particularly idiot to always miss something, I usually have
> to try at least four times (in a blank image) that my Baseline,
> dependencies, etc. works as expected.
>
> There must be some other way.
>
> Esteban A. Maringolo
>

Hi,

I usually commit without pushing, then in a new image I add my local
clone and launch the install of the baseline.

An alternative is to take a clean image, update the baseline by hand,
and load it if you don't want to commit.

I always use a clean image to be really sure nothing will impact.

--
Cyril Ferlicot
https://ferlicot.fr

Reply | Threaded
Open this post in threaded view
|

Re: Checking baseline before publishing

jvalteren@objectguild.com
In reply to this post by Esteban A. Maringolo
Hi Esteban,

You might want to give smalltalkCI a try: https://github.com/hpi-swa/smalltalkCI

I've recently started using it myself, with GitLab CI and GitHub Actions, but one of the cool things is that you can use it to test your build locally.

For example, create a .smalltalk.ston file for your project which loads the baseline that you want to test, like this:

SmalltalkCISpec {
  #loading : [
    SCIMetacelloLoadSpec {
      #baseline : 'MyProject',
      #directory : 'source',
      #load : [ 'default' ],
      #onWarningLog : true,
      #platforms : [ #pharo ]
    }
  ],
  #testing : {
    #categories : [ 'MyProject-Tests' ]
  }
}

Then clone the smalltalkCI repo locally and open a terminal on its location, for example /Users/johndoe/git/smalltalkCI. You can then simply use smalltalkCI to build a Pharo image of your baseline, which effectively tests the correct working of your baseline:

bin/smalltalkci -s "Pharo64-8.0" /Users/johndoe/git/MyProject/.smalltalk.ston

By default, it will run all tests in the image, but you can change the list of tests being run by modifying the .smalltalk.ston file accordingly (see https://github.com/hpi-swa/smalltalkCI#testcase-selection).

Hope this helps!

Kind regards,

Jonathan van Alteren

Founding Member | Object Guild B.V.
Sustainable Software for Purpose-Driven Organizations

[hidden email]
On 27 Aug 2020, 04:12 +0200, Esteban Maringolo <[hidden email]>, wrote:
Hi,

How can I check that my baseline works without having to publish
everything, check that it fails and then going to the origin, fixing,
etc?

I might be particularly idiot to always miss something, I usually have
to try at least four times (in a blank image) that my Baseline,
dependencies, etc. works as expected.

There must be some other way.

Esteban A. Maringolo

Reply | Threaded
Open this post in threaded view
|

Re: Checking baseline before publishing

Esteban A. Maringolo
Hi Jonathan,

I never thought of SmalltalkCI for that (I use Gitlab) but in essence
it still requires a trial and error approach (of committing the
Baseline and loading it afterwards to see if it works).

Metacello has a "record" operation that basically does a dry run of
the load, but I don't know if there is a way to do it using the
Baseline in the image instead of one in a repository.

Regards!

Esteban A. Maringolo

On Fri, Aug 28, 2020 at 10:10 AM Jonathan van Alteren
<[hidden email]> wrote:

>
> Hi Esteban,
>
> You might want to give smalltalkCI a try: https://github.com/hpi-swa/smalltalkCI
>
> I've recently started using it myself, with GitLab CI and GitHub Actions, but one of the cool things is that you can use it to test your build locally.
>
> For example, create a .smalltalk.ston file for your project which loads the baseline that you want to test, like this:
>
> SmalltalkCISpec {
>   #loading : [
>     SCIMetacelloLoadSpec {
>       #baseline : 'MyProject',
>       #directory : 'source',
>       #load : [ 'default' ],
>       #onWarningLog : true,
>       #platforms : [ #pharo ]
>     }
>   ],
>   #testing : {
>     #categories : [ 'MyProject-Tests' ]
>   }
> }
>
> Then clone the smalltalkCI repo locally and open a terminal on its location, for example /Users/johndoe/git/smalltalkCI. You can then simply use smalltalkCI to build a Pharo image of your baseline, which effectively tests the correct working of your baseline:
>
> bin/smalltalkci -s "Pharo64-8.0" /Users/johndoe/git/MyProject/.smalltalk.ston
>
> By default, it will run all tests in the image, but you can change the list of tests being run by modifying the .smalltalk.ston file accordingly (see https://github.com/hpi-swa/smalltalkCI#testcase-selection).
>
> Hope this helps!
>
> Kind regards,
>
> Jonathan van Alteren
>
> Founding Member | Object Guild B.V.
> Sustainable Software for Purpose-Driven Organizations
>
> [hidden email]
> On 27 Aug 2020, 04:12 +0200, Esteban Maringolo <[hidden email]>, wrote:
>
> Hi,
>
> How can I check that my baseline works without having to publish
> everything, check that it fails and then going to the origin, fixing,
> etc?
>
> I might be particularly idiot to always miss something, I usually have
> to try at least four times (in a blank image) that my Baseline,
> dependencies, etc. works as expected.
>
> There must be some other way.
>
> Esteban A. Maringolo
>

Reply | Threaded
Open this post in threaded view
|

Re: Checking baseline before publishing

Dale Henrichs-3
Esteban,

#record _is_ run against the baseline that is in the image if it is
present. This is true for all of the Metacello commands - if the
BaselineOf is present it is used, if it is not present it will be
loaded. The #get command will load a fresh copy of the baseline from the
repository.

There is an option to ignore image state (#ignoreImage) when running
#record (or any other command) to simulate loading into an "empty" image
... depending upon the volume of output, you could read the report to
determine if the packages/projects that you are expecting to see are
being loaded and of course if your goal is to expose outright errors
#record should do that as well ...

Dale

On 8/28/20 10:59 AM, Esteban Maringolo wrote:

> Hi Jonathan,
>
> I never thought of SmalltalkCI for that (I use Gitlab) but in essence
> it still requires a trial and error approach (of committing the
> Baseline and loading it afterwards to see if it works).
>
> Metacello has a "record" operation that basically does a dry run of
> the load, but I don't know if there is a way to do it using the
> Baseline in the image instead of one in a repository.
>
> Regards!
>
> Esteban A. Maringolo
>
> On Fri, Aug 28, 2020 at 10:10 AM Jonathan van Alteren
> <[hidden email]> wrote:
>> Hi Esteban,
>>
>> You might want to give smalltalkCI a try: https://github.com/hpi-swa/smalltalkCI
>>
>> I've recently started using it myself, with GitLab CI and GitHub Actions, but one of the cool things is that you can use it to test your build locally.
>>
>> For example, create a .smalltalk.ston file for your project which loads the baseline that you want to test, like this:
>>
>> SmalltalkCISpec {
>>    #loading : [
>>      SCIMetacelloLoadSpec {
>>        #baseline : 'MyProject',
>>        #directory : 'source',
>>        #load : [ 'default' ],
>>        #onWarningLog : true,
>>        #platforms : [ #pharo ]
>>      }
>>    ],
>>    #testing : {
>>      #categories : [ 'MyProject-Tests' ]
>>    }
>> }
>>
>> Then clone the smalltalkCI repo locally and open a terminal on its location, for example /Users/johndoe/git/smalltalkCI. You can then simply use smalltalkCI to build a Pharo image of your baseline, which effectively tests the correct working of your baseline:
>>
>> bin/smalltalkci -s "Pharo64-8.0" /Users/johndoe/git/MyProject/.smalltalk.ston
>>
>> By default, it will run all tests in the image, but you can change the list of tests being run by modifying the .smalltalk.ston file accordingly (see https://github.com/hpi-swa/smalltalkCI#testcase-selection).
>>
>> Hope this helps!
>>
>> Kind regards,
>>
>> Jonathan van Alteren
>>
>> Founding Member | Object Guild B.V.
>> Sustainable Software for Purpose-Driven Organizations
>>
>> [hidden email]
>> On 27 Aug 2020, 04:12 +0200, Esteban Maringolo <[hidden email]>, wrote:
>>
>> Hi,
>>
>> How can I check that my baseline works without having to publish
>> everything, check that it fails and then going to the origin, fixing,
>> etc?
>>
>> I might be particularly idiot to always miss something, I usually have
>> to try at least four times (in a blank image) that my Baseline,
>> dependencies, etc. works as expected.
>>
>> There must be some other way.
>>
>> Esteban A. Maringolo
>>

Reply | Threaded
Open this post in threaded view
|

Re: Checking baseline before publishing

jvalteren@objectguild.com
In reply to this post by Esteban A. Maringolo
Ah yes, sorry, you're right. You do have to commit/push for that to work.

I'm interested to hear what your experience is with using #record.

Kind regards,

Jonathan van Alteren

Founding Member | Object Guild B.V.
Sustainable Software for Purpose-Driven Organizations

[hidden email]
<script> <![CDATA[ document.onreadystatechange = function () { if (document.readyState != 'loading') { if (document.readyState == 'interactive') { initialScale = 220.0 / window.innerWidth v = "initial-scale="+ initialScale +",maximum-scale="+ initialScale +",minimum-scale="+ initialScale +",width=device-width" console.log(v) scale = 220.0 / window.innerWidth if (scale > 1) { return } scale = Math.min(0.5, scale) document.querySelector("meta[name=viewport]").setAttribute('content', v) JavaInterface.scaleUpdated(scale) } } } ]]> </script>
On 28 Aug 2020, 20:00 +0200, Esteban Maringolo <[hidden email]>, wrote:
Hi Jonathan,

I never thought of SmalltalkCI for that (I use Gitlab) but in essence
it still requires a trial and error approach (of committing the
Baseline and loading it afterwards to see if it works).

Metacello has a "record" operation that basically does a dry run of
the load, but I don't know if there is a way to do it using the
Baseline in the image instead of one in a repository.

Regards!

Esteban A. Maringolo

On Fri, Aug 28, 2020 at 10:10 AM Jonathan van Alteren
<[hidden email]> wrote:

Hi Esteban,

You might want to give smalltalkCI a try: https://github.com/hpi-swa/smalltalkCI

I've recently started using it myself, with GitLab CI and GitHub Actions, but one of the cool things is that you can use it to test your build locally.

For example, create a .smalltalk.ston file for your project which loads the baseline that you want to test, like this:

SmalltalkCISpec {
#loading : [
SCIMetacelloLoadSpec {
#baseline : 'MyProject',
#directory : 'source',
#load : [ 'default' ],
#onWarningLog : true,
#platforms : [ #pharo ]
}
],
#testing : {
#categories : [ 'MyProject-Tests' ]
}
}

Then clone the smalltalkCI repo locally and open a terminal on its location, for example /Users/johndoe/git/smalltalkCI. You can then simply use smalltalkCI to build a Pharo image of your baseline, which effectively tests the correct working of your baseline:

bin/smalltalkci -s "Pharo64-8.0" /Users/johndoe/git/MyProject/.smalltalk.ston

By default, it will run all tests in the image, but you can change the list of tests being run by modifying the .smalltalk.ston file accordingly (see https://github.com/hpi-swa/smalltalkCI#testcase-selection).

Hope this helps!

Kind regards,

Jonathan van Alteren

Founding Member | Object Guild B.V.
Sustainable Software for Purpose-Driven Organizations

[hidden email]
On 27 Aug 2020, 04:12 +0200, Esteban Maringolo <[hidden email]>, wrote:

Hi,

How can I check that my baseline works without having to publish
everything, check that it fails and then going to the origin, fixing,
etc?

I might be particularly idiot to always miss something, I usually have
to try at least four times (in a blank image) that my Baseline,
dependencies, etc. works as expected.

There must be some other way.

Esteban A. Maringolo


Reply | Threaded
Open this post in threaded view
|

Re: Checking baseline before publishing

Stéphane Ducasse


On 28 Aug 2020, at 23:45, Jonathan van Alteren <[hidden email]> wrote:

Ah yes, sorry, you're right. You do have to commit/push for that to work.

I'm interested to hear what your experience is with using #record.

My experience is that there is nothing better than what you propose. 


Kind regards,

Jonathan van Alteren

Founding Member | Object Guild B.V.
Sustainable Software for Purpose-Driven Organizations

[hidden email]
On 28 Aug 2020, 20:00 +0200, Esteban Maringolo <[hidden email]>, wrote:
Hi Jonathan,

I never thought of SmalltalkCI for that (I use Gitlab) but in essence
it still requires a trial and error approach (of committing the
Baseline and loading it afterwards to see if it works).

Metacello has a "record" operation that basically does a dry run of
the load, but I don't know if there is a way to do it using the
Baseline in the image instead of one in a repository.

Regards!

Esteban A. Maringolo

On Fri, Aug 28, 2020 at 10:10 AM Jonathan van Alteren
<[hidden email]> wrote:

Hi Esteban,

You might want to give smalltalkCI a try: https://github.com/hpi-swa/smalltalkCI

I've recently started using it myself, with GitLab CI and GitHub Actions, but one of the cool things is that you can use it to test your build locally.

For example, create a .smalltalk.ston file for your project which loads the baseline that you want to test, like this:

SmalltalkCISpec {
#loading : [
SCIMetacelloLoadSpec {
#baseline : 'MyProject',
#directory : 'source',
#load : [ 'default' ],
#onWarningLog : true,
#platforms : [ #pharo ]
}
],
#testing : {
#categories : [ 'MyProject-Tests' ]
}
}

Then clone the smalltalkCI repo locally and open a terminal on its location, for example /Users/johndoe/git/smalltalkCI. You can then simply use smalltalkCI to build a Pharo image of your baseline, which effectively tests the correct working of your baseline:

bin/smalltalkci -s "Pharo64-8.0" /Users/johndoe/git/MyProject/.smalltalk.ston

By default, it will run all tests in the image, but you can change the list of tests being run by modifying the .smalltalk.ston file accordingly (see https://github.com/hpi-swa/smalltalkCI#testcase-selection).

Hope this helps!

Kind regards,

Jonathan van Alteren

Founding Member | Object Guild B.V.
Sustainable Software for Purpose-Driven Organizations

[hidden email]
On 27 Aug 2020, 04:12 +0200, Esteban Maringolo <[hidden email]>, wrote:

Hi,

How can I check that my baseline works without having to publish
everything, check that it fails and then going to the origin, fixing,
etc?

I might be particularly idiot to always miss something, I usually have
to try at least four times (in a blank image) that my Baseline,
dependencies, etc. works as expected.

There must be some other way.

Esteban A. Maringolo



--------------------------------------------
Stéphane Ducasse
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France