[GitHub] [ignite-nodejs-thin-client] teligenz-developer opened a new pull request #3: Handling multiple response in buffer due to simultaneously request
teligenz-developer opened a new pull request #3: URL: https://github.com/apache/ignite-nodejs-thin-client/pull/3 While using NodeJS Thin client to connect with ignite node. When we run single query to get data from ignite we were getting data but when we try to get 10 query per sec we getting below error random times. Error: Invalid response id: 3762533188295985673 in file ignite\internal\ClientSocket.js JMeter test for 10 request in 1 sec. https://user-images.githubusercontent.com/83343757/116394871-0c70ed00-a841-11eb-96b8-6de5a289219e.mp4 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-nodejs-thin-client] ptupitsyn commented on a change in pull request #4: IGNITE-16490 Node.js: Fix API documentation main page
ptupitsyn commented on a change in pull request #4: URL: https://github.com/apache/ignite-nodejs-thin-client/pull/4#discussion_r801325319 ## File path: api_spec/index.md ## @@ -0,0 +1,9 @@ +# Node.js Client for Apache Ignite + +This thin client allows your Node.js applications to work with Ignite clusters via TCP. + +A thin client is a lightweight Ignite client that connects to the cluster via a standard socket connection. It does not start in JVM process (Java is not required at all), does not become a part of the cluster topology, never holds any data or used as a destination of compute grid calculations. + +What it does is it simply establishes a socket connection to a standard Ignite node and performs all operations through that node. + Review comment: Feels like the same thing is repeated 3 times here (TCP/socket connection/socket connection). A socket connection is how any DB driver works, do we need to put it here at all? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-nodejs-thin-client] isapego commented on a change in pull request #4: IGNITE-16490 Node.js: Fix API documentation main page
isapego commented on a change in pull request #4: URL: https://github.com/apache/ignite-nodejs-thin-client/pull/4#discussion_r801366727 ## File path: api_spec/index.md ## @@ -0,0 +1,9 @@ +# Node.js Client for Apache Ignite + +This thin client allows your Node.js applications to work with Ignite clusters via TCP. + +A thin client is a lightweight Ignite client that connects to the cluster via a standard socket connection. It does not start in JVM process (Java is not required at all), does not become a part of the cluster topology, never holds any data or used as a destination of compute grid calculations. + +What it does is it simply establishes a socket connection to a standard Ignite node and performs all operations through that node. + Review comment: You are right. Fixed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-nodejs-thin-client] asfgit closed pull request #4: IGNITE-16490 Node.js: Fix API documentation main page
asfgit closed pull request #4: URL: https://github.com/apache/ignite-nodejs-thin-client/pull/4 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-nodejs-thin-client] NSAmelchev merged pull request #5: IGNITE-16651: replace logger with ignite-log4j2
NSAmelchev merged pull request #5: URL: https://github.com/apache/ignite-nodejs-thin-client/pull/5 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] korlov42 commented on a diff in pull request #739: IGNITE-16697 MV storage methods and reference implementation
korlov42 commented on code in PR #739: URL: https://github.com/apache/ignite-3/pull/739#discussion_r841434095 ## modules/core/src/main/java/org/apache/ignite/internal/util/Cursor.java: ## @@ -25,5 +25,38 @@ * @param Type of elements. */ public interface Cursor extends Iterator, Iterable, AutoCloseable { +/** {@inheritDoc} */ +@Override +default Iterator iterator() { +return this; +} +/** + * Creates an iterator based cursor. + * + * @param it Iterator. + * @param Type of elements in iterator. + * @return Cursor. + */ +static Cursor fromIterator(Iterator it) { +return new Cursor() { +/** {@inheritDoc} */ +@Override +public void close() throws Exception { +// No-op. Review Comment: Perhaps, it would be better to propagate `close()` to the iterator in case the latter implements an interface `AutoCloseable` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] tkalkirill commented on a diff in pull request #754: IGNITE-16691 Storage Configuration refactoring and improvements
tkalkirill commented on code in PR #754: URL: https://github.com/apache/ignite-3/pull/754#discussion_r841435461 ## modules/storage-rocksdb/src/main/java/org/apache/ignite/internal/storage/rocksdb/RocksDbStorageEngineFactory.java: ## @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.storage.rocksdb; + +import java.nio.file.Path; +import org.apache.ignite.internal.configuration.ConfigurationRegistry; +import org.apache.ignite.internal.storage.StorageException; +import org.apache.ignite.internal.storage.engine.StorageEngine; +import org.apache.ignite.internal.storage.engine.StorageEngineFactory; +import org.apache.ignite.internal.storage.rocksdb.configuration.schema.RocksDbStorageEngineConfiguration; + +/** + * Implementation for creating {@link RocksDbStorageEngine}'s. + */ +public class RocksDbStorageEngineFactory implements StorageEngineFactory { +/** {@inheritDoc} */ +@Override +public StorageEngine createEngine(ConfigurationRegistry configRegistry, Path storagePath) throws StorageException { +RocksDbStorageEngineConfiguration engineConfig = configRegistry.getConfiguration(RocksDbStorageEngineConfiguration.KEY); + +if (engineConfig == null) { Review Comment: Replaced with: **@PageMemoryDataRegionValidator** and **@RocksDbDataRegionValidator** -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] ibessonov commented on a diff in pull request #739: IGNITE-16697 MV storage methods and reference implementation
ibessonov commented on code in PR #739: URL: https://github.com/apache/ignite-3/pull/739#discussion_r841437090 ## modules/core/src/main/java/org/apache/ignite/internal/util/Cursor.java: ## @@ -25,5 +25,38 @@ * @param Type of elements. */ public interface Cursor extends Iterator, Iterable, AutoCloseable { +/** {@inheritDoc} */ +@Override +default Iterator iterator() { +return this; +} +/** + * Creates an iterator based cursor. + * + * @param it Iterator. + * @param Type of elements in iterator. + * @return Cursor. + */ +static Cursor fromIterator(Iterator it) { +return new Cursor() { +/** {@inheritDoc} */ +@Override +public void close() throws Exception { +// No-op. Review Comment: Nice, I'll do it -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] ibessonov commented on a diff in pull request #754: IGNITE-16691 Storage Configuration refactoring and improvements
ibessonov commented on code in PR #754: URL: https://github.com/apache/ignite-3/pull/754#discussion_r841445460 ## modules/storage-rocksdb/src/main/java/org/apache/ignite/internal/storage/rocksdb/RocksDbStorageEngineFactory.java: ## @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.storage.rocksdb; + +import java.nio.file.Path; +import org.apache.ignite.internal.configuration.ConfigurationRegistry; +import org.apache.ignite.internal.storage.StorageException; +import org.apache.ignite.internal.storage.engine.StorageEngine; +import org.apache.ignite.internal.storage.engine.StorageEngineFactory; +import org.apache.ignite.internal.storage.rocksdb.configuration.schema.RocksDbStorageEngineConfiguration; + +/** + * Implementation for creating {@link RocksDbStorageEngine}'s. + */ +public class RocksDbStorageEngineFactory implements StorageEngineFactory { +/** {@inheritDoc} */ +@Override +public StorageEngine createEngine(ConfigurationRegistry configRegistry, Path storagePath) throws StorageException { +RocksDbStorageEngineConfiguration engineConfig = configRegistry.getConfiguration(RocksDbStorageEngineConfiguration.KEY); + +if (engineConfig == null) { Review Comment: I should refactor our approach to validators, too many weird annotations =) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] korlov42 commented on a diff in pull request #739: IGNITE-16697 MV storage methods and reference implementation
korlov42 commented on code in PR #739: URL: https://github.com/apache/ignite-3/pull/739#discussion_r841462683 ## modules/core/src/main/java/org/apache/ignite/internal/util/Cursor.java: ## @@ -25,5 +26,40 @@ * @param Type of elements. */ public interface Cursor extends Iterator, Iterable, AutoCloseable { +/** {@inheritDoc} */ +@Override +default Iterator iterator() { +return this; +} +/** + * Creates an iterator based cursor. + * + * @param it Iterator. + * @param Type of elements in iterator. + * @return Cursor. + */ +static Cursor fromIterator(Iterator it) { +return new Cursor() { +/** {@inheritDoc} */ +@Override +public void close() throws Exception { +if (it instanceof Closeable) { Review Comment: I believe `AutoCloseable` fits better here. The logic is simple: since `Cursor` extends `AutoCloseable`, I would expect that wrapped iterator which extends `AutoCloseable` as well will be closed by invocation of 'close()' on the cursor -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-nodejs-thin-client] isapego merged pull request #6: IGNITE-17389 Increase test node startup timeout
isapego merged PR #6: URL: https://github.com/apache/ignite-nodejs-thin-client/pull/6 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-nodejs-thin-client] Mmuzaf merged pull request #7: IGNITE-15759 Replace local affinity function with the custom one
Mmuzaf merged PR #7: URL: https://github.com/apache/ignite-nodejs-thin-client/pull/7 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-website] dmagda commented on a change in pull request #6: SEO changes to several urls and some contents on Data Grid page
dmagda commented on a change in pull request #6: URL: https://github.com/apache/ignite-website/pull/6#discussion_r411562399 ## File path: use-cases/in-memory-data-grid.html ## @@ -58,60 +57,60 @@ In-Memory Data Grid with Apache Ignite -Apache Ignite® is an in-memory data grid that accelerates and scales your databases, services, and APIs. -It supports key-value and ANSI SQL APIs, ACID transactions, co-located compute, and machine learning -libraries required for real-time applications. - - -An in-memory data grid deployment is a read-through/write-through caching strategy, in which the application -layer treats the data grid as the primary data store. The application layer writes to and reads from Ignite. -Ignite ensures that any underlying database stays updated and consistent with the in-memory data. +The Apache Ignite® in-memory data grid accelerates and scales your databases, services, +and APIs. It supports key-value and ANSI SQL APIs, ACID transactions, co-located processing, +and machine learning libraries. Ignite is frequently used to increase the performance and +scalability of real-time applications, as a digital integration hub to provide real-time data +access to one or many applications to data from one or many siloed data sources, for high Review comment: I do see that we want to get more searches of DIH and "cache" terms by adding them to the first paragraph here but that's a tangential topic and we shouldn't overwhelm our readers with more terms, especially, at the beginning of the page. I'll rework this paragraph after the merge. ## File path: use-cases/in-memory-data-grid.html ## @@ -58,60 +57,60 @@ In-Memory Data Grid with Apache Ignite -Apache Ignite® is an in-memory data grid that accelerates and scales your databases, services, and APIs. -It supports key-value and ANSI SQL APIs, ACID transactions, co-located compute, and machine learning -libraries required for real-time applications. - - -An in-memory data grid deployment is a read-through/write-through caching strategy, in which the application -layer treats the data grid as the primary data store. The application layer writes to and reads from Ignite. -Ignite ensures that any underlying database stays updated and consistent with the in-memory data. +The Apache Ignite® in-memory data grid accelerates and scales your databases, services, +and APIs. It supports key-value and ANSI SQL APIs, ACID transactions, co-located processing, +and machine learning libraries. Ignite is frequently used to increase the performance and +scalability of real-time applications, as a digital integration hub to provide real-time data +access to one or many applications to data from one or many siloed data sources, for high +performance computing, or for data caching. - -As an in-memory data grid, Ignite provides all essential APIs needed to simplify its adoption. -The APIs include distributed key-value and ANSI SQL queries, ACID transactions, co-located -computations, and machine learning models. While key-value and SQL calls let you request, join, and -group distributed data sets, the compute and machine learning components help to eliminate data -shuffling over the network, thus, boosting compute and data-intensive calculations. - - - -Ignite is capable of storing data both in memory and on disk with two options for data persistence --- you can persist changes in an external database or let Ignite keep data in its native persistence. -Let's review both of these options. - - -Ignite and External Databases - - -Ignite can improve the performance and scalability of any external database such as RDBMS, -NoSQL or Hadoop, by sliding in as an in-memory cache between the application and the database -layer. When an application writes data to the cache, Ignite automatically writes-through or -writes-behind all data modifications to the underlying external store. Ignite also performs -ACID transactions where it coordinates and commits a transaction across the cluster as well as -the database. - - -Additionally, Ignite can be deployed as a shared and unified in-memory layer that stores data -sets originating from disjointed databases. Your applications can consume all the data from -Ignite as a single store while Ignite can keep the original
[GitHub] [ignite-website] mstekl opened a new pull request #9: Added couple of new events
mstekl opened a new pull request #9: URL: https://github.com/apache/ignite-website/pull/9 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-website] mstekl opened a new pull request #10: Seo updates April 28
mstekl opened a new pull request #10: URL: https://github.com/apache/ignite-website/pull/10 I'm submitting a few set of improvements: - Ran a fresh crawl and rebuilt sitemap.xml - Fixed accessibility issues when using on header and homepage - Changed the text for links btns underuse cases section on homapage to a more descriptive text - Replaced old 4.7 fontawesome with latest 5.11 which avoids font-display audit failure This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-website] dmagda commented on a change in pull request #10: Seo updates April 28
dmagda commented on a change in pull request #10: URL: https://github.com/apache/ignite-website/pull/10#discussion_r417416842 ## File path: index.html ## @@ -273,9 +278,9 @@ Applications Acceleration & Data Caching using Ignite as an in-memory data grid. - -Learn More + Learn More About In-Memory Data Grid Review comment: Please revert this change, that's too much for the button title. I believe we can sacrifice this SEO optimization in favor of better readability. Data Grid keyword is already mentioned three times on the front page. ## File path: index.html ## @@ -304,9 +309,9 @@ Digital Integration Hub through Apache Ignite’s functionally rich, unified and consistent APIs. - -Learn More + Learn More About Digital Integration Hub Review comment: Please revert this change, that's too much for the button title. I believe we can sacrifice this SEO optimization in favor of better readability. Digital Hub keyword is already mentioned a couple of times on this page. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-website] dmagda commented on pull request #9: Added couple of new events
dmagda commented on pull request #9: URL: https://github.com/apache/ignite-website/pull/9#issuecomment-621296548 Thanks, Mauricio! Merged. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-website] mstekl commented on a change in pull request #10: Seo updates April 28
mstekl commented on a change in pull request #10: URL: https://github.com/apache/ignite-website/pull/10#discussion_r417430944 ## File path: index.html ## @@ -273,9 +278,9 @@ Applications Acceleration & Data Caching using Ignite as an in-memory data grid. - -Learn More + Learn More About In-Memory Data Grid Review comment: @dmagda, the purpose here was not to introduce a keyword, but to improve usability. It is a good usability practice to use descriptive links and avoid things like "click here", "read more", etc. Here is some literature: - https://accessibility.oregonstate.edu/descriptivelinks - https://developers.google.com/web/tools/lighthouse/audits/descriptive-link-text Also on this particular case I even think having a longer text on those buttons give more balance to the elements in terms of design. The button I propose is not even as long as the titles on those boxes, and they introduce more blue area that fills the empty space generated by the small "learn more" buttons. I don't know which reasons are you basing to consider these as "too much for a button title", but please reconsider the merge based on this explanation. Thanks! This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-website] mstekl opened a new pull request #11: Several optimizations
mstekl opened a new pull request #11: URL: https://github.com/apache/ignite-website/pull/11 Submitting same set of improvements, but removed the usability fix for descriptive links on homepage. - Ran a fresh crawl and rebuilt sitemap.xml - Fixed accessibility issues when using on header and homepage - Replaced old 4.7 fontawesome with latest 5.11 which avoids font-display audit failure This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-website] pavlukhin opened a new pull request #12: IGNITE-12965 Redirect ignite-website GitHub notifications
pavlukhin opened a new pull request #12: URL: https://github.com/apache/ignite-website/pull/12 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] vkulichenko opened a new pull request #1: test module
vkulichenko opened a new pull request #1: URL: https://github.com/apache/ignite-3/pull/1 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] vkulichenko commented on pull request #1: test module
vkulichenko commented on pull request #1: URL: https://github.com/apache/ignite-3/pull/1#issuecomment-732547333 Test PR, will close. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] vkulichenko closed pull request #1: test module
vkulichenko closed pull request #1: URL: https://github.com/apache/ignite-3/pull/1 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] AMashenkov opened a new pull request #2: IGNITE-13748: Schema configuration public API.
AMashenkov opened a new pull request #2: URL: https://github.com/apache/ignite-3/pull/2 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] kgusakov opened a new pull request #3: IGNITE-13610 WIP Initial version of unified CLI tool
kgusakov opened a new pull request #3: URL: https://github.com/apache/ignite-3/pull/3 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] AMashenkov commented on a change in pull request #3: IGNITE-13610 WIP Initial version of unified CLI tool
AMashenkov commented on a change in pull request #3: URL: https://github.com/apache/ignite-3/pull/3#discussion_r532742174 ## File path: modules/cli-demo/cli-common/pom.xml ## @@ -0,0 +1,32 @@ + + ``` ## File path: modules/cli-demo/demo-module-all/demo-module/pom.xml ## @@ -0,0 +1,33 @@ + +
[GitHub] [ignite-3] kgusakov closed pull request #3: IGNITE-13610 WIP Initial version of unified CLI tool
kgusakov closed pull request #3: URL: https://github.com/apache/ignite-3/pull/3 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-nodejs-thin-client] SammyVimes opened a new pull request #1: IGNITE-11032 Move to TypeScript
SammyVimes opened a new pull request #1: URL: https://github.com/apache/ignite-nodejs-thin-client/pull/1 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-nodejs-thin-client] SammyVimes opened a new pull request #2: IGNITE-13794 Partition awareness for Node.js
SammyVimes opened a new pull request #2: URL: https://github.com/apache/ignite-nodejs-thin-client/pull/2 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] SammyVimes opened a new pull request #5: IGINTE-13562 Unified configuration initial prototype
SammyVimes opened a new pull request #5: URL: https://github.com/apache/ignite-3/pull/5 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] ibessonov commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype
ibessonov commented on a change in pull request #5: URL: https://github.com/apache/ignite-3/pull/5#discussion_r535139224 ## File path: modules/config-sample/pom.xml ## @@ -0,0 +1,86 @@ + + + + + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> +4.0.0 + +org.apache.ignite +ignite-configuration-sample +3.0-SNAPSHOT +http://ignite.apache.org + + +1.8 +1.8 + + + + +log4j +log4j +1.2.17 +test + + + +com.typesafe +config +1.4.1 + + + +org.apache.ignite +ignite-configuration +${project.version} + + +junit +junit +4.13 +test + + + + + + +org.apache.maven.plugins +maven-compiler-plugin +3.8.1 + + + org.apache.ignite.configuration.processor.internal.Processor Review comment: Is there a chance of putting this into meta-inf of processor module? ## File path: modules/config-sample/pom.xml ## @@ -0,0 +1,86 @@ + + + + + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> +4.0.0 + +org.apache.ignite +ignite-configuration-sample +3.0-SNAPSHOT +http://ignite.apache.org + + +1.8 +1.8 + + + + +log4j +log4j +1.2.17 +test + + + +com.typesafe Review comment: It would be cool to sort dependencies, test dependencies will be clearly separated then. ## File path: modules/configuration-annotation-processor/src/main/java/org/apache/ignite/configuration/processor/internal/Processor.java ## @@ -0,0 +1,692 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.configuration.processor.internal; + +import java.io.IOException; +import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.MethodType; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Deque; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; +import java.util.stream.IntStream; +import javax.annotation.processing.AbstractProcessor; +import javax.annotation.processing.Filer; +import javax.annotation.processing.ProcessingEnvironment; +import javax.annotation.processing.RoundEnvironment; +import javax.lang.model.SourceVersion; +import javax.lang.model.element.Element; +import javax.lang.model.element.ElementKind; +import javax.lang.model.element.Modifier; +import javax.lang.model.element.PackageElement; +import javax.lang.model.element.TypeElement; +import javax.lang.model.element.VariableElement; +import javax.lang.model.util.Elements; +import com.squareup.javapoet.ClassName; +import com.squareup.javapoet.CodeBlock; +import com.squareup.javapoet.FieldSpec; +import com.squareup.javapoet.JavaFile; +import com.squareup.javapoet.MethodSpec; +import com.squareup.javapoet.ParameterizedTypeName; +import com.squareup.javapoet.TypeName; +import com.squareup.javapoet.TypeSpec; +import com.squareup.javapoet.WildcardTypeName; +import org.apache.ignite.configuration.internal.Configurator; +import org.apache.ignite.configuration.internal.DynamicConfiguration; +import org.apache.ignite.configuration.internal.NamedListConfiguration; +import org.apache.ignite.configuration.internal.annotation.Config; +import org.apache.ignite.configuration.internal.annotation.ConfigValue; +import org.apache.ignite.configuration.internal.annotation.NamedConfigValue; +import org.apache.ignite.configuration.internal.a
[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype
SammyVimes commented on a change in pull request #5: URL: https://github.com/apache/ignite-3/pull/5#discussion_r535244939 ## File path: modules/config-sample/pom.xml ## @@ -0,0 +1,86 @@ + + + + + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> +4.0.0 + +org.apache.ignite +ignite-configuration-sample +3.0-SNAPSHOT +http://ignite.apache.org + + +1.8 +1.8 + + + + +log4j +log4j +1.2.17 +test + + + +com.typesafe +config +1.4.1 + + + +org.apache.ignite +ignite-configuration +${project.version} + + +junit +junit +4.13 +test + + + + + + +org.apache.maven.plugins +maven-compiler-plugin +3.8.1 + + + org.apache.ignite.configuration.processor.internal.Processor Review comment: Done This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype
SammyVimes commented on a change in pull request #5: URL: https://github.com/apache/ignite-3/pull/5#discussion_r535247519 ## File path: modules/configuration-annotation-processor/pom.xml ## @@ -0,0 +1,94 @@ + + + + + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> +4.0.0 + +org.apache.ignite +ignite-configuration-annotation-processor +3.0-SNAPSHOT +http://ignite.apache.org + + +1.8 Review comment: Done (but I hope we'll move to Gradle) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype
SammyVimes commented on a change in pull request #5: URL: https://github.com/apache/ignite-3/pull/5#discussion_r535248128 ## File path: modules/config-sample/src/main/java/org/apache/ignite/configuration/internal/AutoAdjustConfigurationSchema.java ## @@ -0,0 +1,43 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.configuration.internal; Review comment: Sure, this module is just a demo This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype
SammyVimes commented on a change in pull request #5: URL: https://github.com/apache/ignite-3/pull/5#discussion_r535251190 ## File path: modules/configuration-annotation-processor/pom.xml ## @@ -0,0 +1,94 @@ + + + + + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> +4.0.0 + +org.apache.ignite +ignite-configuration-annotation-processor +3.0-SNAPSHOT +http://ignite.apache.org + + +1.8 +1.8 + + + + +log4j +log4j +1.2.17 +test + + + +com.squareup +javapoet +1.13.0 + + + +org.apache.ignite +ignite-configuration +${project.version} + + + +org.mockito +mockito-core +3.4.6 +test + + + +com.google.testing.compile +compile-testing +0.19 +test + + + +org.junit.jupiter +junit-jupiter-engine +5.6.2 +test + + + +fr.inria.gforge.spoon +spoon-core Review comment: I'm not an expert either, but as I understand MIT license is permissive and compatible with the Apache license. Also, we won't be distributing Spoon as it's only a test dependency. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] AMashenkov commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype
AMashenkov commented on a change in pull request #5: URL: https://github.com/apache/ignite-3/pull/5#discussion_r535264583 ## File path: modules/config-sample/pom.xml ## @@ -0,0 +1,86 @@ + + + + + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> +4.0.0 + +org.apache.ignite +ignite-configuration-sample +3.0-SNAPSHOT +http://ignite.apache.org + + +1.8 +1.8 + + + + +log4j +log4j +1.2.17 +test + + + +com.typesafe +config +1.4.1 + + + +org.apache.ignite +ignite-configuration +${project.version} + + +junit +junit +4.13 Review comment: We are going to switch to JUnit 5. Let's use property for versions, to be sure we use the same dependency version everywhere while possible. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] AMashenkov commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype
AMashenkov commented on a change in pull request #5: URL: https://github.com/apache/ignite-3/pull/5#discussion_r535268251 ## File path: modules/configuration-annotation-processor/src/main/java/org/apache/ignite/configuration/processor/internal/Processor.java ## @@ -0,0 +1,692 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.configuration.processor.internal; Review comment: Does it make sense to change package to **org.apache.ignite.internal.configuration.processor** for better filtering as some code checks may use different policies for public and internal API. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] AMashenkov commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype
AMashenkov commented on a change in pull request #5: URL: https://github.com/apache/ignite-3/pull/5#discussion_r535268251 ## File path: modules/configuration-annotation-processor/src/main/java/org/apache/ignite/configuration/processor/internal/Processor.java ## @@ -0,0 +1,692 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.configuration.processor.internal; Review comment: Does it make sense to change package to **org.apache.ignite.internal.configuration.processor** for better filtering? Some code checks may use different policies for public and internal API. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype
SammyVimes commented on a change in pull request #5: URL: https://github.com/apache/ignite-3/pull/5#discussion_r535350963 ## File path: modules/configuration-annotation-processor/src/main/java/org/apache/ignite/configuration/processor/internal/validation/ValidationGenerator.java ## @@ -0,0 +1,111 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.configuration.processor.internal.validation; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import javax.lang.model.element.VariableElement; +import javax.lang.model.type.MirroredTypesException; +import javax.lang.model.type.TypeMirror; +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; +import javax.validation.constraints.NotNull; +import com.squareup.javapoet.CodeBlock; +import org.apache.ignite.configuration.internal.DynamicConfiguration; +import org.apache.ignite.configuration.internal.annotation.Validate; +import org.apache.ignite.configuration.internal.validation.MaxValidator; +import org.apache.ignite.configuration.internal.validation.MinValidator; +import org.apache.ignite.configuration.internal.validation.NotNullValidator; + +/** + * Class that handles validation generation. + */ +public class ValidationGenerator { +/** Private constructor. */ +private ValidationGenerator() { +} + +/** + * Generate validation block. + * + * @param variableElement Configuration field. + * @return Code block for field validation. + */ +public static CodeBlock generateValidators(VariableElement variableElement) { +List validators = new ArrayList<>(); +final Min minAnnotation = variableElement.getAnnotation(Min.class); +if (minAnnotation != null) { +final long minValue = minAnnotation.value(); +final String message = minAnnotation.message(); +final CodeBlock build = CodeBlock.builder().add("new $T<$T>($L, $S)", MinValidator.class, DynamicConfiguration.class, minValue, message).build(); +validators.add(build); +} + +final Max maxAnnotation = variableElement.getAnnotation(Max.class); +if (maxAnnotation != null) { +final long maxValue = maxAnnotation.value(); +final String message = maxAnnotation.message(); +final CodeBlock build = CodeBlock.builder().add("new $T<$T>($L, $S)", MaxValidator.class, DynamicConfiguration.class, maxValue, message).build(); +validators.add(build); +} + +final NotNull notNull = variableElement.getAnnotation(NotNull.class); +if (notNull != null) { +final String message = notNull.message(); +final CodeBlock build = CodeBlock.builder().add("new $T<$T>($S)", NotNullValidator.class, DynamicConfiguration.class, message).build(); +validators.add(build); +} + +List validateAnnotations = new ArrayList<>(); + +final Validate.List validateAnnotationsList = variableElement.getAnnotation(Validate.List.class); + +if (validateAnnotationsList != null) { + validateAnnotations.addAll(Arrays.asList(validateAnnotationsList.value())); +} + +final Validate validateAnnotationSingle = variableElement.getAnnotation(Validate.class); + +if (validateAnnotationSingle != null) { +validateAnnotations.add(validateAnnotationSingle); +} + +validateAnnotations.forEach(validateAnnotation -> { +List values = null; +try { +validateAnnotation.value(); +} catch (MirroredTypesException e) { +values = e.getTypeMirrors(); Review comment: Done This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype
SammyVimes commented on a change in pull request #5: URL: https://github.com/apache/ignite-3/pull/5#discussion_r535360071 ## File path: modules/configuration-annotation-processor/src/test/resources/org/apache/ignite/configuration/processor/internal/TestConfigurationSchema.java ## @@ -0,0 +1,22 @@ +package org.apache.ignite.configuration.processor.internal; + +import org.apache.ignite.configuration.internal.annotation.Config; +import org.apache.ignite.configuration.internal.annotation.Value; + +@Config(value = "test", root = true) +public class TestConfigurationSchema { +@Value +private String value1; + +@Value +private long primitiveLong; + +@Value +private Long boxedLong; + +@Value +private int primitiveInt; + +@Value +private Integer boxedInt; +} Review comment: This is a test java file in resources, I'm not sure if it should follow our style guides as we only need in the test's runtime. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype
SammyVimes commented on a change in pull request #5: URL: https://github.com/apache/ignite-3/pull/5#discussion_r535360759 ## File path: modules/configuration/src/main/java/org/apache/ignite/configuration/internal/Configurator.java ## @@ -0,0 +1,105 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.configuration.internal; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Function; +import org.apache.ignite.configuration.internal.property.DynamicProperty; +import org.apache.ignite.configuration.internal.property.Modifier; +import org.apache.ignite.configuration.internal.property.PropertyListener; +import org.apache.ignite.configuration.internal.selector.Selector; +import org.apache.ignite.configuration.internal.validation.FieldValidator; +import org.apache.ignite.configuration.internal.validation.MemberKey; + +public class Configurator> { + +private final ConfigurationStorage storage; + +private final T root; + +private final Map>>> fieldValidators = new HashMap<>(); + +public Configurator(ConfigurationStorage storage, Function, T> rootBuilder) { +this.storage = storage; +this.root = rootBuilder.apply(this); +this.init(); +} + +private void init() { +List props = new ArrayList<>(); + +props.forEach(property -> { Review comment: Whoops, correct This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype
SammyVimes commented on a change in pull request #5: URL: https://github.com/apache/ignite-3/pull/5#discussion_r535400429 ## File path: modules/configuration/src/main/java/org/apache/ignite/configuration/internal/DynamicConfiguration.java ## @@ -0,0 +1,147 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.configuration.internal; + +import java.io.Serializable; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.apache.ignite.configuration.internal.property.DynamicProperty; +import org.apache.ignite.configuration.internal.property.Modifier; +import org.apache.ignite.configuration.internal.selector.BaseSelectors; +import org.apache.ignite.configuration.internal.validation.FieldValidator; + +/** + * This class represents configuration root or node. + */ +public abstract class DynamicConfiguration implements Modifier { +/** Fully qualified name of the configuration. */ +protected final String qualifiedName; + +/** Configuration key. */ +protected final String key; + +/** Configuration prefix. */ +protected final String prefix; + +/** Configuration members (leafs and nodes). */ +protected final Map> members = new HashMap<>(); + +/** Root configuration node. */ +protected final DynamicConfiguration root; + +/** {@code true} if this is a member of {@link NamedListConfiguration}. */ +protected final boolean isNamed; + +/** Configurator that this configuration is attached to. */ +protected final Configurator> configurator; + +/** + * Constructor. + * @param prefix Configuration prefix. + * @param key Configuration key. + * @param isNamed Is this a part of named configuration. + * @param configurator Configurator that this object is attached to. + * @param root Root configuration. + */ +protected DynamicConfiguration( +String prefix, +String key, +boolean isNamed, +Configurator> configurator, +DynamicConfiguration root +) { +this.prefix = prefix; +this.isNamed = isNamed; +this.configurator = configurator; + +this.key = key; +if (root == null) +this.qualifiedName = key; +else { +if (isNamed) +qualifiedName = String.format("%s[%s]", prefix, key); Review comment: Actually, we can't move past this formatting, as we need to differ static part of the name and dynamic This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype
SammyVimes commented on a change in pull request #5: URL: https://github.com/apache/ignite-3/pull/5#discussion_r535404023 ## File path: modules/configuration/src/main/java/org/apache/ignite/configuration/internal/annotation/Config.java ## @@ -0,0 +1,69 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.configuration.internal.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; +import org.apache.ignite.configuration.internal.DynamicConfiguration; + +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.SOURCE; + +/** + * This annotation, if applied to a class, marks it as a configuration schema. + * Annotation processor generates a couple of classes for each configuration schema: Review comment: You're right This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype
SammyVimes commented on a change in pull request #5: URL: https://github.com/apache/ignite-3/pull/5#discussion_r535405567 ## File path: modules/configuration/src/main/java/org/apache/ignite/configuration/internal/annotation/Validate.java ## @@ -0,0 +1,77 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.configuration.internal.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.Repeatable; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; +import org.apache.ignite.configuration.internal.validation.FieldValidator; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.RetentionPolicy.SOURCE; + +/** + * This annotation applies custom validation to configuration field, for example: + * + * public class ConfSchema { + * {@literal @}Validate(SomeCustomValidator.class) + * private String value; + * } + * + * + * If you need multiple custom validations: + * + * public class ConfSchema { + * {@literal @}Validate.List({ Review comment: Yeah, right, I actually use the correct way to repeat annotations in the example, just forgot about the doc This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype
SammyVimes commented on a change in pull request #5: URL: https://github.com/apache/ignite-3/pull/5#discussion_r535407691 ## File path: modules/configuration/src/main/java/org/apache/ignite/configuration/internal/property/NamedList.java ## @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.configuration.internal.property; + +import java.util.Map; + +/** + * This class holds named configurations in VIEW object. + */ +public class NamedList { +/** Named values. */ +private final Map values; + +/** + * Constructor. + * @param values Named values. + */ +public NamedList(Map values) { +this.values = values; +} + +/** + * Get named values. + * @return Named values. + */ +public Map getValues() { +return values; +} + +/** {@inheritDoc} */ +@Override public String toString() { +return "NamedList{" + Review comment: We actually don't need that at all, I'm just going to remove it This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype
SammyVimes commented on a change in pull request #5: URL: https://github.com/apache/ignite-3/pull/5#discussion_r535408185 ## File path: modules/configuration/src/main/java/org/apache/ignite/configuration/internal/selector/BaseSelectors.java ## @@ -0,0 +1,125 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.configuration.internal.selector; + +import java.lang.invoke.MethodHandle; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import org.apache.ignite.configuration.internal.DynamicConfiguration; +import org.apache.ignite.configuration.internal.property.Modifier; + +/** + * Base selector holder. + */ +public class BaseSelectors { +/** Map from string representation of selector to {@link SelectorHolder}. */ +private static final Map selectors = new HashMap<>(); + +/** + * Get selector from selectors map by key. + * + * Valid formats for selector key: + * + * root.inner.option.field in case of static config field + * root.inner.named[name].field in case of dynamic (named) config field + * + * + * @param name Selector name. + * @return Selector. + */ +public static , B extends Modifier, C, D, E> Selector find(String name) { +String[] splitten = name.split("\\."); Review comment: `true` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype
SammyVimes commented on a change in pull request #5: URL: https://github.com/apache/ignite-3/pull/5#discussion_r535411746 ## File path: modules/configuration/src/main/java/org/apache/ignite/configuration/internal/selector/BaseSelectors.java ## @@ -0,0 +1,125 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.configuration.internal.selector; + +import java.lang.invoke.MethodHandle; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import org.apache.ignite.configuration.internal.DynamicConfiguration; +import org.apache.ignite.configuration.internal.property.Modifier; + +/** + * Base selector holder. + */ +public class BaseSelectors { +/** Map from string representation of selector to {@link SelectorHolder}. */ +private static final Map selectors = new HashMap<>(); + +/** + * Get selector from selectors map by key. + * + * Valid formats for selector key: + * + * root.inner.option.field in case of static config field + * root.inner.named[name].field in case of dynamic (named) config field + * + * + * @param name Selector name. + * @return Selector. + */ +public static , B extends Modifier, C, D, E> Selector find(String name) { Review comment: I personally used it to find selectors in the CLI tool demo. I'm not sure if we can make it private though This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype
SammyVimes commented on a change in pull request #5: URL: https://github.com/apache/ignite-3/pull/5#discussion_r535413713 ## File path: modules/configuration/src/main/java/org/apache/ignite/configuration/internal/selector/BaseSelectors.java ## @@ -0,0 +1,125 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.configuration.internal.selector; + +import java.lang.invoke.MethodHandle; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import org.apache.ignite.configuration.internal.DynamicConfiguration; +import org.apache.ignite.configuration.internal.property.Modifier; + +/** + * Base selector holder. + */ +public class BaseSelectors { +/** Map from string representation of selector to {@link SelectorHolder}. */ +private static final Map selectors = new HashMap<>(); + +/** + * Get selector from selectors map by key. + * + * Valid formats for selector key: + * + * root.inner.option.field in case of static config field + * root.inner.named[name].field in case of dynamic (named) config field + * + * + * @param name Selector name. + * @return Selector. + */ +public static , B extends Modifier, C, D, E> Selector find(String name) { Review comment: Changed to actual type names, but not sure how to format signature THAT big This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype
SammyVimes commented on a change in pull request #5: URL: https://github.com/apache/ignite-3/pull/5#discussion_r535414280 ## File path: modules/configuration/src/main/java/org/apache/ignite/configuration/internal/validation/FieldValidator.java ## @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.configuration.internal.validation; + +import java.io.Serializable; +import org.apache.ignite.configuration.internal.DynamicConfiguration; + +/** + * Base class for field validator. Contains exception message. + * @param Field type. + * @param Root configuration type. + */ +public abstract class FieldValidator> { +/** Validation error message. */ +protected final String message; + +/** Constructor. */ +protected FieldValidator(String message) { Review comment: Yes, why? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype
SammyVimes commented on a change in pull request #5: URL: https://github.com/apache/ignite-3/pull/5#discussion_r535417248 ## File path: modules/config-sample/pom.xml ## @@ -0,0 +1,86 @@ + + + + + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> +4.0.0 + +org.apache.ignite +ignite-configuration-sample +3.0-SNAPSHOT +http://ignite.apache.org + + +1.8 +1.8 + + + + +log4j +log4j +1.2.17 +test + + + +com.typesafe +config +1.4.1 + + + +org.apache.ignite +ignite-configuration +${project.version} + + +junit +junit +4.13 Review comment: Changed to JUnit5, but this method is going to be removed (it's just a demo), and also we don't really have a lot of options, as there is no single parent pom or smth like that. AFAIK there is no decision on dependency management yet, so I'd leave it be This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype
SammyVimes commented on a change in pull request #5: URL: https://github.com/apache/ignite-3/pull/5#discussion_r535418386 ## File path: modules/configuration-annotation-processor/src/main/java/org/apache/ignite/configuration/processor/internal/Processor.java ## @@ -0,0 +1,692 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.configuration.processor.internal; Review comment: Reasonable, will do This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype
SammyVimes commented on a change in pull request #5: URL: https://github.com/apache/ignite-3/pull/5#discussion_r535440706 ## File path: modules/configuration/src/main/java/org/apache/ignite/configuration/internal/validation/FieldValidator.java ## @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.configuration.internal.validation; + +import java.io.Serializable; +import org.apache.ignite.configuration.internal.DynamicConfiguration; + +/** + * Base class for field validator. Contains exception message. + * @param Field type. + * @param Root configuration type. + */ +public abstract class FieldValidator> { +/** Validation error message. */ +protected final String message; + +/** Constructor. */ +protected FieldValidator(String message) { +this.message = message; +} + +/** + * Validate field. + * + * @param value New value. + * @param newRoot New configuration root. + * @param oldRoot Old configuration root. + */ +public abstract void validate(T value, C newRoot, C oldRoot); Review comment: I decided to go with the checked exception (added it to the signature and docs ofcourse) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype
SammyVimes commented on a change in pull request #5: URL: https://github.com/apache/ignite-3/pull/5#discussion_r535440706 ## File path: modules/configuration/src/main/java/org/apache/ignite/configuration/internal/validation/FieldValidator.java ## @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.configuration.internal.validation; + +import java.io.Serializable; +import org.apache.ignite.configuration.internal.DynamicConfiguration; + +/** + * Base class for field validator. Contains exception message. + * @param Field type. + * @param Root configuration type. + */ +public abstract class FieldValidator> { +/** Validation error message. */ +protected final String message; + +/** Constructor. */ +protected FieldValidator(String message) { +this.message = message; +} + +/** + * Validate field. + * + * @param value New value. + * @param newRoot New configuration root. + * @param oldRoot Old configuration root. + */ +public abstract void validate(T value, C newRoot, C oldRoot); Review comment: I decided to go with the runtime exception in the end (added it to the signature and docs of course) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype
SammyVimes commented on a change in pull request #5: URL: https://github.com/apache/ignite-3/pull/5#discussion_r535547981 ## File path: modules/configuration/src/main/java/org/apache/ignite/configuration/internal/validation/MaxValidator.java ## @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.configuration.internal.validation; + +import org.apache.ignite.configuration.internal.DynamicConfiguration; + +/** + * Validate that field value is not greater than some maximum value. + * + * @param Root configuration type. + */ +public class MaxValidator> extends FieldValidator { +/** Maximum value. */ +private final long maxValue; + +/** Constructor. */ +public MaxValidator(long maxValue, String message) { +super(message); +this.maxValue = maxValue; +} + +/** {@inheritDoc} */ +@Override public void validate(Number value, C newRoot, C oldRoot) { +if (value.longValue() > maxValue) +throw new ConfigurationValidationException(message); Review comment: If we make this exception checked, then every configuration API call like ``` local.baseline.enabled(false); ``` will have to be wrapped in try-catch with ConfigurationValidationException. I think it for sure needs further discussion, but we can leave it as-is for now, as changing runtime to checked is no biggie This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] AMashenkov commented on a change in pull request #4: IGNITE-13610 WIP Initial version of unified CLI tool
AMashenkov commented on a change in pull request #4: URL: https://github.com/apache/ignite-3/pull/4#discussion_r540229106 ## File path: modules/cli-demo/cli/src/main/java/org/apache/ignite/cli/IgniteCliApp.java ## @@ -0,0 +1,13 @@ +package org.apache.ignite.cli; Review comment: License This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] sergey-chugunov-1985 opened a new pull request #6: IGNITE-13718 Integration module for new Unified Configuration providing REST API to access and manage configuration
sergey-chugunov-1985 opened a new pull request #6: URL: https://github.com/apache/ignite-3/pull/6 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] vveider opened a new pull request #7: Apache Ignite 3: RPM build
vveider opened a new pull request #7: URL: https://github.com/apache/ignite-3/pull/7 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] vveider closed pull request #7: Apache Ignite 3: RPM build
vveider closed pull request #7: URL: https://github.com/apache/ignite-3/pull/7 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] kgusakov opened a new pull request #8: IGNITE-13857 Update java version to 11
kgusakov opened a new pull request #8: URL: https://github.com/apache/ignite-3/pull/8 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] kgusakov closed pull request #8: IGNITE-13857 Update java version to 11
kgusakov closed pull request #8: URL: https://github.com/apache/ignite-3/pull/8 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] kgusakov commented on pull request #8: IGNITE-13857 Update java version to 11
kgusakov commented on pull request #8: URL: https://github.com/apache/ignite-3/pull/8#issuecomment-746534590 Merged This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] agoncharuk opened a new pull request #9: IGNITE-13874 Add PMD, Idea inspections, and checkstyle rules
agoncharuk opened a new pull request #9: URL: https://github.com/apache/ignite-3/pull/9 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] AMashenkov commented on a change in pull request #9: IGNITE-13874 Add PMD, Idea inspections, and checkstyle rules
AMashenkov commented on a change in pull request #9: URL: https://github.com/apache/ignite-3/pull/9#discussion_r545357953 ## File path: checkrules/pmd-ruleset.xml ## @@ -0,0 +1,29 @@ + + Review comment: This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] AMashenkov commented on a change in pull request #9: IGNITE-13874 Add PMD, Idea inspections, and checkstyle rules
AMashenkov commented on a change in pull request #9: URL: https://github.com/apache/ignite-3/pull/9#discussion_r545358324 ## File path: checkrules/pmd-ruleset.xml ## @@ -0,0 +1,29 @@ + +
[GitHub] [ignite-3] AMashenkov commented on a change in pull request #9: IGNITE-13874 Add PMD, Idea inspections, and checkstyle rules
AMashenkov commented on a change in pull request #9: URL: https://github.com/apache/ignite-3/pull/9#discussion_r545358324 ## File path: checkrules/pmd-ruleset.xml ## @@ -0,0 +1,29 @@ + +
[GitHub] [ignite-3] AMashenkov commented on a change in pull request #9: IGNITE-13874 Add PMD, Idea inspections, and checkstyle rules
AMashenkov commented on a change in pull request #9: URL: https://github.com/apache/ignite-3/pull/9#discussion_r545358324 ## File path: checkrules/pmd-ruleset.xml ## @@ -0,0 +1,29 @@ + +
[GitHub] [ignite-3] pavlukhin opened a new pull request #10: IGNITE-13875 Configure notifications for ignite-3 git repository
pavlukhin opened a new pull request #10: URL: https://github.com/apache/ignite-3/pull/10 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] alievmirza commented on a change in pull request #4: IGNITE-13610 Initial version of unified CLI tool
alievmirza commented on a change in pull request #4: URL: https://github.com/apache/ignite-3/pull/4#discussion_r545802730 ## File path: modules/cli-demo/cli/src/main/java/org/apache/ignite/cli/IgniteCLIException.java ## @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.cli; + +public class IgniteCLIException extends RuntimeException { Review comment: Somewhere you are using `*Cli*`, somewhere `*CLI*`, this should be unified This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] asfgit closed pull request #4: IGNITE-13610 Initial version of unified CLI tool
asfgit closed pull request #4: URL: https://github.com/apache/ignite-3/pull/4 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] pavlukhin merged pull request #10: IGNITE-13875 Configure notifications for ignite-3 git repository
pavlukhin merged pull request #10: URL: https://github.com/apache/ignite-3/pull/10 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] kgusakov opened a new pull request #11: IGNITE-13782 Add reinit support for corrupted installation
kgusakov opened a new pull request #11: URL: https://github.com/apache/ignite-3/pull/11 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-3] vkulichenko opened a new pull request #12: IGNITE-13894 - Improve look&feel of the CLI tool
vkulichenko opened a new pull request #12: URL: https://github.com/apache/ignite-3/pull/12 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-python-thin-client] ivandasch opened a new pull request #1: IGNITE-13903 Add tox, docker-compose and travis integration, update pytest versions.
ivandasch opened a new pull request #1: URL: https://github.com/apache/ignite-python-thin-client/pull/1 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-python-thin-client] isapego commented on a change in pull request #1: IGNITE-13903 Add tox, docker-compose and travis integration, update pytest versions.
isapego commented on a change in pull request #1: URL: https://github.com/apache/ignite-python-thin-client/pull/1#discussion_r548558576 ## File path: docker-compose.yml ## @@ -0,0 +1,34 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +services: + ignite: +image: apacheignite/ignite:2.9.0 Review comment: Are we going to change Ignite version here every time new Ignite is released? Can we somehow avoid specifying exact version here? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-python-thin-client] ivandasch commented on a change in pull request #1: IGNITE-13903 Add tox, docker-compose and travis integration, update pytest versions.
ivandasch commented on a change in pull request #1: URL: https://github.com/apache/ignite-python-thin-client/pull/1#discussion_r548627959 ## File path: docker-compose.yml ## @@ -0,0 +1,34 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +services: + ignite: +image: apacheignite/ignite:2.9.0 Review comment: Changed to :latest This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-nodejs-thin-client] asfgit closed pull request #2: IGNITE-13794 Partition awareness for Node.js
asfgit closed pull request #2: URL: https://github.com/apache/ignite-nodejs-thin-client/pull/2 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [ignite-nodejs-thin-client] asfgit closed pull request #1: IGNITE-11032 Move to TypeScript
asfgit closed pull request #1: URL: https://github.com/apache/ignite-nodejs-thin-client/pull/1 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] SomeFire opened a new pull request #16: IGNITE-9668 Comment JIRA from pr.html
SomeFire opened a new pull request #16: IGNITE-9668 Comment JIRA from pr.html URL: https://github.com/apache/ignite-teamcity-bot/pull/16 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] asfgit closed pull request #9: IGNITE-9541 Add the comparison for two general statistics "RunAll" for master in the date interval
asfgit closed pull request #9: IGNITE-9541 Add the comparison for two general statistics "RunAll" for master in the date interval URL: https://github.com/apache/ignite-teamcity-bot/pull/9 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/ITeamcity.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/ITeamcity.java index 6be0446..4151793 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/ITeamcity.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/ITeamcity.java @@ -18,6 +18,7 @@ package org.apache.ignite.ci; import java.io.File; +import java.util.Date; import java.util.List; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutorService; @@ -54,6 +55,7 @@ public interface ITeamcity extends AutoCloseable { String DEFAULT = ""; + long DEFAULT_BUILDS_COUNT = 1000; CompletableFuture> getProjectSuites(String projectId); @@ -61,45 +63,45 @@ String serverId(); /** - * @param projectId suite ID (string without spaces) - * @param branch - * @return list of builds in historical order, recent builds coming last + * @param projectId Suite ID (string without spaces). + * @param branch Branch in TC identification. + * @return List of builds in historical order, recent builds coming last. */ default List getFinishedBuilds(String projectId, String branch) { -return getFinishedBuilds(projectId, branch, null, null); +return getFinishedBuilds(projectId, branch, null, null, null); }; /** * @param projectId suite ID (string without spaces). * @param branch Branch name in TC identification. - * @param cnt builds count. + * @param sinceDate Since date. + * @param untilDate Until date. * @param sinceBuildId Some build ID in the past to to use as minimal build to export. * @return list of builds in historical order, recent builds coming last. */ -List getFinishedBuilds(String projectId, String branch, Long cnt, Integer sinceBuildId); +List getFinishedBuilds(String projectId, String branch, Date sinceDate, Date untilDate, Integer sinceBuildId); /** - * Includes snapshot dependencies failed builds into list + * Includes snapshot dependencies failed builds into list. * - * @param projectId suite ID (string without spaces) - * @param branch branch in TC identification - * @return list of builds in historical order, recent builds coming last + * @param projectId suite ID (string without spaces). + * @param branch branch in TC identification. + * @return list of builds in historical order, recent builds coming last. */ default List getFinishedBuildsIncludeSnDepFailed(String projectId, String branch){ -return getFinishedBuildsIncludeSnDepFailed(projectId, branch, null, null); +return getFinishedBuildsIncludeSnDepFailed(projectId, branch, null); }; /** * Includes 'snapshot dependencies failed' builds into list. * loads build history with following parameter: defaultFilter:false,state:finished * - * @param projectId suite ID (string without spaces) - * @param branch branch in TC identification - * @param cnt builds count - * @param sinceBuildId limit builds export with some build number, not operational for Persistent connection - * @return list of builds in historical order, recent builds coming last + * @param projectId suite ID (string without spaces). + * @param branch branch in TC identification. + * @param sinceBuildId limit builds export with some build number, not operational for Persistent connection. + * @return list of builds in historical order, recent builds coming last. */ -List getFinishedBuildsIncludeSnDepFailed(String projectId, String branch, Long cnt, Integer sinceBuildId); +List getFinishedBuildsIncludeSnDepFailed(String projectId, String branch, Integer sinceBuildId); /** */ CompletableFuture> getRunningBuilds(@Nullable String branch); @@ -107,8 +109,24 @@ /** */ CompletableFuture> getQueuedBuilds(@Nullable String branch); -default int[] getBuildNumbersFromHistory(String projectId, String branchNameForHist, Long cnt) { -return getFinishedBuilds(projectId, branchNameForHist, cnt, null).stream().mapToInt(BuildRef::getId).toArray(); +/** + * @param projectId Suite ID (string without spaces). + * @param branchNameForHist Branch in TC identification. + * @return List of build numbers in historical order, recent builds coming last. + */ +default int[] getBuildNumbersFromHistory(String p
[GitHub] asfgit closed pull request #16: IGNITE-9668 Comment JIRA from pr.html
asfgit closed pull request #16: IGNITE-9668 Comment JIRA from pr.html URL: https://github.com/apache/ignite-teamcity-bot/pull/16 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/TcHelper.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/TcHelper.java index e1b709e..0adf3fb 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/TcHelper.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/TcHelper.java @@ -189,10 +189,7 @@ private BranchesTracked getTrackedBranches() { return false; } -if ("finished".equals(build.state)) -return teamcity.sendJiraComment(ticket, comment); - -return false; +return teamcity.sendJiraComment(ticket, comment); } } diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/TriggerBuild.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/TriggerBuild.java index f5619ef..a4c66e6 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/TriggerBuild.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/TriggerBuild.java @@ -98,7 +98,6 @@ public SimpleResult commentJira( @NotNull public SimpleResult commentJiraEx(@QueryParam("serverId") @Nullable String srvId, @QueryParam("branchName") @Nullable String branchForTc, @QueryParam("suiteId") @Nullable String suiteId, @QueryParam("ticketId") @Nullable String ticketId) { -System.out.println("commentJira "); final ICredentialsProv prov = ICredentialsProv.get(req); if (!prov.hasAccess(srvId)) diff --git a/ignite-tc-helper-web/src/main/webapp/js/testfails-2.1.js b/ignite-tc-helper-web/src/main/webapp/js/testfails-2.1.js index 67d5c18..7974fca 100644 --- a/ignite-tc-helper-web/src/main/webapp/js/testfails-2.1.js +++ b/ignite-tc-helper-web/src/main/webapp/js/testfails-2.1.js @@ -35,6 +35,10 @@ class Settings { isGithubAvailable() { return this.javaFlags & 2 }; + +isJiraAvailable() { +return this.javaFlags & 4 +}; } //@param results - TestFailuresSummary @@ -159,13 +163,22 @@ function showChainCurrentStatusData(server, settings) { } res += ""; -if (settings.isGithubAvailable()) { -g_srv_to_notify_git = server; -res += "Update PR status"; + +// if (settings.isGithubAvailable()) { +// g_srv_to_notify_git = server; +// res += "Update PR status"; +// } + +if (settings.isJiraAvailable()) { +res += "Comment JIRA"; } if (isDefinedAndFilled(server.baseBranchForTc)) { -if (settings.isGithubAvailable()) +// if (settings.isGithubAvailable()) +// res+=""; + +if (settings.isJiraAvailable()) res+=""; res += "Base branch"; @@ -409,19 +422,43 @@ function commentJira(serverId, suiteId, branchName, ticketId) { "branchName": branchName, "ticketId": ticketId }, -success: function(result) {$("#notifyJira").html(""); +success: function(result) { +$("#notifyJira").html(""); + +var needTicketId = result.result.lastIndexOf("enter ticket id") !== -1; + +if (needTicketId) { +var buttons = { +"Retry": function () { +$(this).dialog("close"); + +ticketId = $("#enterTicketId").val(); + +commentJira(serverId, suiteId, branchName, ticketId) +}, +"Cancel": function () { +$(this).dialog("close"); +} +} +} +else { +buttons = { +"Ok": function () { +$(this).dialog("close"); +} +} +} + var dialog = $("#triggerDialog"); dialog.html("Trigger builds at server: " + serverId + "" + -" Suite: " + suiteId + "Branch:" + branchName + "Top: " + -" Result: " + result.result); +" Suite: " + suiteId + "Branch:" + branchName + +" Result: " + result.result + +(needTicketId ? ("Enter JIRA ticket number: ") : "")); + dialog.dialog({ modal: true, -buttons: { -"Ok": function() { -$(this).dialog("close"); -} -} +buttons: buttons }); loadData(); // should be defined by page
[GitHub] zzzadruga opened a new pull request #17: IGNITE-9541 Hotfix
zzzadruga opened a new pull request #17: IGNITE-9541 Hotfix URL: https://github.com/apache/ignite-teamcity-bot/pull/17 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] asfgit closed pull request #17: IGNITE-9541 Hotfix
asfgit closed pull request #17: IGNITE-9541 Hotfix URL: https://github.com/apache/ignite-teamcity-bot/pull/17 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgniteTeamcityConnection.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgniteTeamcityConnection.java index 9ddd68a..65ece8d 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgniteTeamcityConnection.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgniteTeamcityConnection.java @@ -486,7 +486,8 @@ public String basicAuthToken() { String branchFilter = isNullOrEmpty(branchName) ? "" :",branch:" + branchName; String sinceDateFilter = sinceDate == null ? "" : ",sinceDate:" + getDateYyyyMmDdTHhMmSsZ(sinceDate); String untilDateFilter = untilDate == null ? "" : ",untilDate:" + getDateYyyyMmDdTHhMmSsZ(untilDate); -String buildNoFilter = sinceBuildId == null ? "" : ",sinceBuild:(id:" + sinceBuildId + ")"; +String buildNoFilter = sinceBuildId == null || !(sinceDateFilter.isEmpty() && untilDateFilter.isEmpty()) ? +"" : ",sinceBuild:(id:" + sinceBuildId + ")"; return sendGetXmlParseJaxb(host + "app/rest/latest/builds" + "?locator=" This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] zzzadruga opened a new pull request #18: IGNITE-9541 Hotfix for old cache
zzzadruga opened a new pull request #18: IGNITE-9541 Hotfix for old cache URL: https://github.com/apache/ignite-teamcity-bot/pull/18 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] asfgit closed pull request #18: IGNITE-9541 Hotfix for old cache
asfgit closed pull request #18: IGNITE-9541 Hotfix for old cache URL: https://github.com/apache/ignite-teamcity-bot/pull/18 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java index 33497bb..837a9dc 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java @@ -443,50 +443,59 @@ private boolean isHistoryAgeLessThanSecs(SuiteInBranch key, int seconds, Expirab idUntil = idUntil == -2 ? buildRefs.size() - 1 : idUntil; } -if (idSince == -1 || idUntil == -1) -return Collections.emptyList(); -else if (idSince == -3 || idUntil == -3) { +if (idSince == -3 || idUntil == -3) { AtomicBoolean stopFilter = new AtomicBoolean(); AtomicBoolean addBuild = new AtomicBoolean(); -return buildRefs.stream() -.filter(b -> { -if (stopFilter.get()) -return addBuild.get(); - -Build build = getBuild(b.href); - -if (build == null || build.isFakeStub()) -return false; +return buildRefs.stream() +.filter(b -> { +if (stopFilter.get()) +return addBuild.get(); -Date date = build.getFinishDate(); +Build build = getBuild(b.href); -if (sinceDate != null && untilDate != null) -return (date.after(sinceDate) || date.equals(sinceDate)) && -(date.before(untilDate) || date.equals(untilDate)); -else if (sinceDate != null) { -if (date.after(sinceDate) || date.equals(sinceDate)) { -stopFilter.set(true); -addBuild.set(true); +if (build == null || build.isFakeStub()) +return false; -return true; -} +Date date = build.getFinishDate(); -return false; -} +if (sinceDate != null && untilDate != null) +if ((date.after(sinceDate) || date.equals(sinceDate)) && +(date.before(untilDate) || date.equals(untilDate))) +return true; else { if (date.after(untilDate)) { stopFilter.set(true); addBuild.set(false); - -return false; } +return false; +} +else if (sinceDate != null) { +if (date.after(sinceDate) || date.equals(sinceDate)) { +stopFilter.set(true); +addBuild.set(true); + return true; } -}) -.collect(Collectors.toList()); -} + +return false; +} +else { +if (date.after(untilDate)) { +stopFilter.set(true); +addBuild.set(false); + +return false; +} + +return true; +} +}) +.collect(Collectors.toList()); +} +else if (idSince == -1 || idUntil == -1) +return Collections.emptyList(); else return buildRefs.subList(idSince, idUntil + 1); } This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apach
[GitHub] dspavlov opened a new pull request #19: DI refactoring
dspavlov opened a new pull request #19: DI refactoring URL: https://github.com/apache/ignite-teamcity-bot/pull/19 Monitor observer tasks This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] SomeFire commented on a change in pull request #19: DI refactoring
SomeFire commented on a change in pull request #19: DI refactoring URL: https://github.com/apache/ignite-teamcity-bot/pull/19#discussion_r220537287 ## File path: ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/observer/ObserverTask.java ## @@ -17,43 +17,82 @@ package org.apache.ignite.ci.observer; +import java.util.HashSet; import java.util.Queue; +import java.util.Set; import java.util.TimerTask; import java.util.concurrent.ConcurrentLinkedQueue; +import javax.inject.Inject; import org.apache.ignite.ci.IAnalyticsEnabledTeamcity; -import org.apache.ignite.ci.ITcHelper; +import org.apache.ignite.ci.ITcServerProvider; +import org.apache.ignite.ci.di.AutoProfiling; +import org.apache.ignite.ci.di.MonitoredTask; +import org.apache.ignite.ci.jira.IJiraIntegration; import org.apache.ignite.ci.tcmodel.result.Build; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Checks observed builds for finished status and comments JIRA ticket. */ public class ObserverTask extends TimerTask { +/** Logger. */ +private static final Logger logger = LoggerFactory.getLogger(ObserverTask.class); + +/** Helper. */ +@Inject private ITcServerProvider srvProvider; + /** Helper. */ -private final ITcHelper helper; +@Inject private IJiraIntegration jiraIntegration; /** Builds. */ final Queue builds; /** - * @param helper Helper. */ -ObserverTask(ITcHelper helper) { -this.helper = helper; +ObserverTask() { builds = new ConcurrentLinkedQueue<>(); } /** {@inheritDoc} */ @Override public void run() { +try { Review comment: May be add `while(true)`? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] SomeFire commented on a change in pull request #19: DI refactoring
SomeFire commented on a change in pull request #19: DI refactoring URL: https://github.com/apache/ignite-teamcity-bot/pull/19#discussion_r220537287 ## File path: ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/observer/ObserverTask.java ## @@ -17,43 +17,82 @@ package org.apache.ignite.ci.observer; +import java.util.HashSet; import java.util.Queue; +import java.util.Set; import java.util.TimerTask; import java.util.concurrent.ConcurrentLinkedQueue; +import javax.inject.Inject; import org.apache.ignite.ci.IAnalyticsEnabledTeamcity; -import org.apache.ignite.ci.ITcHelper; +import org.apache.ignite.ci.ITcServerProvider; +import org.apache.ignite.ci.di.AutoProfiling; +import org.apache.ignite.ci.di.MonitoredTask; +import org.apache.ignite.ci.jira.IJiraIntegration; import org.apache.ignite.ci.tcmodel.result.Build; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Checks observed builds for finished status and comments JIRA ticket. */ public class ObserverTask extends TimerTask { +/** Logger. */ +private static final Logger logger = LoggerFactory.getLogger(ObserverTask.class); + +/** Helper. */ +@Inject private ITcServerProvider srvProvider; + /** Helper. */ -private final ITcHelper helper; +@Inject private IJiraIntegration jiraIntegration; /** Builds. */ final Queue builds; /** - * @param helper Helper. */ -ObserverTask(ITcHelper helper) { -this.helper = helper; +ObserverTask() { builds = new ConcurrentLinkedQueue<>(); } /** {@inheritDoc} */ @Override public void run() { +try { Review comment: May be add `while(true)`? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] asfgit closed pull request #19: DI refactoring
asfgit closed pull request #19: DI refactoring URL: https://github.com/apache/ignite-teamcity-bot/pull/19 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dspavlov opened a new pull request #20: Ignite 9645
dspavlov opened a new pull request #20: Ignite 9645 URL: https://github.com/apache/ignite-teamcity-bot/pull/20 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] zzzadruga opened a new pull request #21: IGNITE-9541 Fix bugs, refactor and add new info on html page
zzzadruga opened a new pull request #21: IGNITE-9541 Fix bugs, refactor and add new info on html page URL: https://github.com/apache/ignite-teamcity-bot/pull/21 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] asfgit closed pull request #21: IGNITE-9541 Fix bugs, refactor and add new info on html page
asfgit closed pull request #21: IGNITE-9541 Fix bugs, refactor and add new info on html page URL: https://github.com/apache/ignite-teamcity-bot/pull/21 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java index 837a9dc..bbf96a2 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java @@ -408,14 +408,18 @@ private boolean isHistoryAgeLessThanSecs(SuiteInBranch key, int seconds, Expirab List buildRefs = loadBuildHistory(buildHistCache(), 90, suiteInBranch, (key, sinceBuildId) -> { -buildsFromRest.addAll(teamcity.getFinishedBuilds(projectId, branch, sinceDate, untilDate, sinceBuildId)); +List reverseList = teamcity.getFinishedBuilds(projectId, branch, sinceDate, untilDate, sinceBuildId); + +Collections.reverse(reverseList); + +buildsFromRest.addAll(reverseList); return buildsFromRest; }); if (sinceDate != null || untilDate != null) { if (!buildsFromRest.isEmpty() && sinceDate != null){ -int firstBuildId = buildRefs.indexOf(buildsFromRest.get(buildsFromRest.size() - 1)); +int firstBuildId = buildRefs.indexOf(buildsFromRest.get(0)); if (firstBuildId == 0) return buildsFromRest; @@ -457,7 +461,7 @@ private boolean isHistoryAgeLessThanSecs(SuiteInBranch key, int seconds, Expirab if (build == null || build.isFakeStub()) return false; -Date date = build.getFinishDate(); +Date date = build.getStartDate(); if (sinceDate != null && untilDate != null) if ((date.after(sinceDate) || date.equals(sinceDate)) && diff --git a/ignite-tc-helper-web/src/main/webapp/comparison.html b/ignite-tc-helper-web/src/main/webapp/comparison.html index 909ee44..5efe4e3 100644 --- a/ignite-tc-helper-web/src/main/webapp/comparison.html +++ b/ignite-tc-helper-web/src/main/webapp/comparison.html @@ -16,13 +16,19 @@ - + DATE INTERVAL - + + + +FEATURES + + + TESTS COUNT @@ -167,7 +173,11 @@ return parseFloat(string.substring(string.indexOf("-") + 2, string.lastIndexOf("-") - 1)); } -function printStatistics(num, map) { +function printStatistics(num, map, sinceDate, untilDate) { +clearBackgroundFromAllDataCells(); +clearGraphs(num); + +const anotherNum = (num === 1) ? 2 : 1; const parseTime = d3.timeParse("%d-%m-%YT%H:%M:%S"); let statistics = {}; @@ -187,15 +197,30 @@ } } -const anotherNum = (num === 1) ? 2 : 1; +if (dates.length === 0) { +printImportantMessage(num, "#ff", "No data for the selected period"); +fillAllDataCells(num, ""); + +return; +} else { +let firstDate = moment(parseTime(map[0].startDate)).format("DD-MM-"); +let lastDate = moment(parseTime(map[map.length - 1].startDate)).format("DD-MM-"); + +if ((sinceDate.format("DD-MM-") !== firstDate) || (untilDate.format("DD-MM-") !== lastDate)) { +printImportantMessage(num, "#ffb856", "Data for " + +(firstDate === lastDate ? firstDate : ("the period from " + firstDate + " to " + lastDate)) + ""); +} else { +$("#info" + num).html(""); +if (document.getElementById("info" + anotherNum).innerHTML === "") { +document.getElementById("showInfo").style.display = "none"; +} +} +} + let anotherMedian; let result = {}; for (let i = 0; i < prOcc.length; i++) { - -document.getElementById(prOcc[i] + 1).style.background = null; -document.getElementById(prOcc[i] + 2).style.background = null; - result = getMinMaxMedian(statistics[prOcc[i]]); anotherMedian = parseMedian(document.getElementById(prOcc[i] + anotherNum).innerHTML); @@ -221,8 +246,8 @@ } $(document).ready(function() { -loadData(1, moment(oneWeekAgo).format("DDMM"), moment().format("DDMM")); -loadData(2, moment(twoWeekAgo).format("DDMM"), moment(oneWeekAgo).format("DDMM
[GitHub] zzzadruga commented on a change in pull request #20: Ignite 9645
zzzadruga commented on a change in pull request #20: Ignite 9645 URL: https://github.com/apache/ignite-teamcity-bot/pull/20#discussion_r220834879 ## File path: ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/build/GetBuildTestFailures.java ## @@ -159,51 +160,24 @@ public TestFailuresSummary getBuildTestFails( @GET @Path("history") -public List getBuildsHistory( +public BuildsHistory getBuildsHistory( @Nullable @QueryParam("server") String server, @Nullable @QueryParam("buildType") String buildType, @Nullable @QueryParam("branch") String branch, @Nullable @QueryParam("sinceDate") String sinceDate, @Nullable @QueryParam("untilDate") String untilDate) throws ServiceUnauthorizedException, ParseException { -DateFormat dateFormat = new SimpleDateFormat("ddMMHHmmss"); +BuildsHistory buildsHistory = new BuildsHistory.Builder() +.branch(branch) +.server(server) +.buildType(buildType) +.sinceDate(sinceDate) +.untilDate(untilDate) +.build(); -String srvId = isNullOrEmpty(server) ? "apache" : server; -String buildTypeId = isNullOrEmpty(buildType) ? "IgniteTests24Java8_RunAll" : buildType; -String branchName = isNullOrEmpty(branch) ? "refs/heads/master" : branch; -Date sinceDateFilter = isNullOrEmpty(sinceDate) ? null : dateFormat.parse(sinceDate); -Date untilDateFilter = isNullOrEmpty(untilDate) ? null : dateFormat.parse(untilDate); - -final BackgroundUpdater updater = CtxListener.getBackgroundUpdater(context); - -final ITcHelper tcHelper = CtxListener.getTcHelper(context); - -final ICredentialsProv prov = ICredentialsProv.get(req); - -try (IAnalyticsEnabledTeamcity teamcity = tcHelper.server(srvId, prov)) { +buildsHistory.initialize(ICredentialsProv.get(req), context); -int[] finishedBuilds = teamcity.getBuildNumbersFromHistory(buildTypeId, branchName, sinceDateFilter, untilDateFilter); - -List buildsStatistics = new ArrayList<>(); - -for (int i = 0; i < finishedBuilds.length; i++) { -int buildId = finishedBuilds[i]; - -FullQueryParams param = new FullQueryParams(); -param.setBuildId(buildId); -param.setBranch(branchName); -param.setServerId(srvId); - -BuildStatisticsSummary buildsStatistic = updater.get( -BUILDS_STATISTICS_SUMMARY_CACHE_NAME, prov, param, -(k) -> getBuildStatisticsSummaryNoCache(srvId, buildId), false); - -if (!buildsStatistic.isFakeStub) -buildsStatistics.add(buildsStatistic); -} - -return buildsStatistics; -} +return buildsHistory; } private BuildStatisticsSummary getBuildStatisticsSummaryNoCache(String server, int buildId) { Review comment: Method is never used This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] SomeFire opened a new pull request #22: IGNITE-9697 [TC Bot] Autocomplete branch for TC field
SomeFire opened a new pull request #22: IGNITE-9697 [TC Bot] Autocomplete branch for TC field URL: https://github.com/apache/ignite-teamcity-bot/pull/22 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] SomeFire closed pull request #22: IGNITE-9697 [TC Bot] Autocomplete branch for TC field
SomeFire closed pull request #22: IGNITE-9697 [TC Bot] Autocomplete branch for TC field URL: https://github.com/apache/ignite-teamcity-bot/pull/22 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/conf/ChainAtServer.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/conf/ChainAtServer.java index fc61c75..325327f 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/conf/ChainAtServer.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/conf/ChainAtServer.java @@ -32,6 +32,12 @@ /** Suite identifier by teamcity identification for root chain. */ @Nonnull public String suiteId; +/** URL for git integration. */ +@Nullable public String gitApiUrl; + +/** URL for JIRA integration. */ +@Nullable public String jiraApiUrl; + public ChainAtServer() { } @@ -39,6 +45,8 @@ public ChainAtServer() { public ChainAtServer(ChainAtServer o) { this.serverId = o.serverId; this.suiteId = o.suiteId; +this.gitApiUrl = o.gitApiUrl; +this.jiraApiUrl = o.jiraApiUrl; } /** {@inheritDoc} */ @@ -52,12 +60,14 @@ public ChainAtServer(ChainAtServer o) { ChainAtServer srv = (ChainAtServer)o; return Objects.equals(serverId, srv.serverId) && -Objects.equals(suiteId, srv.suiteId); +Objects.equals(suiteId, srv.suiteId)&& +Objects.equals(gitApiUrl, srv.gitApiUrl)&& +Objects.equals(jiraApiUrl, srv.jiraApiUrl); } /** {@inheritDoc} */ @Override public int hashCode() { -return Objects.hash(serverId, suiteId); +return Objects.hash(serverId, suiteId, gitApiUrl, jiraApiUrl); } /** diff --git a/ignite-tc-helper-web/src/main/webapp/index.html b/ignite-tc-helper-web/src/main/webapp/index.html index 1dc6eba..73cfb07 100644 --- a/ignite-tc-helper-web/src/main/webapp/index.html +++ b/ignite-tc-helper-web/src/main/webapp/index.html @@ -78,23 +78,29 @@ function showSuitesForPrCheckData(result) { var res = ""; + for (var i = 0; i < result.length; i++) { var chainAtServer = result[i]; //res+="Check PR"; +gitUrls.set(chainAtServer.serverId, chainAtServer.gitApiUrl); + res += ""; res += "Server: "; res += "Chain: "; res += "Base branch: "; -res += "Branch: "; +res += "Branch: "; res += ""; // res+=""; res += ""; res += ""; } + $("#suitesForPrCheck").html(res); -} +sendRequestsToFillAutocompleteLists(); +} function showBuildsOnServers(result) { var res = ""; diff --git a/ignite-tc-helper-web/src/main/webapp/js/common-1.6.js b/ignite-tc-helper-web/src/main/webapp/js/common-1.6.js index 6ef59d0..7487c2f 100644 --- a/ignite-tc-helper-web/src/main/webapp/js/common-1.6.js +++ b/ignite-tc-helper-web/src/main/webapp/js/common-1.6.js @@ -202,3 +202,95 @@ function tcHelperLogout() { } catch (e) { } } + +/** + * Change autocomplete filter to show results only when they starts from written text. + */ +$.ui.autocomplete.filter = function (array, term) { +var matcher = new RegExp("^" + $.ui.autocomplete.escapeRegex(term), "i"); + +return $.grep(array, function (value) { +return matcher.test(value.label || value.value || value); +}); +}; + +var callbackRegistry = {}; + +/** + * Send request to another site. + * + * @param url URL. + * @param onSuccess Function for success response. + * @param onError Function for fail response. + */ +function scriptRequest(url, onSuccess, onError) { +var scriptOk = false; + +var callbackName = 'cb' + String(Math.random()).slice(-6); + +url += ~url.indexOf('?') ? '&' : '?'; +url += 'callback=callbackRegistry.' + callbackName; + +callbackRegistry[callbackName] = function(data) { +scriptOk = true; + +delete callbackRegistry[callbackName]; + +onSuccess(data); +}; + +function checkCallback() { +if (scriptOk) +return; + +delete callbackRegistry[callbackName]; + +onError(url); +} + +var script = document.createElement('script'); + +script.onload = script.onerror = checkCallback; +script.src = url; + +document.body.appendChild(script); +} + +/** + * Key - server id. + * Value - url to git api. + * + * @type {Map} + */ +var gitUrls = new Map(); + +/** + * Send requests to the git to get pull requests for the branch autocomplete lists. + */ +function sendRequestsToFillAutocompleteLists() { +for (var entry of gitUrls.entries()) +scriptRequest(entry[1] + "pulls?sort=updated&direction=desc", fillBranchAutocomplete
[GitHub] zzzadruga opened a new pull request #23: IGNITE-9541 Add row highlight for 'failed', add title for columns, re…
zzzadruga opened a new pull request #23: IGNITE-9541 Add row highlight for 'failed', add title for columns, re… URL: https://github.com/apache/ignite-teamcity-bot/pull/23 …place JS code with JQuery This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] SomeFire opened a new pull request #24: IGNITE-9697 Autocomplete branch for TC field
SomeFire opened a new pull request #24: IGNITE-9697 Autocomplete branch for TC field URL: https://github.com/apache/ignite-teamcity-bot/pull/24 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] dspavlov closed pull request #20: Ignite 9645
dspavlov closed pull request #20: Ignite 9645 URL: https://github.com/apache/ignite-teamcity-bot/pull/20 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/ITeamcity.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/ITeamcity.java index 9481318..de34613 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/ITeamcity.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/ITeamcity.java @@ -42,6 +42,7 @@ import org.apache.ignite.ci.tcmodel.result.tests.TestOccurrence; import org.apache.ignite.ci.tcmodel.result.tests.TestOccurrenceFull; import org.apache.ignite.ci.tcmodel.result.tests.TestOccurrences; +import org.apache.ignite.ci.tcmodel.result.tests.TestRef; import org.apache.ignite.ci.util.Base64Util; import org.jetbrains.annotations.NotNull; @@ -152,6 +153,8 @@ default Build getBuild(int id) { TestOccurrences getTests(String href, String normalizedBranch); +TestOccurrences getFailedUnmutedTests(String href, String normalizedBranch); + Statistics getBuildStatistics(String href); CompletableFuture getTestFull(String href); @@ -160,6 +163,8 @@ default Build getBuild(int id) { ChangesList getChangesList(String href); +CompletableFuture getTestRef(TestOccurrence occurrence); + /** * List of build's related issues. * diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java index bbf96a2..9def938 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java @@ -72,6 +72,7 @@ import org.apache.ignite.ci.tcmodel.result.tests.TestOccurrence; import org.apache.ignite.ci.tcmodel.result.tests.TestOccurrenceFull; import org.apache.ignite.ci.tcmodel.result.tests.TestOccurrences; +import org.apache.ignite.ci.tcmodel.result.tests.TestRef; import org.apache.ignite.ci.util.CacheUpdateUtil; import org.apache.ignite.ci.util.CollectionUtil; import org.apache.ignite.ci.util.ObjectInterner; @@ -103,6 +104,7 @@ private static final String BUILD_HIST_FINISHED = "buildHistFinished"; private static final String BUILD_HIST_FINISHED_OR_FAILED = "buildHistFinishedOrFailed"; public static final String BOT_DETECTED_ISSUES = "botDetectedIssues"; +public static final String TEST_REFS = "testRefs"; //todo need separate cache or separate key for 'execution time' because it is placed in statistics private static final String BUILDS_FAILURE_RUN_STAT = "buildsFailureRunStat"; @@ -124,6 +126,11 @@ */ private ConcurrentMap> testOccFullFutures = new ConcurrentHashMap<>(); +/** + * cached loads of test refs. + */ +private ConcurrentMap> testRefsFutures = new ConcurrentHashMap<>(); + /** cached running builds for branch. */ private ConcurrentMap>> queuedBuilds = new ConcurrentHashMap<>(); @@ -217,6 +224,13 @@ public void init(String serverId) { return getOrCreateCacheV2(ignCacheNme(TEST_FULL)); } +/** + * @return {@link TestRef} instances cache, 32 parts. + */ +private IgniteCache testRefsCache() { +return getOrCreateCacheV2(ignCacheNme(TEST_REFS)); +} + /** * @return Build {@link ProblemOccurrences} instances cache, 32 parts. */ @@ -231,7 +245,6 @@ public void init(String serverId) { return getOrCreateCacheV2(ignCacheNme(BUILD_STATISTICS)); } - /** * @return Build history: {@link BuildRef} lists cache, 32 parts, transactional. */ @@ -824,6 +837,11 @@ private void registerCriticalBuildProblemInStat(Build build, ProblemOccurrences hrefIgnored -> teamcity.getTests(href, normalizedBranch)); } +@AutoProfiling +@Override public TestOccurrences getFailedUnmutedTests(String href, String normalizedBranch) { +return getTests(href + ",muted:false,status:FAILURE", normalizedBranch); +} + private void addTestOccurrencesToStat(TestOccurrences val) { for (TestOccurrence next : val.getTests()) addTestOccurrenceToStat(next, ITeamcity.DEFAULT, null); @@ -871,6 +889,23 @@ private void addTestOccurrencesToStat(TestOccurrences val) { }); } +@Override +@AutoProfiling +public CompletableFuture getTestRef(TestOccurrence testOccurrence) { +return CacheUpdateUtil.loadAsyncIfAbsent( +testRefsCache(), +testOccurrence.name, +testRefsFutures, +name -> { +try { +
[GitHub] ololo3000 opened a new pull request #25: IGNITE-9645 [TC Bot] Add comparison of failed tests lists in two date intervals
ololo3000 opened a new pull request #25: IGNITE-9645 [TC Bot] Add comparison of failed tests lists in two date intervals URL: https://github.com/apache/ignite-teamcity-bot/pull/25 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] SomeFire commented on a change in pull request #25: IGNITE-9645 [TC Bot] Add comparison of failed tests lists in two date intervals
SomeFire commented on a change in pull request #25: IGNITE-9645 [TC Bot] Add comparison of failed tests lists in two date intervals URL: https://github.com/apache/ignite-teamcity-bot/pull/25#discussion_r222308185 ## File path: ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/build/GetBuildTestFailures.java ## @@ -46,16 +50,9 @@ import javax.ws.rs.QueryParam; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; -import java.util.ArrayList; import java.util.Collections; -import java.util.List; -import java.util.Date; +import java.util.Optional; Review comment: Unused import. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] SomeFire commented on a change in pull request #25: IGNITE-9645 [TC Bot] Add comparison of failed tests lists in two date intervals
SomeFire commented on a change in pull request #25: IGNITE-9645 [TC Bot] Add comparison of failed tests lists in two date intervals URL: https://github.com/apache/ignite-teamcity-bot/pull/25#discussion_r68058 ## File path: ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgniteTeamcityConnection.java ## @@ -42,12 +42,15 @@ import org.apache.ignite.ci.tcmodel.result.issues.IssuesUsagesList; import org.apache.ignite.ci.tcmodel.result.problems.ProblemOccurrences; import org.apache.ignite.ci.tcmodel.result.stat.Statistics; +import org.apache.ignite.ci.tcmodel.result.tests.TestOccurrence; Review comment: Unused import. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services