[SERVER-80958] Fix merge conflict in unfiltered_compile_flags Created: 11/Sep/23  Updated: 29/Oct/23  Resolved: 11/Sep/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.0-rc0

Type: Bug Priority: Major - P3
Reporter: Zack Winter Assignee: Zack Winter
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

https://github.com/10gen/mongo/pull/15483 and https://github.com/10gen/mongo/pull/15511 conflicted, but this wasn't noticed by git's merge conflict detection. Both of these changes added fields to a new parameter "unfiltered_compile_flags" to the bazel toolchain config. Instead of merging the fields each PR added, it added two instances of "unfiltered_compile_flags".

 

As a result, all bazel compilation will currently throw an error noting the duplicate keyword:

 

```

/tmp/bazelisk build src/mongo/platform:visibility_test_libcommon
Starting local Bazel server and connecting to it...
ERROR: /home/ubuntu/.cache/bazel/_bazel_ubuntu/438e730df43f16e18dd90600e6cbe8fb/external/mongo_toolchain/BUILD.bazel:70:9: duplicate keyword argument: unfiltered_compile_flags
ERROR: /home/ubuntu/mongo/src/mongo/platform/BUILD.bazel:3:11: While resolving toolchains for target //src/mongo/platform:visibility_test_libcommon: com.google.devtools.build.lib.packages.NoSuchTargetException: no such target '@mongo_toolchain//:platform': target 'platform' not declared in package '' defined by /home/ubuntu/.cache/bazel/_bazel_ubuntu/438e730df43f16e18dd90600e6cbe8fb/external/mongo_toolchain/BUILD.bazel (Tip: use `query "@mongo_toolchain//:*"` to see all the targets in that package)
ERROR: Analysis of target '//src/mongo/platform:visibility_test_libcommon' failed; build aborted: 
INFO: Elapsed time: 81.789s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (3 packages loaded, 1 target configured)

```



 Comments   
Comment by Githook User [ 11/Sep/23 ]

Author:

{'name': 'Zack Winter', 'email': 'zack.winter@mongodb.com', 'username': 'zackwintermdb'}

Message: SERVER-80958 Fix merge conflict in unfiltered_compile_flags
Branch: master
https://github.com/mongodb/mongo/commit/20d93c496a92a5102eaaf3721b68edbab76ea99d

Generated at Thu Feb 08 06:45:03 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.