Skip to content
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 support for replacing sandbox paths in build artifacts #650

Merged
merged 2 commits into from
Jun 15, 2021

Conversation

UebelAndre
Copy link
Collaborator

@UebelAndre UebelAndre commented May 15, 2021

This change expands on the define_absolute_paths and replace_absolute_paths functionality which replace absolute paths to files within EXT_BUILD_DEPS with that environment variable to be expanded at a later time and introduces define_sandbox_paths and replace_sandbox_paths which more generally replaces absolute paths to the exec root with ${EXT_BUILD_ROOT}. In both cases, these variables are update at the beginning of each build and are otherwise invisible to foreign build systems.

@UebelAndre UebelAndre force-pushed the exec_root branch 3 times, most recently from bbb5940 to f3112b6 Compare May 16, 2021 14:51
@UebelAndre
Copy link
Collaborator Author

@jsharpe Hey, do you have any ideas as to where these permissions errors are coming from in the standalone build?

@jheaff1
Copy link
Collaborator

jheaff1 commented May 17, 2021

@jsharpe Hey, do you have any ideas as to where these permissions errors are coming from in the standalone build?

Does this help - #622 (comment)

@UebelAndre
Copy link
Collaborator Author

Does this help - #622 (comment)

Sorry, I should have acknowledged I read that. It's not clear to me where the permissions error comes from and why the file wouldn't exist, especially after it being in the result of find. The behavior here doesn't make sense to me but I also have very limited experience with the standalone behavior. I think I'd be fine with some chmod +w but I don't think we can get away with double checking that the file exists. That already feels like we're in a bad state.

@jheaff1
Copy link
Collaborator

jheaff1 commented May 17, 2021

Does this help - #622 (comment)

Sorry, I should have acknowledged I read that. It's not clear to me where the permissions error comes from and why the file wouldn't exist, especially after it being in the result of find. The behavior here doesn't make sense to me but I also have very limited experience with the standalone behavior. I think I'd be fine with some chmod +w but I don't think we can get away with double checking that the file exists. That already feels like we're in a bad state.

Completely agree. If a check for the existence of a file is required directly after the file was included in a find result, something very strange is going on

@UebelAndre UebelAndre force-pushed the exec_root branch 2 times, most recently from 147384a to 52e6937 Compare May 26, 2021 18:16
@UebelAndre UebelAndre force-pushed the exec_root branch 7 times, most recently from a66c49a to 0557fd1 Compare June 14, 2021 14:56
@UebelAndre UebelAndre requested a review from jsharpe June 14, 2021 15:07
@UebelAndre UebelAndre marked this pull request as ready for review June 14, 2021 15:07
@UebelAndre UebelAndre requested a review from oquenchil as a code owner June 14, 2021 15:07
@UebelAndre
Copy link
Collaborator Author

UebelAndre commented Jun 14, 2021

@jheaff1 It's green! 😄

Perhaps you could do some testing for your out_data_dirs PR (#622)?

@jheaff1
Copy link
Collaborator

jheaff1 commented Jun 14, 2021

@jheaff1 It's green! 😄

Perhaps you could do some testing for your out_data_dirs PR (#622)?

Nice one! Yep will do. I have now realised that my PR#677 isn’t quite working as expected, so the out_data_dirs attribute may be required to use a Python toolchain built using rules_foreign_cc. Hopefully the out_data_dirs PR will be all green once I rebase off this branch

@UebelAndre UebelAndre force-pushed the exec_root branch 2 times, most recently from 1a43c73 to 4440397 Compare June 15, 2021 14:46
@UebelAndre
Copy link
Collaborator Author

UebelAndre commented Jun 15, 2021

@jheaff1 I think the fact that this passes with the examples means that the changes are good for #622 what do you think?

@jheaff1
Copy link
Collaborator

jheaff1 commented Jun 15, 2021

@jheaff1 I think the fact that this passes with the examples means that the changes are good for #622 what do you think?

Yep I agree. I suppose the cleanest progression of PRs would be:

  1. PR to add apr and apr_utils to examples
  2. PR to add SQLite to examples
  3. PR to add subversion to examples (which includes the required changes provided in this PR (Added support for replacing sandbox paths in build artifacts #650)

That said, I’d be happy for this to be merged now and then repurpose #677 to add the python dependencies to the examples.

Of course I don’t manage this repository so it’s not really up to me 😁

@UebelAndre UebelAndre merged commit 497d929 into bazel-contrib:main Jun 15, 2021
@UebelAndre
Copy link
Collaborator Author

I think it's good to have changes associated with tests. There's likely a way to super optimize the commits but IMO it's not worth the paperwork for this one. The examples stand as the regression tests for the rules merged here and again, that's a good thing to me. Lets keep things moving forward and get some of these sweet new changes in 😄

UebelAndre added a commit to UebelAndre/rules_foreign_cc that referenced this pull request Jun 16, 2021
jsharpe pushed a commit that referenced this pull request Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants