-
Notifications
You must be signed in to change notification settings - Fork 205
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
Report divulgence warning at commit location. #10329
Conversation
changelog_begin changelog_end
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.
Nice, thank you! Can we change the tests you added before to match on the location?
filePath <- LF.moduleSource lfModule | ||
Just (toNormalizedFilePath' filePath, rangeFromLocation location) | ||
|
||
rangeFromLocation :: SS.Location -> LSP.Range |
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.
completely orthogonal but we should also be able to use the commit location for errors during scenario interpretation that happen in a submit
. I’ll open an issue.
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.
That's reasonable.
Also, I don't know exactly why, but this isn't working right now. I don't know if the commit location is off, or the module source, or something else.
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.
Let me know if you want me to take a closer look or need a rubber duck for debugging
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.
It looks like the commit location wasn't being set during a submit. I changed it, and now the locations show up correctly. (I think I still have an off by one error in the column, but that's easy to fix.) (No off by one error!)
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.
uh that’s not good, nice job catching this
@@ -798,7 +803,7 @@ private[lf] object Speedy { | |||
.initial(pkg2TxVersion, contractKeyUniqueness, submissionTime, initialSeeding), | |||
committers = committers, | |||
readAs = readAs, | |||
commitLocation = None, | |||
commitLocation = commitLocation, |
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.
Nice 👍
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 checked why this didn’t blow up before and it turns out we didn’t actually use commitLocation for anything. It was originally used before I split scenario interpretation into off-ledger and on-ledger interpretation but with the split we had access to it in ScenarioRunner
already.
So at least nothing else was broken by the fact that we didn’t set this.
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.
Ok, good ... I was a bit worried.
This PR has been created by a script, which is not very smart and does not have all the context. Please do double-check that the version prefix is correct before merging. @Robin-da is in charge of this release. Commit log: ``` b7cf42d Upgrade doobie to version 0.13.4 (#10326) 1a72314 fix broken triggers link (#10336) 271f9da Added back DeduplicationPeriod.DeduplicationOffset [KVL-998] (#10324) b701caa Report divulgence warning at commit location. (#10329) 742bdcb Describe prometheus in daml-on-sql README (#10307) 93d0ed6 [Mutable cache] Resolve with full lookup on negative cache read-through lookups [DPP-501] (#10262) f59951b document min npm version (#10330) d982e16 fix besu listing (#10328) c3bc26f daml-lf/data: Move ID aliases to `Ref` from _ledger-api-common_. [KVL-1002] (#10323) cf2f79d Register divulgence warning as a diagnostic (#10289) 8360e9f Mark Java Bot tests flaky (#10322) a6bf892 [In-memory fan-out] CLI parameters update (#10250) 5fa49c3 Disables flaky test suite of InstrumentedSource.bufferedSource (#10321) 504c231 Use a combined template id, stakeholder index (#10315) 9a01065 participant-state: Remove the Daml-LF transaction and value aliases. [KVL-1002] (#10317) 159728d LF: use Either by default in all archive reader API (#10295) 449a72a increase ES memory (#10318) 80b65f6 [DOCS] Add documentation for the JSON API metrics (#10312) 6abb903 [JSON-API] Put the request & response bodies into the log ctx if the log level is debug (for specific statements) (#10298) 3c0010b detect mount issue earlier (#10313) 0e09f3b Remove optLocation field from transaction nodes. (#10301) e62852f Make ledger API test tool's 'max-connection-attempts' into an option (#10311) bd12170 participant-state: Remove the `ParticipantId`, `PackageId`, and `Party` aliases. [KVL-1002] (#10308) fed4497 Extend JSON API ContractDao query bench’s with different tpids (#10309) bd35f80 ledger-configuration: Correct the protobuf package. [KVL-1002] (#10302) d69328d Ledger API Test Tool: add a `--max-connection-attempts` command line option [KVL-977] (#10297) a3b861e refresh es cluster (#10300) 63332d0 update NOTICES file (#10306) 1ee53c0 participant-state-index: Use `Ref` directly. (#10299) 0eba812 Remove trace_context field from Ledger API [KVL-1021] (#10256) 88886be ledger-configuration: Add tests for the `Configuration` decoding methods. [KVL-1002] (#10293) cb29f34 ledger-offset: Move `Offset` to a new package. [KVL-1002] (#10296) b899ae1 Codeowners: Add @nicu-da to the kvutils code review. (#10292) f033bc2 LF: Clean legacy from archive proto + TEXT_TO_CODE_POINTS typo (#10286) 70b12f0 ledger-on-sql: Remove conformance tests for H2 and SQLite files. (#10291) a9a0b70 ledger-configuration: Extract the configuration from participant-state. [KVL-1002] (#10279) d96b54e Use Text not String in exception docs (#10287) 5382253 Refresh json API materialized view on statement (#10285) 6e447c5 Patch export filtering of GHC.Types.[] in damldocs (#10282) d565cae DPP-457 Add UpdateToDbdto tests (#10116) 814442e update NOTICES file (#10284) 0493480 rotate release duty after 1.15.0-snapshot.20210713.7343.0.1f35db17 (#10268) 84094e0 update compat versions for 1.15.0 (#10281) ba8e829 [In-memory fan-out] Oracle support (#10263) a8f1902 LF: change type from Try to Either in archive module (#10277) c84b37a Release SDK 1.15 (#10269) 980d96b Fix status check in collect_build_data (#10278) 191d3b8 Add unit test to SequentialWriteDao [DPP-456] (#10265) 2271f93 Fix crash on duplicate submissionId (#10242) 906184c LF: Simplify UniversalDarReader (#10271) 42c487b [JSON-API] Refactor Endpoints.scala to use path directives etc. (#10274) 6840401 release 1.15.0-snapshot.20210713.7343.0.1f35db17 (#10267) 0df70fa Document bazel-testlogs directory in BAZEL.md (#10276) 44204bb Add a benchmark for contract insertion in the JSON API (#10272) 6107f8a Ignore failure to upload log failures (#10270) caf85a2 LF: rationalize archive Parser/Reader/Decoder (#10239) 0043b81 Add a ContractDao benchmark (#10259) 21a9e62 Add disclaimer to participant state v2 API [KVL-998] (#10254) 6c63f96 participant-integration-api: Move `SeedService` here. (#10261) 58c0b46 kvutils: Simplify usage of Rejections [KVL-1015] (#10258) 41aba1c kvutils: Move unrelated test cases to a proper test class [KVL-1015] (#10257) ``` Changelog: ``` - [JSON-API] You can now find a section `Metrics` in the http-json api documentation explaining how to enable metrics and which are available - [JSON-API] Logging of the request and response bodies are now available for appropriate requests if the chosen log level is equal or lower than DEBUG. These can then be found in the logging context of the request begin & end log messages (The field names in the ctx are "request_body" and "response_body"). - [Integration Kit] The *ledger_configuration.proto* Protobuf definition has been repackaged under ``com.daml.ledger.configuration``, and the Java and C# packages have been renamed accordingly. If you are using this Protobuf definition, you will need to update your imports. The Maven artifact name has not changed. - [Integration Kit] Add a `--max-connection-attempts` command line option to the Ledger API Test Tool * [Integration Kit] Removed trace_context field from Ledger API and its bindings as we now have trace context propagation support via gRPC metadata. If you are constructing or consuming Ledger API requests or responses directly, you may need to update your code. - [Integration Kit] The ``Offset`` type has been moved to a new Maven package, ``ledger-offset``, from the ``participant-state`` package. The Java package has been renamed to ``com.daml.ledger.offset``. If you are using this type, you will need to update your dependencies and imports. - [Integration Kit] The ledger configuration classes, ``Configuration``, ``LedgerInitialConditions``, and ``TimeModel``, have been moved from *participant-state* to a separate package named *ledger-configuration*, in the Java package ``com.daml.ledger.configuration``. You will need to update your dependencies and imports. - [Integration Kit] ``TimeModel`` has been renamed to ``LedgerTimeModel``. If you are using the ledger configuration classes directly, you may need to update your code. Fix crash in ConfigManagement- and PackageManagement- services on duplicate submissionsIds from different participants. Extend ledger-api-test-tool to cover the duplicate submissionId cases. - [Integration Kit] The class ``SeedService`` has been moved from the *participant-state* Maven package to the *participant-integration-api* Maven package, under the Java package name ``com.daml.platform.apiserver`` to reflect its usage by the API server, not the participant state API. If you use this class directly, you will need to change your imports. ``` CHANGELOG_BEGIN CHANGELOG_END
This PR has been created by a script, which is not very smart and does not have all the context. Please do double-check that the version prefix is correct before merging. @Robin-da is in charge of this release. Commit log: ``` b7cf42d Upgrade doobie to version 0.13.4 (#10326) 1a72314 fix broken triggers link (#10336) 271f9da Added back DeduplicationPeriod.DeduplicationOffset [KVL-998] (#10324) b701caa Report divulgence warning at commit location. (#10329) 742bdcb Describe prometheus in daml-on-sql README (#10307) 93d0ed6 [Mutable cache] Resolve with full lookup on negative cache read-through lookups [DPP-501] (#10262) f59951b document min npm version (#10330) d982e16 fix besu listing (#10328) c3bc26f daml-lf/data: Move ID aliases to `Ref` from _ledger-api-common_. [KVL-1002] (#10323) cf2f79d Register divulgence warning as a diagnostic (#10289) 8360e9f Mark Java Bot tests flaky (#10322) a6bf892 [In-memory fan-out] CLI parameters update (#10250) 5fa49c3 Disables flaky test suite of InstrumentedSource.bufferedSource (#10321) 504c231 Use a combined template id, stakeholder index (#10315) 9a01065 participant-state: Remove the Daml-LF transaction and value aliases. [KVL-1002] (#10317) 159728d LF: use Either by default in all archive reader API (#10295) 449a72a increase ES memory (#10318) 80b65f6 [DOCS] Add documentation for the JSON API metrics (#10312) 6abb903 [JSON-API] Put the request & response bodies into the log ctx if the log level is debug (for specific statements) (#10298) 3c0010b detect mount issue earlier (#10313) 0e09f3b Remove optLocation field from transaction nodes. (#10301) e62852f Make ledger API test tool's 'max-connection-attempts' into an option (#10311) bd12170 participant-state: Remove the `ParticipantId`, `PackageId`, and `Party` aliases. [KVL-1002] (#10308) fed4497 Extend JSON API ContractDao query bench’s with different tpids (#10309) bd35f80 ledger-configuration: Correct the protobuf package. [KVL-1002] (#10302) d69328d Ledger API Test Tool: add a `--max-connection-attempts` command line option [KVL-977] (#10297) a3b861e refresh es cluster (#10300) 63332d0 update NOTICES file (#10306) 1ee53c0 participant-state-index: Use `Ref` directly. (#10299) 0eba812 Remove trace_context field from Ledger API [KVL-1021] (#10256) 88886be ledger-configuration: Add tests for the `Configuration` decoding methods. [KVL-1002] (#10293) cb29f34 ledger-offset: Move `Offset` to a new package. [KVL-1002] (#10296) b899ae1 Codeowners: Add @nicu-da to the kvutils code review. (#10292) f033bc2 LF: Clean legacy from archive proto + TEXT_TO_CODE_POINTS typo (#10286) 70b12f0 ledger-on-sql: Remove conformance tests for H2 and SQLite files. (#10291) a9a0b70 ledger-configuration: Extract the configuration from participant-state. [KVL-1002] (#10279) d96b54e Use Text not String in exception docs (#10287) 5382253 Refresh json API materialized view on statement (#10285) 6e447c5 Patch export filtering of GHC.Types.[] in damldocs (#10282) d565cae DPP-457 Add UpdateToDbdto tests (#10116) 814442e update NOTICES file (#10284) 0493480 rotate release duty after 1.15.0-snapshot.20210713.7343.0.1f35db17 (#10268) 84094e0 update compat versions for 1.15.0 (#10281) ba8e829 [In-memory fan-out] Oracle support (#10263) a8f1902 LF: change type from Try to Either in archive module (#10277) c84b37a Release SDK 1.15 (#10269) 980d96b Fix status check in collect_build_data (#10278) 191d3b8 Add unit test to SequentialWriteDao [DPP-456] (#10265) 2271f93 Fix crash on duplicate submissionId (#10242) 906184c LF: Simplify UniversalDarReader (#10271) 42c487b [JSON-API] Refactor Endpoints.scala to use path directives etc. (#10274) 6840401 release 1.15.0-snapshot.20210713.7343.0.1f35db17 (#10267) 0df70fa Document bazel-testlogs directory in BAZEL.md (#10276) 44204bb Add a benchmark for contract insertion in the JSON API (#10272) 6107f8a Ignore failure to upload log failures (#10270) caf85a2 LF: rationalize archive Parser/Reader/Decoder (#10239) 0043b81 Add a ContractDao benchmark (#10259) 21a9e62 Add disclaimer to participant state v2 API [KVL-998] (#10254) 6c63f96 participant-integration-api: Move `SeedService` here. (#10261) 58c0b46 kvutils: Simplify usage of Rejections [KVL-1015] (#10258) 41aba1c kvutils: Move unrelated test cases to a proper test class [KVL-1015] (#10257) ``` Changelog: ``` - [JSON-API] You can now find a section `Metrics` in the http-json api documentation explaining how to enable metrics and which are available - [JSON-API] Logging of the request and response bodies are now available for appropriate requests if the chosen log level is equal or lower than DEBUG. These can then be found in the logging context of the request begin & end log messages (The field names in the ctx are "request_body" and "response_body"). - [Integration Kit] The *ledger_configuration.proto* Protobuf definition has been repackaged under ``com.daml.ledger.configuration``, and the Java and C# packages have been renamed accordingly. If you are using this Protobuf definition, you will need to update your imports. The Maven artifact name has not changed. - [Integration Kit] Add a `--max-connection-attempts` command line option to the Ledger API Test Tool * [Integration Kit] Removed trace_context field from Ledger API and its bindings as we now have trace context propagation support via gRPC metadata. If you are constructing or consuming Ledger API requests or responses directly, you may need to update your code. - [Integration Kit] The ``Offset`` type has been moved to a new Maven package, ``ledger-offset``, from the ``participant-state`` package. The Java package has been renamed to ``com.daml.ledger.offset``. If you are using this type, you will need to update your dependencies and imports. - [Integration Kit] The ledger configuration classes, ``Configuration``, ``LedgerInitialConditions``, and ``TimeModel``, have been moved from *participant-state* to a separate package named *ledger-configuration*, in the Java package ``com.daml.ledger.configuration``. You will need to update your dependencies and imports. - [Integration Kit] ``TimeModel`` has been renamed to ``LedgerTimeModel``. If you are using the ledger configuration classes directly, you may need to update your code. Fix crash in ConfigManagement- and PackageManagement- services on duplicate submissionsIds from different participants. Extend ledger-api-test-tool to cover the duplicate submissionId cases. - [Integration Kit] The class ``SeedService`` has been moved from the *participant-state* Maven package to the *participant-integration-api* Maven package, under the Java package name ``com.daml.platform.apiserver`` to reflect its usage by the API server, not the participant state API. If you use this class directly, you will need to change your imports. ``` CHANGELOG_BEGIN CHANGELOG_END Co-authored-by: Azure Pipelines DAML Build <[email protected]>
This PR records the commitLocation when the warning is generated, and uses it when creating the diagnostic.
Part of #9947, follow up from #10289