Repository navigation
fix: env/ group access and e2e fixture names - #145
Merged
Merged
Conversation
The engine writes env/<app>.custom.env into the operator's checkout as UID 1000. On a host where the operator is anyone else it could not write there, and Compose could not read what it wrote. dfe-engine now runs with the checkout's group (group_add, DFE_DEV_GID), and make init plus every start target make env/ group-writable and setgid, so each new file keeps the group Compose reads it as. dfe-transform-vector-filebeat and dfe-transform-elastic-cisco-ios were exactly the names the engine gives a real instance for a source called filebeat or cisco-ios, and Compose merges two services sharing a name. They are now dfe-transform-e2e-vector-filebeat and dfe-transform-e2e-elastic-cisco-ios, with their env templates renamed to match. The DFE_TRANSFORM_*_FILEBEAT and *_CISCO_IOS variables keep their names so an existing .env still applies.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Two small rc.14 fixes in one PR.
First, env/ is shared with the engine through the checkout's group. The engine writes
env/<app>.custom.envinto the operator's checkout as UID 1000. On a host where the operator is anyone else, the engine could not write into env/, and Compose could not read the 0600 file it wrote.group_add: ["${DFE_DEV_GID:-1000}"]. The Makefile already exportsDFE_DEV_GIDasid -g.make initand every start target (viaenv_files.py) make env/ group-writable and setgid, so each new file keeps the checkout's group. It only ever adds bits. If it cannot chmod, it warns with the command to run.Second, two e2e fixtures are renamed off the names the engine generates.
dfe-transform-vector-filebeatanddfe-transform-elastic-cisco-iosare exactly what the engine calls a real instance for a source namedfilebeatorcisco-ios. Compose merges two services sharing a name, so a deployment with either source would silently take the fixture's command.dfe-transform-e2e-vector-filebeatanddfe-transform-e2e-elastic-cisco-ios, the same shape test(e2e): kill hops under load and count the loss #143 gives the VRL one.git mv).post.py: the vector fixture no longer starts withdfe-transform-vector, so it is named in full inOTEL_PUSHER_PREFIXES.DFE_TRANSFORM_VECTOR_FILEBEAT_*andDFE_TRANSFORM_ELASTIC_CISCO_IOS_*variables keep their names, so an existing .env still applies. The Kafkagroup_idinconfig/transform-elastic/cisco-ios.yamlis left alone. It models the real instance's group and is not a compose name.HEADS UP on #143: it also adds the same
group_addhunk (identical text and position, so that part merges clean) and its owngrant_group_write()inenv_files.pywithout setgid. Whichever lands second has a small conflict inenv_files.pyand in the lists both PRs re-sort. Keepshare_env_dirovergrant_group_write, because setgid is the part that hands new files the group.make check: 307 passed. New tests inscripts/tests/test_env_dir.py, and three of them fail with the chmod disabled. Not run: a real stack as a non-1000 operator.