-
-
Notifications
You must be signed in to change notification settings - Fork 320
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
Feature/auto edge httpfile #780
base: master
Are you sure you want to change the base?
Feature/auto edge httpfile #780
Conversation
Thanks for the patch! A few quick nits to help you get through CI and the easy stuff:
|
Awesome, thanks for the fast reply. I will fix all of that tomorrow afternoon. |
9a3b751
to
bda0535
Compare
@purpleidea I consolodated to one commit, fixed comments, removed changes to go.mod, added EOL to my example file, and made my comments more readable/professional. |
(The race tests will likely fail, this is OK, but check out the other tests which should pass if there are no issues.) |
bda0535
to
80fc226
Compare
It looks like I forgot to run gofmt on http.go, I fixed that and amended it to the commit. |
Your mcl file comments need the same fixups and it will also fail without tab indentation. (There's also a trailing newline at the end if you want a nit.) |
Adds automatic dependency edge generation between http:file resources and their underlying file resources. This ensures file resources exist before they can be served via HTTP. Supports both direct files and directory serving.
80fc226
to
7817d13
Compare
Okay got it, thanks for bearing with me. Does this look good? |
CI needs a slightly different commit message, eg:
And you have one |
Fixes #734
What this adds:
Automatic edge handling for the HTTPFile resource. The goal is to make sure that when an HTTP file is served from a path, the file resource is properly tracked as a dependency.
How it does that:
HTTPFileResAutoEdges
struct: Handles dependecy tracking by keeping a list of related resources and checks if they exist.AutoEdges()
method: If the resource is serving from a file path, it creates an automatic edge to the corresponding file resource.If the
data
field is used instead, no edges are created.How I tested:
After setting things up I ran the following curl commands