-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Config file Auto-generation tool #138
base: trunk
Are you sure you want to change the base?
Conversation
9382d24
to
21a8d69
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a solid first crack. I have a few requests inline and a couple of questions.
6249f1d
to
f120468
Compare
@HalosGhost I believe i have addressed all your addressable comments made in this PR. The ones that were very straightforward i have marked "DONE". Others that i either have questions about or have implemented but should probably be reviewed again i have marked as "NEEDS FOLLOW UP". I have consolidated all my changes in one commit but have not squashed that commit into the original commit for this PR yet so that you can more easily view the diff. |
5165a05
to
d30fa0a
Compare
@HalosGhost This is just a general question. I am not sure where to post something like that. Would it be Zulip? Anyways, my question is, do you see, in your environment, any integration tests sporadically failing? I never used to see that occurring but recently, atomizer double_spend or atomizer invalid transaction sporadically fail. This occurs on all branches. I had not seen this until this week. I am just curious if this is a common occurrence or not. |
Zulip is a great catch-all for if you're not sure where to post something. However, there is a
We are aware of several cases where they are more likely to fail now than they used to be (cf. #119). However, even if this feels more pronounced now, it's an extension of the fact that the test suite is a bit fragile at the moment (e.g., relying on I've also seen this a little more frequently in the GitHub CI of-late, but I think the real solution is a general overhaul of how some of the test suite is written/architected rather than any change (e.g., increasing the sleep times). |
202a29a
to
082d1e0
Compare
@HalosGhost Hey Sam, are there any blockers on merging this? I am beginning work on a subsequent branch to create a test to use these files as well as further organize what i have done. |
There is a conflict to resolve, but it should be minor. Also, I must apologize for the delay in-review. My attention has been elsewhere; I will try to take a look at it this weekend! Also, please feel free to stack PRs if you're going to work on a follow-up branch (just base the new branch on this one, and reference this PR in the PR text to make clear this needs to be merged first). |
@HalosGhost Completely understand about the delays! I am sure you have a very full plate so no worries! I just wanted to make sure you werent waiting on me thats all. I did not notice the conflict. I will resolve that soon. I have branched off this for my continuation yes. Thanks for the tips! |
41421ae
to
06277db
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry this review took quite a while, but I tried to be quite thorough. I do think there are a few things that need to change before merge; most of them are hopefully simplifications and not making anything more complex.
49124d0
to
4cc941d
Compare
The specific error is here:
In particular, it looks like the culprit is this line. Looking at the changed-files list in the PR, As a side-note: |
71b1041
to
b8acdba
Compare
@ykaravas looks like you have it handled. utACK. Will test locally ASAP (heads-up that the next few days are rather busy on my end so it might be a little while before I can test fully). |
@ykaravas I've started taking another look at this and I'm getting stumped earlier in the process. Namely, the test suite seems to hang indefinitely for me on the config-test validation. I reran the CI to see if the same issue would occur, but it ran fine. The only change I made was to rebase on As a side-note: please put two returns between your commit header and the body; right now, the full commit message is in the header (which is unreadable). |
@HalosGhost That is odd. I have not been running into any hanging issues. I will test more on my end to see if i do. I have been rebasing all along. I will do that again in case it needs it but i think it is up to date. And what do you mean about two returns between commit header and body? I usually run the "git commit -s -m "commit message" command. Is there some other way i should do it? |
…I foresee much more expanded functionality in the future and a lot of potential. This will require some possible rework of some existing code, however, as well as integration tests to make use of this proposed functionality. Also reorganized config files into their own directory which seems neater. Also needed to fix docker stff. Might need to revert docker stuff. Not sure how that will affect others. Signed-off-by: Yiannis Karavas <[email protected]>
70e54c1
to
8e8d6e6
Compare
@ykaravas I'm so sorry, I accidentally edited your comment rather than replying! I've copied the result of my edit below for clarity, and I returned your comment to its original state. My apologies!
That makes sense. It's a little more typical to omit If you look through the commit history, you can see that some committers will expand quite a bit in the message body about why a change was done, or the general motivation. But, when keeping the header to <50 characters, you almost have to because that header is going to be the simplest summary of the change. |
@HalosGhost Have you had a chance to test this out yet? |
@ykaravas I'm still a little unsure of what's happening. But, the test suite is still hanging indefinitely for me. I'm going to stepwise debug it here in the next couple of days unless you have a thought of what might be going wrong. |
@HalosGhost Hey Sam. I am not sure what could be going on as i cannot recreate that issue. It seems that the unit test is passing on the server even though. So it doesn't seem to be hanging there either as far as i can tell, nor does it on my system. I am not sure how to go about debugging it since i cannot recreate it though. Any suggestions? |
@ykaravas nothing immediately comes to mind. Stepwise debugging on my side is the next reasonable step; sorry I've not been able to do so earlier! |
Ah, I've found what's wrong. It's a bit of fragility, but I'm not actually sure of a pleasant way to fix it. My clone is not named I'll disregard that for now and plan to use my local CI emulation until/unless we figure out a less-fragile method of detecting the repo root. |
Note: the way you do this in-shell is actually quite simple: $ cd "$(git rev-parse --show-toplevel)" |
Confirmed. I've changed my local clone's containing name to make testing easier. ☺ |
@ykaravas I think we should change one more thing. Right now, the config-generator finishes by just saying |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I mentioned above, I think there are two choices for the final change:
- Move all diagnostic/status messages to
stderr
, and output the generated config onstdout
(instructing users to redirect the output to their intended name/location) - Output the final path of the generated config along with the
SUCCESS
message.
I'm personally a fan of the first, but the second is definitely less work and I'd find it acceptable. The only thing that might strongly tip me in-favor of the first option is if it removes the need to locate the root/build directories. If so, then it can remove a ton of fragility that we'd be better off without.
Signed-off-by: Michael Maurer <[email protected]>
Signed-off-by: Michael Maurer <[email protected]>
Signed-off-by: Michael Maurer <[email protected]>
Signed-off-by: Michael Maurer <[email protected]>
Signed-off-by: Michael Maurer <[email protected]>
Signed-off-by: Michael Maurer <[email protected]>
Signed-off-by: Michael Maurer <[email protected]>
Removes identification of build directory, as sending file to build directory has been replaced by priting config file to stdout. Also adds support for seeding by generating a seed key if necessary. Update to properly print out config file to std error, and merge conventions such that m_new_config is used to store config file data Signed-off-by: Michael Maurer <[email protected]>
Removes identification of build directory, as sending file to build directory has been replaced by priting config file to stdout. Also adds support for seeding by generating a seed key if necessary. Update to properly print out config file to std error, and merge conventions such that m_new_config is used to store config file data Signed-off-by: Michael Maurer <[email protected]>
This pull request closes #136
Added configuration file autogeneration tool. I think there is still a lot that could be done here and there is potential for a lot more customization of tests/runs. The conversation is ongoing, however, this is a good spot to review and maybe even merge as it has basic functionality and is stable.
Moved configuration files around repo to their own directory, opencbdc-tx/config, for organizational purposes. Updated related scripts and docker yml files with new location of configs. This config dir houses an integration dir which holds integration test configs, unit dir, which holds unit test configs, a general dir, which holds the configs which were formerly in the project root dir and a tools dir which holds the config generator.
Created simple unit test for config generation as well which could be expanded a bit.