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

fix(package): installation falls back to XMLRPC #171

Merged
merged 2 commits into from
Nov 16, 2023

Conversation

line-o
Copy link
Member

@line-o line-o commented Oct 27, 2023

fixes #170

Try REST connection, fall back to XMLRPC and inform user that this happened.

; xst package install spec/fixtures/test-lib.xar
Falling back to XMLRPC API
Install test-lib.xar on https://localhost:8443
✔︎ uploaded
✔︎ installed

fixes eXist-db#170

Try REST connection, fall back to XMLRPC and inform user that this
happened.
@line-o line-o requested a review from a team October 27, 2023 10:48
@line-o
Copy link
Member Author

line-o commented Oct 27, 2023

I tested this fix locally by setting up an instance that has REST disabled. There is no automated test for this at the moment because do not know how to do this in docker yet.
@duncdrum help would be appreciated as there will be more REST API used in the future.
@luckydem This is the fix for the issue you reported.

@duncdrum
Copy link
Contributor

@line-o I would create another workflow file, not use services but modify and assemble the image on the ci server like we do for most stock apps. Basically:

  1. pull image
  2. copy modified conf.xml into image
  3. start container (based on modified image)
  4. run xst tests

@line-o
Copy link
Member Author

line-o commented Oct 27, 2023

@duncdrum Would you be able to share a link to an example?

@duncdrum
Copy link
Contributor

https://github.com/eXist-db/eXide/blob/2442c0bf6ebd42782e74a5db945f5c2345428513/.github/workflows/ci.yml#L43-L47

and

https://github.com/duncdrum/distroless-exist/blob/01881d6afcedc175e347ee890ecb29372ee4d456/test/bats/02-config-spec.bats#L20-L24

the run keyword in the bats test need to be run: in gha yml. docker … is just the docker command you want to execute

@line-o
Copy link
Member Author

line-o commented Oct 27, 2023

How do we maintain modified configurations for each version of exist that is currently in the testmatrix?

@duncdrum
Copy link
Contributor

matrix expansion in the yaml file, something like

docker pull duncdrum/existdb:${{ exist.version }}-j8

@line-o
Copy link
Member Author

line-o commented Oct 29, 2023

@duncdrum shouldn't it be more like

  1. pull image
  2. start container
  3. copy web.xml from container to filesystem
  4. modify web.xml (with sed for example)
  5. copy modified web.xml back into container
  6. restart container for modifications to take effect
  7. test

@duncdrum
Copy link
Contributor

duncdrum commented Oct 30, 2023

You can do that, it ll take long to run though. As you need a running container for the copy (I think that’s still the case) If you want to do this I would download them from the containers in the unit test phase, and share as artefact or even commit to repo.

Once you commit to repo, you might as well store the changes files and maintain these by hand. Either way works.

@line-o line-o force-pushed the fix/170 branch 12 times, most recently from d1f8f5f to f1da12a Compare November 16, 2023 17:41
Copy link
Contributor

@duncdrum duncdrum left a comment

Choose a reason for hiding this comment

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

Nice feature

@duncdrum duncdrum merged commit dbc5d96 into eXist-db:main Nov 16, 2023
@line-o line-o deleted the fix/170 branch November 16, 2023 17:50
Copy link

🎉 This PR is included in version 1.9.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Package installation fails when REST API is disabled
2 participants