-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Added build step for generating Windows MSI #1153
Added build step for generating Windows MSI #1153
Conversation
692180d
to
c856f6f
Compare
Codecov Report
@@ Coverage Diff @@
## master #1153 +/- ##
==========================================
- Coverage 88.08% 88.06% -0.03%
==========================================
Files 203 203
Lines 14658 14658
==========================================
- Hits 12912 12908 -4
- Misses 1309 1311 +2
- Partials 437 439 +2
Continue to review full report at Codecov.
|
a451187
to
5e78a80
Compare
a2b5323
to
7f09b7c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need a bit of guidance with this PR. Please see the questions below:
- When should this step run? Shall we set this up similarly to the
publish-dev
&publish-stable
steps? (can't be combined into the same steps as will need to run under a diff executor unfortunately) - Where should we store the generated MSI? Afaik, there isn't really any standard package manager for storing MSIs. Is storing it as a release artifact enough? That would mean we only run this on
publish-stable
. Should we run a step to create the MSI on merge anyway, so we find out sooner if this somehow gets broken? - Also see question below re Makefile
.circleci/config.yml
Outdated
name: Install Wix Toolset | ||
command: | | ||
choco install wixtoolset | ||
setx /m PATH "%PATH%;C:\Program Files (x86)\WiX Toolset v3.11\bin" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Annoyingly we have to do this because the choco package doesn't take care of it for us: https://chocolatey.org/packages/wixtoolset#comment-3471097677
7f09b7c
to
67fd4b2
Compare
Do workspaces persist across executor types? I forget. If so then maybe you can add windows-msi to requires of publish-stable? And in the job store the msi using store_artifacts?
Not sure what you mean by this. It was run as part of the circleci job in this PR for instance even though it's not part of publish-stable right? |
btw would be nice to get into chocolatey repo (@jchengsfx did it for smart agent recently) |
67fd4b2
to
a6bbeef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@james-bebbington Let's rename the scripts/msi/
directory to packaging/msi/
, move make.ps1
to packaging/msi/
, and update the paths in the files accordingly.
@james-bebbington I think it's fine to build msi on every build. Like you say we don't want to find out it's broken after we make a release. It should happen in parallel to other things like running tests so I don't think it should make the build much longer. |
4eb6cfb
to
6a1d522
Compare
Cool - all done
I'll see how I go for time. Would be nice to add this, but we likely won't need it as we have another package manager for Windows on GCP. |
cfb43a7
to
9c19105
Compare
packaging/msi/make.ps1
Outdated
function New-MSI( | ||
[string]$Config="./examples/otel-local-config.yaml" | ||
) { | ||
$Version = If($env:VERSION) { $env:VERSION } else { "0.0.1" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also set VERSION
to the CIRCLE_TAG
env var (if it exists and matches \d+\.\d+\.\d+
, without the v
) for release builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done - since we're referring to a CircleCI specific env variable, I moved this code into the CircleCI config file.
Minor note: MSI Product Version only supports the regex format you specified (e.g. 0.0.1). The tag filter we use to determine when to publish releases allows additional characters at the end (e.g. v0.0.1-alpha). If we see a tag like that I've opted to just ignore the extra chars.
a900b7f
to
28f3ec8
Compare
28f3ec8
to
3ad05c4
Compare
@@ -73,7 +73,7 @@ workflows: | |||
only: /^v([0-9])+.([0-9])+.([0-9])+.*/ | |||
- cross-compile: | |||
requires: | |||
- build | |||
- setup-and-lint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this PR is ready to be merged, however, should I make the same change here as you made in https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/384/files and replace build with cross-compile? (I had changed this dependency to speed up the overall build time since this PR adds another step that's dependent on cross-compile)
I'm very keen to merge this one soon if anyone is able to take another look |
…o the spec (open-telemetry#1153) * Rename ParentOrElse to ParentBased and enhance it according to the spec - Renaming of type and sampler function - Enhancing ParentBased with sampler options - Set default samplers for each applicable parent-based case - Adjust ShouldSample(...) func accordingly * Adjust existing tests for ParentBased and add new ones - add tests for ParentBased sampler options and description - renaming in trace_test.go * Update CHANGELOG.md * PR feedback - More clearer naming of structs; add comments where missing - Adhere to the configuration style guide * PR feedback - punctuation
Link to tracking Issue:
#1125
Description:
Added commands & build steps to generate an MSI.
.\scripts\make.ps1 New-MSI -Config "./path/to/conf.yaml"
will create an MSI packaged with the specified config file. If the -Config argument is not provided, the default config file inexamples/otel-local-config.yaml
will be used.Users are able to override the config when installing the MSI by passing in a different config file path as an argument, i.e.
msiexec /i opentelemetry-collector.msi CONFIG=path/to/conf.yaml
If the user specifies a custom config file, and that file can't be found, they will get a generic popup error. The MSI logs will report "CustomAction CopyConfig returned actual error code 4" which is a pretty mediocre error message, but at least points to the error.
(once this gets merged, I'll create a similar PR in Contrib)