-
Notifications
You must be signed in to change notification settings - Fork 55
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 less frequently #315
Conversation
699ce83
to
3bd808b
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 don't completely understand why get_diffs.py
is doing so many file/directory comparisons. Are we unable to rely on git diff
to tell us if a given directory has changed when compared to origin/main
?
git diff --quiet origin/main -- connect helper
echo $?
That returns a 0 status when nothing has changed and 1 when there are changes, and is sensitive to changes beneath connect
and helper
(assuming that's what we need to check).
python-version: '3.9' | ||
architecture: 'x64' | ||
cache: 'pip' | ||
- run: pip install -r requirements.txt |
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.
Could we switch over to using urllib
instead of requests
so we can just use the standard library?
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.
Yes, that's definitely an option! Did I miss something? I thought requests
was standard library at one time... but maybe that was old? Or I'm just ignorant and was using a "super standard library"
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.
python2 had urllib
, urllib2
, and urllib3
. requests
has an a nicer interface with which to interact, but since we are using it minimally it should be easy to replace with urllib
in py3.
@aronatkins that's a great call. That is certainly much cleaner 😅 I was mostly cribbing from a pattern that the helm CI tools use, and a bit ignorant of niceties such as the one you mention. A few tricks / challenges that I haven't thought through yet:
I do like how elegant that is though 😄 I will revisit and see if I can simplify |
add a check for "important_files" we ran into a case where a "subdirectory" of a watched directory changing (i.e. my/path, where we watch my/) would not get built. similarly, changing build infrastructure like our "version script" would not trigger new builds either.
3bd808b
to
fded8a0
Compare
For the record, since this stagnated. The simple solution was to disable "rebase commits." Squash commits are safe b/c the previous commit was on main, and merge commits are safe b/c the previous commit was on main. Still much work to do teasing through these edge cases 😄 I also am hoping to take a look at the community to see if/how other teams have resolved this issue. |
Closing this out since the PR is based on an older workflow that did not use We still want to revisit the build frequency of these images, which will likely be addressed by the build tooling refactor we are currently working through. |
close #255
we ran into a case where a "subdirectory" of a watched directory changing (i.e. my/path, where we watch my/) would not get built. similarly, changing build infrastructure like our "version script" would not trigger new builds either.
A few open questions:
get-diffs.py
from the "important_files"TODO: ensure that builds will run on main when they land...