Bug #9525
Testcases: incorrect placeholders in directory.xml.template and other configuration problems
100%
Related issues
History
#1 Updated by Vladimir Tsichevski over 1 year ago
- Subject changed from Testcases: incorrect placeholders in directory.xml.template to Testcases: incorrect placeholders in directory.xml.template and other configuration problems
- Assignee set to Vladimir Tsichevski
Some placeholder names in directory.xml.template are incorrect:
- Typo in
{force_diry_cross_share}, corrent is{force_dirty_cross_share}. - Minus instead of underscore in
{force-dirty_intra_share}, correct value is{force_dirty_intra_share}. - Minus instead of underscore in
{client-start-dir}, correct value is{client_start_dir}. - Incorrect name
{dbpasswd}, correct value isdbuserpass.
Also, the .json files in the deploy/server are templates themselves (have the {os_user} and {dbport} placeholders, and this causes problems with prepare_dir.sh.
So, at this moment, preparing the correct directory.xml for PostgreSQL can only be done manually.
#2 Updated by Vladimir Tsichevski over 1 year ago
- % Done changed from 0 to 50
- File directory.xml.template.diff
added - Status changed from New to WIP
The directory.xml.template.diff contains fixes for directory.xml.template. I will commit them if nobody objects.
#3 Updated by Greg Shah over 1 year ago
- Status changed from WIP to Review
- reviewer Roger Borrello added
#4 Updated by Vladimir Tsichevski over 1 year ago
- Related to Support #9398: Incomplete SESSION:DATE-FORMAT implementation in FWD and setting session date format from command-line added
#5 Updated by Vladimir Tsichevski over 1 year ago
Another issue related to testcases directory configuration: #9398-17. Roger, please review this as well.
#6 Updated by Roger Borrello over 1 year ago
Vladimir Tsichevski wrote:
The
directory.xml.template.diffcontains fixes fordirectory.xml.template. I will commit them if nobody objects.
Thanks for finding this, and pointing out. I will make the update.
As for the client_start_dir issue with the spawner failing if this is not an absolute path, I can fix that a little more creatively by updated prepare_dir.sh to determine the absolute path to ../client with:
client_start_dir=$(getval "client_start_dir" $(cd ${srcpath}/../client; echo $(pwd)) $infile)
Where
$srcpath is the absolute path to the prepare_dir.sh script. If I remove the client_start_dir from the JSON, it will be calculated at the time you run the script.
Remember that these are configuration files, intended to be modifiable for each user's particular setup. That being said, I do agree defaulting them to a relative path was wrong. Thanks for your patience in finding this.
#7 Updated by Vladimir Tsichevski over 1 year ago
I forgot to mention the JSON files are themselves templates, which causes problems:
vvt@gcddev$ ./prepare_dir.sh -f prepare_dir_postgres.json
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
parse error: Invalid numeric literal at line 37, column 22
dirname: missing operand
Try 'dirname --help' for more information.
realpath: missing operand
Try 'realpath --help' for more information.
basename: missing operand
Try 'basename --help' for more information.
ERROR: Output file / exists, and '-o' not specified.
Usage: ./prepare_dir.sh [-o] [-f <json_cfg_file>]
Where:
o = Overwrite the specified directory.xml, otherwise fail
f = input from [json_cfg_file] (def="prepare_dir_postgres.json". To use the default, make sure this is the last parameter.)
#8 Updated by Roger Borrello over 1 year ago
Vladimir Tsichevski wrote:
I forgot to mention the JSON files are themselves templates, which causes problems:
Yes... I am addressing this in testcases_setup.sh, which will create a non-template prepare_dir.json if you are configuring for postgres.
#9 Updated by Roger Borrello over 1 year ago
- Status changed from Review to WIP
- Assignee changed from Vladimir Tsichevski to Roger Borrello
- % Done changed from 50 to 90
- reviewer Vladimir Tsichevski added
- reviewer deleted (
Roger Borrello)
My commit is stuck for some time...
rfb@rfb:~/projects/testcases_v2_master$ bzr commit -m "Fixed some typos in the template, and also prevented relative paths from being in the 'client_start_dir' when using 'prepare_dir.sh'. Added capability to use a zset file in the build.xml for conversion." Committing to: sftp://rfb@xfer.goldencode.com/opt/testcases/ modified build.xml modified deploy/server/directory.xml.template modified deploy/server/prepare_dir.sh modified deploy/server/prepare_dir_h2.json modified deploy/server/prepare_dir_postgres.json 8155kB 1169kB/s / Uploading data to master branch - Stage:Fetching revisions:Inserting stream:repacking texts:texts 1175/1202
Is it safe to control-break out of it, and retry?
#10 Updated by Greg Shah over 1 year ago
Yes. Also, use bzr+ssh instead of sftp.
#11 Updated by Roger Borrello over 1 year ago
- Status changed from WIP to Review
- % Done changed from 90 to 100
Greg Shah wrote:
Yes. Also, use
bzr+sshinstead of sftp.
Thanks... committed updates:
rfb@rfb:~/projects/testcases_v2_master$ bzr commit -m "Fixed some typos in the template, and also prevented relative paths from being in the 'client_start_dir' when using 'prepare_dir.sh'. Added capability to use a zset file in the build.xml for conversion. Update testcases_setup.sh to configure the JSON files." Committing to: bzr+ssh://rfb@xfer.goldencode.com/opt/testcases/ modified build.xml modified testcases_setup.sh modified deploy/server/directory.xml.template modified deploy/server/prepare_dir.sh modified deploy/server/prepare_dir_h2.json modified deploy/server/prepare_dir_postgres.json Committed revision 1687.
Vladimir, note that you should be using testcases_setup.sh to remove the template values in the JSON file. Setting up for PostGreSQL will update the prepare_dir_postgres.json file, otherwise the prepare_dir_postgres.json file will be updated. The result is prepare_dir.json, which should be ready for prepare_dir.sh.
#12 Updated by Vladimir Tsichevski over 1 year ago
- Assignee changed from Roger Borrello to Vladimir Tsichevski
- % Done changed from 100 to 50
- reviewer Roger Borrello added
- reviewer deleted (
Vladimir Tsichevski)
Roger Borrello wrote:
Greg Shah wrote:
Yes. Also, use
bzr+sshinstead of sftp.Thanks... committed updates:
[...]Vladimir, note that you should be using
testcases_setup.shto remove the template values in the JSON file. Setting up for PostGreSQL will update theprepare_dir_postgres.jsonfile, otherwise theprepare_dir_postgres.jsonfile will be updated. The result isprepare_dir.json, which should be ready forprepare_dir.sh.
I updated the repo and ran ./testcases_setup.sh from the project directory. The script reset the build.properties to some defaults.
Roger, what are the steps to configure the project with:
- default configuration (should be able to run the server an some tests after this is complete)
- with my custom parameters (for example, I use PosgreSQL with non-default port).
Is the process described at Redmine?
#13 Updated by Roger Borrello over 1 year ago
- Assignee changed from Vladimir Tsichevski to Roger Borrello
- % Done changed from 50 to 100
- reviewer Vladimir Tsichevski added
- reviewer deleted (
Roger Borrello)
Vladimir Tsichevski wrote:
I updated the repo and ran
./testcases_setup.shfrom the project directory. The script reset thebuild.propertiesto some defaults.
Roger, what are the steps to configure the project with:
- default configuration (should be able to run the server an some tests after this is complete)
- with my custom parameters (for example, I use PosgreSQL with non-default port).
Is the process described at Redmine?
Note that I am not an expert on the new testcases, but I saw that Galya had pointed you to this section of the Testcases Wiki which takes you through the beginning step.
For you, it looks like you would just need to specify the correct port in prepare_build.json:
{
"dbh2": false,
"dbpostgres": true,
"dbmariadb": false,
"dbport": 5432
}
Then run ./testcases_setup.sh, which would create your build.properties and a deploy/server/prepare_dir.json that you can modify for your specific configuration. Below is what would be created from the above prepare_build.json:
{
"server_xml_file": "server.xml",
"p2j_sport": 3333,
"p2j_iport": 3343,
"directory_xml_file": "directory.xml",
"spawner_path": "/opt/spawner/spawn",
"dateFormat": "dmy",
"numberGroupSep": ".",
"numberDecimalSep": ",",
"p2j_entry": "ask.p",
"pkgroot": "com.goldencode.testcases",
"propath": ".:appsrv/api:",
"search_path": ".",
"path_separator": ":",
"file_separator": "/",
"case_sensitive": "FALSE",
"os_user": "{os_user}",
"server_log": "../logs",
"client_log": "../logs",
"appserver_log": "../logs",
"embedded_host": "localhost",
"dirty_cross_share" : "FALSE",
"dirty_intra_share" : "FALSE",
"force_dirty_cross_share" : "FALSE",
"force_dirty_intra_share" : "FALSE",
"dirty_share_global_notifications" : "FALSE",
"dbnames": "tstcasesdb",
"tstcasesdb": {
"dbtype": "postgres",
"dbuser": "fwd_user",
"dbuserpass": "user",
"dbadmin": "fwd_admin",
"dbadminpass": "admin",
"collation": "en_US@iso88591_fwd_basic",
"dbhost": "localhost",
"dbport": 5432
}
}
If you need different values, make the changes and save it. You could make it prepare_dir_vvt.json and pass that to -f option of prepare_dir.sh.
Build/import/run after that.
#14 Updated by Vladimir Tsichevski over 1 year ago
- File directory_db.xml.template.diff
added
I tested fix and wrote some abstract.
Now the scripts run with no errors, and the result is (presumably) OK (see below).
The only notes are as follows:
- some attribute names in
directory_db.xml.templateare lower-cased. The fix is indirectory_db.xml.template.diff - seems merging directory fragments with FWD directory tool makes some attribute values lower-cased.
I suspect, FWD directory node names are case-insensitive, so this does not break anything, but just make result file comparison more difficult.
#15 Updated by Roger Borrello over 1 year ago
The fragments are combined with com.goldencode.p2j.directory.DirectoryCopy, so perhaps that tool is not preserving case? It is calling the below when copy is passed:
// copy the branch between directories
rc = DirectoryService.copySubtree(rs, args[1], rt, args[3], true);
Eugenie, do you know whether or not the case could be preserved?
#16 Updated by Eugenie Lyzenko over 1 year ago
Roger Borrello wrote:
The fragments are combined with
com.goldencode.p2j.directory.DirectoryCopy, so perhaps that tool is not preserving case? It is calling the below whencopyis passed:
[...]Eugenie, do you know whether or not the case could be preserved?
I think we should assume the names are not case sensitive. So it is better to avoid using CamelCase formatting for complex names, instead of veryLongName use very-long-name or very_long_name.
#17 Updated by Greg Shah over 1 year ago
The fragments are combined with
com.goldencode.p2j.directory.DirectoryCopy, so perhaps that tool is not preserving case?
Unless it is documented to change the case, we should preserve it.
#18 Updated by Vladimir Tsichevski over 1 year ago
If I get the logic of prepare_dir.sh right, the directory_db.xml.template unconditionally replaces the corresponding fragment at /server/standard/database in directory.xml.template (which is explicitly for h2).
Is this correct?
If yes, then this replacement may be done with the directory.xml.template file in repository, so no call to com.goldencode.p2j.directory.DirectoryCopy (and overall dependence of the configuration scripts on FWD binaries) is required anymore, and the directory_db.xml.template file can be eliminated.
If no, then the script shall be fixed for h2-based configurations.
#19 Updated by Roger Borrello over 1 year ago
Vladimir Tsichevski wrote:
If I get the logic of
prepare_dir.shright, thedirectory_db.xml.templateunconditionally replaces the corresponding fragment at/server/standard/databaseindirectory.xml.template(which is explicitly for h2).Is this correct?
No... The same process happens if you are configuring postgres or h2. The template is swept with values based upon the DB type and named for the DB, then each is merged into the directory. This way multiple DB configurations can be handled.
#20 Updated by Vladimir Tsichevski over 1 year ago
Roger Borrello wrote:
Vladimir Tsichevski wrote:
If I get the logic of
prepare_dir.shright, thedirectory_db.xml.templateunconditionally replaces the corresponding fragment at/server/standard/databaseindirectory.xml.template(which is explicitly for h2).Is this correct?
No... The same process happens if you are configuring postgres or h2. The template is swept with values based upon the DB type and named for the DB, then each is merged into the directory. This way multiple DB configurations can be handled.
I mean not the values, but the template fragment itself. The existing DB node in directory.xml.template is always replaced by the contents of directory_db.xml.template. If this is OK for h2, then the original DB part of the original directory.xml.template is dead code, and can be replaced in the original directory.xml.template repository source.
#21 Updated by Roger Borrello over 1 year ago
Vladimir Tsichevski wrote:
I mean not the values, but the template fragment itself. The existing DB node in
directory.xml.templateis always replaced by the contents ofdirectory_db.xml.template. If this is OK for h2, then the original DB part of the originaldirectory.xml.templateis dead code, and can be replaced in the originaldirectory.xml.templaterepository source.
The template fragment is to be used in the directory an unknown number of times. It has to do with the number of databases that are to be configured. In many cases you could have "shards" of databases configured. For example, if your JSON has:
{
...
"dbnames" : "hotel,ledger,prices",
"hotel" :
{
"dbtype" : "postgres",
"dbuser" : "fwd_user",
"dbuserpass" : "user",
"dbadmin" : "fwd_admin",
"dbadminpass": "admin",
"collation" : "en_US@iso88591_fwd_basic",
"hostname" : "localhost",
"port" : 5432
},
"ledger" :
{
"dbtype" : "postgres",
"dbuser" : "fwd_user",
"dbuserpass" : "user",
"dbadmin" : "fwd_admin",
"dbadminpass": "admin",
"collation" : "en_US@iso88591_fwd_basic",
"hostname" : "localhost",
"port" : 5432
},
"prices" :
{
"dbtype" : "postgres",
"dbuser" : "fwd_user",
"dbuserpass" : "user",
"dbadmin" : "fwd_admin",
"dbadminpass": "admin",
"collation" : "en_US@iso88591_fwd_basic",
"hostname" : "localhost",
"port" : 5432
}
}
You will need 3 of the directory_db.xml.template fragments to be included in the directory. Each with its own substituted values.
#22 Updated by Roger Borrello over 1 year ago
Edited #9525-21 for clarity.
#23 Updated by Vladimir Tsichevski over 1 year ago
Roger Borrello wrote:
Edited #9525-21 for clarity.
Now I see why the directory copy is necessary.
But anyway, the existing database node in directory.xml.template is always replaced by the prepared node for the first item in $dbnames.
So this part of template is never used (and must never be!) and has to be removed to avoid reader confusion and make the program less fragile and faster a bit.
#24 Updated by Roger Borrello over 1 year ago
Vladimir Tsichevski wrote:
But anyway, the existing database node in
directory.xml.templateis always replaced by the prepared node for the first item in$dbnames.
So this part of template is never used (and must never be!) and has to be removed to avoid reader confusion and make the program less fragile and faster a bit.
I see what you are finding. I am comparing the DB template in the testcases to the one in the Hotel GUI, and I do notice a difference I'd like to get some feedback on. There is a "_temp" database in the Hotel GUI:
<node class="container" name="">
<node class="container" name="server">
<node class="container" name="standard">
<node class="container" name="database">
<node class="container" name="_temp">
<node class="container" name="p2j">
<node class="string" name="schema">
<node-attribute name="value" value="_temp"/>
</node>
<node class="string" name="embedded-collation">
<node-attribute name="value" value="{collation}"/>
</node>
</node>
</node>
Also in Hotel GUI there are some settings for the DB being entered:
<node class="container" name="server">
<node class="container" name="standard">
<node class="container" name="database">
<node class="container" name="{dbname}">
<node class="container" name="orm">
<node class="container" name="c3p0">
<node class="boolean" name="validate">
<node-attribute name="value" value="FALSE"/>
</node>
</node>
<node class="container" name="cache">
<node class="boolean" name="use_second_level_cache">
<node-attribute name="value" value="FALSE"/>
</node>
<node class="boolean" name="use_query_cache">
<node-attribute name="value" value="FALSE"/>
</node>
</node>
I could keep these 2 things different between Hotel GUI and the testcases, but if they should match, now is the time to correct one of them.
So the directory.xml.template will just have:
<node class="container" name="database">
</node>
#25 Updated by Vladimir Tsichevski over 1 year ago
Roger Borrello wrote:
Vladimir Tsichevski wrote:
But anyway, the existing database node in
directory.xml.templateis always replaced by the prepared node for the first item in$dbnames.
So this part of template is never used (and must never be!) and has to be removed to avoid reader confusion and make the program less fragile and faster a bit.I see what you are finding. I am comparing the DB template in the testcases to the one in the Hotel GUI, and I do notice a difference I'd like to get some feedback on. There is a
"_temp"database in the Hotel GUI:
[...]
Probably, this entry shall retain as-is. As long as the name of the database node does not clash with dbnames, the directory tool will not change this node.
Also in Hotel GUI there are some settings for the DB being entered:
[...]I could keep these 2 things different between Hotel GUI and the testcases, but if they should match, now is the time to correct one of them.
Yes, the nodes shall be compared, merged and "There Can Be Only One".
So the
directory.xml.templatewill just have:
[...]
In case of testcases, I suppose yes.
#26 Updated by Roger Borrello over 1 year ago
Thanks, Vladimir. Greg, there are some entries in Hotel GUI which I noted, and I'm not sure if they should be included in the DB setup. Is there another reviewer that can check on this? There is a _temp database defined, and the hotel database includes orm/c3po settings (cache/use_second_level_cache and cache/use_query_cache). Should these be generally included in the testcase DB (as well as any others that follow the Hotel GUI template)?
#27 Updated by Greg Shah over 1 year ago
- reviewer Eric Faulhaber added
#28 Updated by Roger Borrello over 1 year ago
- reviewer deleted (
Eric Faulhaber)
Greg Shah wrote:
The fragments are combined with
com.goldencode.p2j.directory.DirectoryCopy, so perhaps that tool is not preserving case?Unless it is documented to change the case, we should preserve it.
I looked through the Chapter 12 Directory wiki, and all it mentions is that links are case-insensitive. It doesn't specify details related to that in any of the sections.
On #8876, the template XML I was using has the case of the keys lowercased when the DirectoryCopy takes place. It seems this is deep within directory.IdUtils, and other classes related to directory. It seems like a risky area to make changes. However, it does pose a problem with some tools that may be searching for things within the directory, and not finding them because the case doesn't match.
Under which project would this bug be created?
#29 Updated by Roger Borrello over 1 year ago
- reviewer Eric Faulhaber added
Eric, we should be able to close this down if the #9525-26 questions are answered.
#30 Updated by Greg Shah over 1 year ago
Roger Borrello wrote:
Greg Shah wrote:
The fragments are combined with
com.goldencode.p2j.directory.DirectoryCopy, so perhaps that tool is not preserving case?Unless it is documented to change the case, we should preserve it.
I looked through the Chapter 12 Directory wiki, and all it mentions is that links are case-insensitive. It doesn't specify details related to that in any of the sections.
On #8876, the template XML I was using has the case of the keys lowercased when the DirectoryCopy takes place. It seems this is deep within
directory.IdUtils, and other classes related todirectory. It seems like a risky area to make changes. However, it does pose a problem with some tools that may be searching for things within the directory, and not finding them because the case doesn't match.
The problem is likely due to using the normalized nodeId in add or copy operations.
Under which project would this bug be created?
This one.
#31 Updated by Eric Faulhaber over 1 year ago
Roger Borrello wrote:
Thanks, Vladimir. Greg, there are some entries in Hotel GUI which I noted, and I'm not sure if they should be included in the DB setup. Is there another reviewer that can check on this? There is a
_tempdatabase defined,
I don't know if this is still needed. IIRC, the only remaining use for it (as of some years ago) was to set the collation of the embedded, H2, temp-table database, using the embedded-collation config node. But this code changed significantly when we added support for some legacy codepage and collation features.
Ovidiu, any thoughts on this?
and the hotel database includes
orm/c3posettings (cache/use_second_level_cacheandcache/use_query_cache). Should these be generally included in the testcase DB (as well as any others that follow the Hotel GUI template)?
The whole cache section should be removed. use_second_level_cache and use_query_cache are Hibernate-era settings which are no longer in use. The c3p0 section should stay, but please remove the maxStatementsPerConnection setting. This refers to a prepared statement cache within the connection pooling software. The setting was speculative and could be beneficial, neutral, or detrimental, depending on the application. We shouldn't be setting it by default.
#32 Updated by Ovidiu Maxiniuc over 1 year ago
Eric Faulhaber wrote:
Thanks, Vladimir. Greg, there are some entries in Hotel GUI which I noted, and I'm not sure if they should be included in the DB setup. Is there another reviewer that can check on this? There is a
_tempdatabase defined,I don't know if this is still needed. IIRC, the only remaining use for it (as of some years ago) was to set the collation of the embedded, H2, temp-table database, using the
embedded-collationconfig node. But this code changed significantly when we added support for some legacy codepage and collation features.
Ovidiu, any thoughts on this?
Yes, the embedded-collation is still needed. It is the way to load collations from com.goldencode.p2j.spi package. Off the top of my head, it is probably the only active setting for _temp database.
#33 Updated by Eric Faulhaber over 1 year ago
Ovidiu Maxiniuc wrote:
Yes, the
embedded-collationis still needed. It is the way to load collations fromcom.goldencode.p2j.spipackage. Off the top of my head, it is probably the only active setting for _temp database.
I'm not clear on the default value for this. In H2Helper, we have this:
/** Default embedded collation. Intentionally use of AT. It will be replaced with underscore. */ private static final String DEFAULT_COLLATION = "en_US@iso88591_fwd_basic";
IIRC, the default used to be en_US_P2J.
If no override of DEFAULT_COLLATION is found in the directory, there is a SET COLLATION call to use this default (with the @ symbol replace by _). Does this properly resolve to a Java collation provider from fwdspi.jar?
Assuming yes, we only need the _temp container in the directory if we need to override the default embedded-collation, correct?
As more customers use UTF8 databases, is en_US@iso88591_fwd_basic still a sensible default?
#34 Updated by Ovidiu Maxiniuc over 1 year ago
com.goldencode.p2j.spi.FwdCollatorProvider:
- the
DEFAULT_COLLATION = "en_US@iso88591_fwd_basic"(all variantsen_US,en_GB,nl_NL) are mapped tocom.goldencode.p2j.spi.ISO_8859_1Collator - the
en_US@P2Jis also mapped tocom.goldencode.p2j.spi.ISO_8859_1Collator
so they are handled the same.
If I remember correctly, we kind of deprecated en_US@P2J in the favour of the more explicit en_US@iso88591_fwd_basic, but decided to keep the old name as an alias. The @ was replaced by _ because of some constraints with the locale naming. See #5491-44. We tried to unify the naming/aliases of the built-in collators with OS level locales.
If the embedded-collation is not specified, the "default Java collation" is used for H2 databases. So this entry in directory should be removed for setups which have UTF-8 native collations (no set collation ... will be executed at database initialization).
#35 Updated by Ovidiu Maxiniuc over 1 year ago
I looked back again to H2Helper.prepareDatabase. Indeed, the way it is written now, I do not think it is possible to get a null collation (because the DEFAULT_COLLATION is returned in case the directory key is not found).
Therefore, the native/utf collation is excluded. We need to either replace the DEFAULT_COLLATION with null or replace the if (collation != null) condition with one which would skip the collation configuration if the embedded-collation is utf8 or a similar name.
However, UTF-8 is just a character encoding schema, it does not impose any constraints on how the characters are sorted / collation.
#36 Updated by Roger Borrello over 1 year ago
- Regarding
server/standard/database/_temp. Is that to be a database included by default in projects? It is in the Hotel ChUI and GUI project DB templates, but not in the testcases DB template. Should it be part of all directories? - I am removing
server/standard/database/{dbname}/orm/c3p0/maxStatementsPerConnectionfrom the templates. - I will continue to have
server/standard/database/{dbname}/p2j/embedded-collation/{collation}be something swept via json configuration in the templates.
#37 Updated by Ovidiu Maxiniuc over 1 year ago
Roger,
The collation is an attribute of each database. The DBCOLLATION(db) function will return it. However, there is no way for passing the _temp database to it. _temp is a FWD specific alias. And the temp database notion is a bit different, as well. I assume its collation is the same as SESSION:CPCOLL (-cpinternal startup parameter). So I guess we want to use that value for _temp database.
#38 Updated by Greg Shah over 1 year ago
- Project changed from Build and Source Control to Testing
#39 Updated by Roger Borrello over 1 year ago
I believe this task is ready for review.
#40 Updated by Vladimir Tsichevski over 1 year ago
Roger Borrello wrote:
I believe this task is ready for review.
Which changes are we expected to review?
#41 Updated by Roger Borrello over 1 year ago
Vladimir Tsichevski wrote:
Roger Borrello wrote:
I believe this task is ready for review.
Which changes are we expected to review?
Anything related to why you created the ticket. Everything in #9525-1
#42 Updated by Vladimir Tsichevski over 1 year ago
Roger Borrello wrote:
Vladimir Tsichevski wrote:
Roger Borrello wrote:
I believe this task is ready for review.
Which changes are we expected to review?
Anything related to why you created the ticket. Everything in #9525-1
I mean where can we find the changes? Which repositories, revisions?
#43 Updated by Roger Borrello over 1 year ago
#44 Updated by Vladimir Tsichevski over 1 year ago
Review xfertestcases: r1687, r1696, r1711.
Issues found in build.xml:
1. The convert target does not depend on check-zfile-set:
<target name="convert"
depends="init, check-zfile-set"
description="Convert the 4GL source code to Java source code, using a pattern as input."
2. Same for this:
<target name="convert.front"
depends="init, check-zfile-set"
description="Execute the parse phase of the conversion process, using a pattern as input."
3. And this:
<target name="convert.middle" depends="init, check-zfile-set"
description="Execute the parse and schema conversion phases of the conversion process, using a pattern as input."
unless="no-list-mode">
#45 Updated by Roger Borrello over 1 year ago
Vladimir Tsichevski wrote:
Review xfertestcases: r1687, r1696, r1711.
You cut off the targets before the very important stuff... unless="no-list-mode">
<target name="check-zfile-set">
<available file="${zfile}" property="zfile-set"/>
</target>
<condition property="no-list-mode">
<available file="${zfile}"/>
</condition>
<!-- convert 4GL code from ${app.4gl.src} into ${src}, using ${app.4gl.pattern} pattern -->
<target name="convert"
depends="init, check-zfile-set"
description="Convert the 4GL source code to Java source code, using a pattern as input."
unless="no-list-mode">
...
<target name="convert.front"
depends="init, check-zfile-set"
description="Execute the parse phase of the conversion process, using a pattern as input."
unless="no-list-mode">
The
check-zfile-set target will set zfile-set to true if there is a ${zfile} found. (This defaults to zfile_set.txt unless -Dzfile=... is passed in.) Likewise, no-list-mode is set if there is a ${zfile}. This satisfies the convert target (and convert.front and convert.middle) to only run if there isn't a ${zfile}.
Those targets are utilizing the ConversionDriver -S option, which takes the conversion list from the ${app.4gl.pattern} value. The .zset targets use the -Z option to ConversionDriver, and that requires the ${zset} file as input.
#46 Updated by Vladimir Tsichevski over 1 year ago
Roger Borrello wrote:
Vladimir Tsichevski wrote:
Review xfertestcases: r1687, r1696, r1711.
You cut off the targets before the very important stuff...
unless="no-list-mode">
[...]
Thecheck-zfile-settarget will setzfile-setto true if there is a${zfile}found. (This defaults tozfile_set.txtunless-Dzfile=...is passed in.) Likewise,no-list-modeis set if there is a${zfile}. This satisfies the convert target (and convert.front and convert.middle) to only run if there isn't a${zfile}.Those targets are utilizing the ConversionDriver -S option, which takes the conversion list from the
${app.4gl.pattern}value. The.zsettargets use the -Z option to ConversionDriver, and that requires the${zset}file as input.
Understood. Based on this logic, conversion targets that do not rely on using zfile_set.txt are effectively unreachable. To make them active, you must first remove the zfile_set.txt file, which is risky since it’s part of the repository. I’d prefer a solution that allows running any conversion without deleting repository files.
#47 Updated by Vladimir Tsichevski over 1 year ago
Also, I would simplify things by removing all ‘old’ conversion targets entirely. I’d also rename the repository’s zfile_set.txt file to something like zfile_set.txt.template to prevent users from accidentally committing their customizations to the repository.
#48 Updated by Roger Borrello over 1 year ago
Vladimir, these build.xml files are written to handle conversion either via the fileset method (-Z) or the sources method (-S) of collecting files. Most projects will be one or the other, but the targets are in the build.xml for reference. I don't believe we know exactly how this project will be utilized in all use cases, so we need to leave them there.
I did follow your advice about moving zfile_set.txt. I named it zfile_set.txt.sample.
- There is a connections area set:
server/default/runtime/default/database-connections="tstcasesdb" - There is a
_tempdatabase:server/default/database/_temp/p2j - Removed
server/default/database/tstcasesdb/orm/c3p0/maxStatementsPerConnectionandserver/default/database/tstcasesdb/orm/c3p0/initialpoolsize
#49 Updated by Roger Borrello over 1 year ago
- reviewer Ovidiu Maxiniuc added
I think there is just some minor reviews necessary.
#50 Updated by Ovidiu Maxiniuc over 1 year ago
I think maxStatementsPerConnection and initialPoolSize from server/default/database/tstcasesdb/orm/c3p0 are still in use. Or there is a task for dropping them I am not aware? If the elimination is only in the testcases project, it's would be OK. But this project may be used as a template by the customers, so my opinion is that they should stay.
No other objections.
#51 Updated by Greg Shah over 1 year ago
The testcases project will not be used as a template for customers. It is private.
Also: unless we need a specific value to be specified, the content should be removed.
#52 Updated by Roger Borrello 10 months ago
Eric, is the server/standard/database/_temp necessary to have in the testcases and/or hotel directories?