modify rps plugin for gitlab pilot rpm
Plugin modification for gitlab pilot registry RPM creation
Merge request reports
Activity
Hello @n00aamxt ,
Thank you for your contribution. What do you want to resolve with this merge request? Can you open an Issue with the description of your problem?
Edited by Vincent SIMONINHi Simonin,
We're currently discussing C4 support with Roberto, Panos and Laurent for the new EC GitLab Pilot and future GitLab Corporate Service. We need to enable functionalities not covered by RPM and can't be modified on existing RPM.
We've implemented the first draft of our suggestions to guide the team on the direction to address our issues with the registry.
This merge request was created from a branched fork regarding the creation of an RPM for domains registry.sdlc.webcloud.ec.europa.eu:443 and registry.acceptance.sdlc.webcloud.ec.europa.eu:443. Both RPMs require specific settings that seem to be currently not supported by the Nestbox plugins that you use. It was advised to us (currently implementing the new GitLab pilot RPMs) to pinpoint what should be modified to allow the creation of those RPMs.
Thanks for your feedback.
Best, Darko
Edited by Darko ABRAMOVICrequested review from @moreida
@abramda @n00aamxt it is not possible to edit existing migration. You must add new ones that would make the required changes. pls also keep in mind this will be deployed on running environments and the migrations can not have any regressions.
Also I see no tests added in your PR. Pls consider adding the appropriate tests to validate the expected behavior.
Edited by Laurent VENIERadded Don't merge label
assigned to @veniela
added 6 commits
-
3f1b19a3...a4196d8d - 5 commits from branch
digit-c4:main
- 360c5f1f - Various fixes for new mapping properties in form, change client_max_body_size...
-
3f1b19a3...a4196d8d - 5 commits from branch
added 1 commit
- 4b60cc6d - Set maximum value to client_max_body_size to 2048MB
Hello @veniela,
I made several changes on the MR, the previous changes I made on the existing migrations were reverted and a new one has been created to add or modify properties that would suit our needs. I also modified the tests according to those new properties, as well as all the other components needed.
I was able to launch a local netbox instance with this configuration, but I faced some issues launching it in the first place and performing the tests:
- With a netbox docker image built from the root of the repo, I had to modify the port and the API token in all tests scripts
- I had to modify the import of the base module in all tests scripts from
import .base
toimport base
(which is maybe because I was using WSL and there was some issue with the integration of the python interpreter, VSCode, the venv and my WSL instance) - There were a lot of tests failures that did not seem related to my new tests because of the error
mapping with this Source already exists
- I also had to modify the terraform file in order to take this built image by removing the
build
block in the docker image schema for the netbox instance and set the image name manually.
All those changes where not pushed in the current change, I can open an issue with this information if needed.
Best regards
Hello @n00aamxt ,
I will try to respond to your questions:
- You can pass the API token in the env variable
API_KEY
whe you execute the test. There is an example in the CI https://code.europa.eu/digit-c4/netbox-plugins/-/blob/main/.gitlab-ci.yml?ref_type=heads#L47 - Which version of Python do you use?
- You have to be sure that before to run RPS plugin test mapping list was empty.
- Terraform file is outdated and will be removed in the next release of the plugin.
- You can pass the API token in the env variable
Hello @simovin,
Thank you very much for the feedback, it is appreciated.
- Indeed, I missed the fact that only the default values of those variables where set and that I could use env variable to run the tests (both for the port and the token)
- I'm currently using
Python 3.10.12
(again, maybe it was due to my usage of WSL) - I ran the tests several times and deleted the remaining test mapping from the netbox GUI console at the end of it, which made no difference in the end, as the number of failed tests was no different. Unfortunately, I didn't kept the tests outputs so I cannot provide them to you, but half of the tests failed
- Outside of the netbox docker image, the terraform file was fine for me and created all the other resources with no issues. In my opinion, modifying the docker schema in the TF to us a specific docker image built by the tester from the root of the repository would be more efficient (because once you have your containers up and running and notice an issue, you will just have to rebuild the docker image, apply the changes with terraform and the changes will be up in a minute, which is helpful for debugging).
Let me know if you need any more information, I stay available if needed.
Best regards
Hello @n00aamxt ,
Can you have a look to abramda/netbox-plugins-for-git-lab-pilot!1 (merged) ?
Hello @simovin,
I merged the branch, but the pipeline https://code.europa.eu/abramda/netbox-plugins-for-git-lab-pilot/-/pipelines/134596 is still stuck, which blocks the jobs in the current MR I think
And it's working :-)
Linter is activated https://code.europa.eu/digit-c4/netbox-plugins/-/jobs/381153#L48
added 5 commits
-
4b60cc6d...c7e85a17 - 4 commits from branch
digit-c4:main
-
3e4b1130 -
Merge branch 'main' into 'registry-rpm-module'
-
4b60cc6d...c7e85a17 - 4 commits from branch
mentioned in merge request !67 (closed)