Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Deprecate Windows .bat scripts #31732
Deprecate Windows .bat scripts #31732
Changes from 19 commits
9e35a7f
82a6bb2
9551219
74e74a4
7d5a211
b0d4771
a3b2dbc
2e5d368
162d0b6
4158915
e32a9f6
d4323ef
7e676a9
c76b6cc
ec8041f
83304c3
5133207
3094e1b
b4b7100
6b45677
7dc6080
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
✏️ suggestion: Maybe for a follow-up PR but I think we could update the entrypoint to execute a PowerShell script / command instead of having to repeat "powershell -C": https://github.com/DataDog/datadog-agent-buildimages/blob/main/windows/entrypoint.bat#L19
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.
Is this necessary?
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.
:suggestion: I think it was not advised to call tasks from another task (but it was maybe a namespace problem, I'm not 100% sure). What do you think of calling explicitly these tasks from the powershell script?
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.
Do you mean having the PowerShell script call the individual functions like:
?
I think that would be cool but how would developers do all the above in a single step? I think that was one of the goals of this PR.
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 haven't been able to find a source for that. The only oddity I can see is just a plain Python thing. Many of our invoke tasks and helperfunctions define defaults in the function definition, if the defaults change in an inner function then any out outer calls will be using the wrong default. I typically prefer to use
None
as the default so outers can defer to the inner call for default values.hmmm, perhaps. I think it's up to if people would rather modify PowerShell to add additional build steps, or if they'd rather modify Python. I like having the PowerShell script handle the env related things that can't be done in Python and have Python handle the actual "build".
User would run
Build-AgentPacakge.ps1
. Though if your env is already properly configured you could also just run the invoke task.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.
❓ question
Should you handle errors on intermediate steps?
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 any errors will be raised as exceptions and trigger exit, so I don't need to check explicitly here