Skip to content
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

libyang checks: start with FRRouting #2203

Closed
wants to merge 4 commits into from
Closed

Conversation

vjardin
Copy link
Contributor

@vjardin vjardin commented Mar 19, 2024

Hi,

the main purpose of this pull request is to be able to have a framework to test libyang (including the current pull requests, some tags for references) along with the libyang in order to easy the shared integration.

It starts with FRRouting, but it can be extended with other projects.

Currently, it is a test based on compile and link. Once it'll be merged, I can extend it for some few smoke tests from the projects that consume libyang so they can report a proper execution of their smoke tests.

vjardin added 2 commits March 19, 2024 10:57
It can build for the current pull request of libyang, for some well
known tags in order to have a reference too.

The purpose is to ensure that libyang and FRRouting keeps working
together smoothly.

Currently, it is just about a compilation and link test.

In order to work with pre-set tags/versions, the fork should the tags.
If they are missing, you can catch up those tags using:
$ git remote -v
origin	[email protected]:vjardin/libyang.git (fetch)
origin	[email protected]:vjardin/libyang.git (push)
upstream	[email protected]:CESNET/libyang.git (fetch)
upstream	[email protected]:CESNET/libyang.git (push)
$ git fetch --tags upstream
$ git tag -l
$ git push --tags origin
Even if a build fails, we'd like to continue on failures. But in case of
a failure it needs to yell that it does not succeed.

apply the mustache rule per:
  https://docs.github.com/en/actions/learn-github-actions/expressions#status-check-functions
Copy link
Member

@michalvasko michalvasko left a comment

Choose a reason for hiding this comment

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

Seems the scripts do not work, look at the CI output.

compiler: [ gcc ]
frr-versions: [ master ]
libyang-versions:
- v2.1.128
Copy link
Member

Choose a reason for hiding this comment

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

Why use a specific version? What sense does it make to use the same version every time? It will not use the latest changes that should be tested I assumed.

Copy link
Contributor Author

@vjardin vjardin Mar 19, 2024

Choose a reason for hiding this comment

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

It is to have a reference and to start this question to be transparent.

There are 2 sides:

  • on FRR side, you are right, it should compile with many libyang versions ; I'll work on it.
  • on libyang side, you are right, 1 libyang should compile with many FRR versions ; for the sake of this merge request, I am just using "master" of FRR.

I could drop v2.1.128 from the pull request checks, but I feel that it should run on a scheduled Action : what's about once a day for instance ?

Copy link
Member

Choose a reason for hiding this comment

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

Once a day is fine but we have used triggers for now so it can also be on every push (to devel ideally because master is changed only on release).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@michalvasko , see 8d644ca which shows how such matrix of cases could be managed from FRRouting side too.

Copy link
Member

Choose a reason for hiding this comment

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

I am still not sure I understand. For libyang, I would think you always want to test the latest version with latest changes whether there were no incompatibilities introduced. As for FRR, I guess there could be several versions to check that none of the supported FRR versions were broken.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@michalvasko > For libyang, I would think you always want to test the latest version with latest changes
@vjardin > yes, so I did update the pull request dropping the specific version of libyang for the time being. A full set of matrix run should be for a scheduled job.

@michalvasko > As for FRR, I guess there could be several versions to check
@vjardin > yes, so the array:

        frr-versions:
          - master

will be extended accordingly after this pull request.

Copy link
Member

Choose a reason for hiding this comment

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

Okay, so please fix the initial current libyang - frr master build so that it finishes successfully.

Copy link
Contributor Author

@vjardin vjardin Mar 19, 2024

Choose a reason for hiding this comment

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

Hmmm 🤔 currently I cannot since the evolutions of libyang break the applications using it like FRR. So I'd suggest the following :

  • step1: merge it asis so this pull request is focused on this template for such Action
  • step2: fix current libyang - frr master to comply and be successful (as you suggest)
  • step3: add scheduled build with tags / versions matrix for a broader nightly check

Is it ok for you ?

Copy link
Member

Choose a reason for hiding this comment

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

Is it ok for you ?

Not really because I do not understand.

  1. Why merge an action that is going to fail? Why not wait until it actually succeeds?
  2. Yes, it is up to you to do this (after libyang is released) and then a successful action can be added.
  3. This is an option although I prefer actions triggered by some changes (push), similarly to our devel-push action.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I get your point related to 1. and 2. I'll follow your suggestion "fix first", or least I'll explore it deeper.

Regarding 3. ; I'll submit a specific pull request that leverages "scheduled build" only using v2.1.x and then later, once issues will be fixed, it can be extended (which I do prefer like you) with an action on every push.

vjardin added 2 commits March 19, 2024 11:39
Let's have a symetric design for libyang and FRRouting.
Drop the explicit version v2.1.128 to avoid running it on every pull
request/push. A scheduled run on specific tags will be provided by a later
commit.

Suggested-by: Michal Vasko <[email protected]>
@vjardin
Copy link
Contributor Author

vjardin commented Mar 20, 2024

I am closing this pull request and I'll (re)open a new one once issues will be fixed.

@vjardin vjardin closed this Mar 20, 2024
@michalvasko
Copy link
Member

Alright, up to you, I do not mind it being open until it can be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants