Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Update new-backend docs #4573

Merged
merged 15 commits into from
Nov 12, 2022
Merged

Conversation

kodebach
Copy link
Member

Incorporates the reviews from #4187

Basics

  • Short descriptions of your changes are in the release notes
    (added as entry in doc/news/_preparation_next_release.md which
    contains _(my name)_)
    Please always add something to the release notes.
  • Details of what you changed are in commit messages
    (first line should have module: short statement syntax)
  • References to issues, e.g. close #X, are in the commit messages.
  • The buildservers are happy. If not, fix in this order:
    • add a line in doc/news/_preparation_next_release.md
    • reformat the code with scripts/dev/reformat-all
    • make all unit tests pass
    • fix all memleaks
  • The PR is rebased with current master.

Checklist

  • I added unit tests for my code
  • I fully described what my PR does in the documentation
    (not in the PR description)
  • I fixed all affected documentation (see Documentation Guidelines)
  • I added code comments, logging, and assertions as appropriate (see Coding Guidelines)
  • I updated all meta data (e.g. README.md of plugins and METADATA.ini)
  • I mentioned every code not directly written by me in reuse syntax

Review

Labels

  • Add the "work in progress" label if you do not want the PR to be reviewed yet.
  • Add the "ready to merge" label if the basics are fulfilled and no further pushes are planned by you.

@kodebach kodebach requested a review from markus2330 October 18, 2022 16:39
src/libs/elektra/kdb.c Outdated Show resolved Hide resolved
Copy link
Contributor

@markus2330 markus2330 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job! Keep up the good work! ❤️

doc/decisions/backend_plugin.md Outdated Show resolved Hide resolved
doc/decisions/backend_plugin.md Outdated Show resolved Hide resolved
doc/decisions/backend_plugin.md Outdated Show resolved Hide resolved
doc/decisions/commit_function.md Outdated Show resolved Hide resolved
doc/dev/backend-plugins.md Show resolved Hide resolved
src/libs/elektra/kdb.c Outdated Show resolved Hide resolved
* **Note**: In general it is recommended to use a @p parentKey in the cascading namespace.
* - `spec:/`, `dir:/`, `user:/` and `system:/` can be loaded via kdbGet().
* - `proc:/` keys can be loaded via kdbGet(), but are not persisted or cached.
* - `default:/` keys can be returned by kdbGet() but they will always stem from a specification in `spec:/` keys
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To not make a constraint to default: keys added beforehand:

Suggested change
* - `default:/` keys can be returned by kdbGet() but they will always stem from a specification in `spec:/` keys
* - `default:/` keys can be inserted by kdbGet() but they will always stem from a specification in `spec:/` keys

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To not make a constraint to default: keys added beforehand

I accepted the suggestion, but not sure what you wanted to say here. I thought we want default:/ keys to come from spec:/ only (see #4484 (comment)). Pre-existing default:/ keys will be removed, if the overlap with a loaded backend. Outside those backends, they will of course be kept, but that's the case for any other namespace too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change is good then. But it would be good to have these two sentences in the docu, too.

src/libs/elektra/kdb.c Outdated Show resolved Hide resolved
/positions/set/commit = (="#0")
/positions/set/rollback (="#0")
```
<!-- TODO [new_backend]: finish README -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 please

src/plugins/missing/README.md Show resolved Hide resolved
src/libs/elektra/kdb.c Outdated Show resolved Hide resolved
src/libs/elektra/kdb.c Outdated Show resolved Hide resolved
@kodebach
Copy link
Member Author

@markus2330 Didn't have time yet to create a README for backend, but hopefully I addressed all the rest.

Regarding the decisions here:

  • commit_function.md: This one is the important one that should be decided ASAP. I'm heavily in favour of not having separate functions (i.e. option 3 or 4). I would prefer the separate phase arguments, but that probably breaks to much stuff, so I'd go with option 3.
  • plugin_contract_function.md: First of all, I know option 3 here, is not really part of this decision. But it didn't quite fit here and I just wanted to quickly write down the idea. I will remove it before the decision goes any further. This issue should also be decided soon. I prefer the void ELEKTRA_PLUGIN_EXPORT (KeySet * ks) variant, because of all the other things it makes possible.
  • plugin_struct.md: That's basically a list of ideas I had while looking into the other two decisions. In short, I think there is a lot of potential to slim down the struct _Plugin and improve some semi-related things. Please, ignore this file for now. I just wanted to write down the ideas.

Note I won't do any more work on these decisions in this PR. Feel free to comment, but I will create separate PRs for each of them once this PR is merged.

@markus2330
Copy link
Contributor

Didn't have time yet to create a README for backend,

Would be good to have it!

but hopefully I addressed all the rest.

What about the other reviews? Are they also incorporated here?

I will create separate PRs for each of them once this PR is merged.

Excellent idea!

@kodebach
Copy link
Member Author

What about the other reviews? Are they also incorporated here?

Yes, everything from #4187 should be addressed.

Copy link
Contributor

@markus2330 markus2330 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still a few little things open. @lawli3t can you take a look at the API docu, too?

src/libs/elektra/kdb.c Outdated Show resolved Hide resolved
src/libs/elektra/kdb.c Outdated Show resolved Hide resolved
src/libs/elektra/kdb.c Outdated Show resolved Hide resolved
src/libs/elektra/kdb.c Outdated Show resolved Hide resolved
src/libs/elektra/kdb.c Outdated Show resolved Hide resolved
src/libs/elektra/kdb.c Outdated Show resolved Hide resolved
Copy link
Contributor

@markus2330 markus2330 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, many improvements. Decisions will be handled later anyway. Please rebase.

doc/decisions/plugin_struct.md Outdated Show resolved Hide resolved
kodebach and others added 12 commits November 10, 2022 13:49
Co-authored-by: Maximilian Irlinger <maxi6594@gmail.com>
Co-authored-by: Markus Raab <markus2330@users.noreply.github.com>
Co-authored-by: Markus Raab <markus2330@users.noreply.github.com>
Co-authored-by: Markus Raab <markus2330@users.noreply.github.com>
@kodebach
Copy link
Member Author

@markus2330 rebased, please merge when CI completes

@markus2330
Copy link
Contributor

The build did not succeed.

@markus2330
Copy link
Contributor

Please don't change the code in this already-reviewed documentation PR.

@kodebach kodebach requested a review from markus2330 November 10, 2022 18:54
@kodebach
Copy link
Member Author

Please don't change the code in this already-reviewed documentation PR.

It's my PR, please don't tell me what to do with it...

I intentionally, split 85e8e19 and 3694bb8.

The first one was a clear bug and I don't think there can be any objection to the fix. It even matches, what the docs already say. The second one does add new functionality, whether or not we want to add it is up for debate. But that's why I requested a new review. Well now I did... You commented faster than I could request the review...

Copy link
Contributor

@markus2330 markus2330 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please split documentation and code in this PR. In the current form I cannot review it anymore.

@kodebach

This comment was marked as outdated.

@kodebach
Copy link
Member Author

kodebach commented Nov 11, 2022

I have now also remove the minor fix for "kdbGet never returns 0", because for some unexplained reason the test didn't work for the FULL build. I believe you can now just merge this PR, when the CI is done. There are now changes since your last review.

EDIT: I also created #4673 to track the issue

@markus2330
Copy link
Contributor

jenkins build libelektra please

@markus2330 markus2330 merged commit eb0704c into ElektraInitiative:master Nov 12, 2022
@markus2330
Copy link
Contributor

Great work, thank you! 💞

@mpranj mpranj added this to the 0.9.12 milestone Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants