island-is / island.is Goto Github PK
View Code? Open in Web Editor NEWMonorepo for Iceland's digital services.
License: MIT License
Monorepo for Iceland's digital services.
License: MIT License
Re-triggering a build on an old commit would cause it to get "affected" changes against the last good build on the branch which might be a much newer build and not the last good build before the commit to be rebuild.
The code to discover Git SHAs to discover is something like this:
LAST_GOOD_BUILD=`git log --format=%H --first-parent "$BRANCH" | node .github/actions/dist/index.js`
but should be more like
NUMBER_NEWER_COMMITS=`git log --format=%H --first-parent "$BRANCH" $GITHUB_SHA... $BRANCH | wc -l`
LAST_GOOD_BUILD=`git log --format=%H --first-parent "$BRANCH" | tail -n +${NUMBER_NEWER_COMMITS+1} | node .github/actions/dist/index.js`
Here is the log:
(node:1) UnhandledPromiseRejectionWarning: Error: EACCES: permission denied, scandir '//root'
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Sometimes when I push to a new branch and create a PR I get this error from the pipeline:
Run git checkout $GITHUB_SHA
fatal: reference is not a tree: 7c5875c3b266acae4a2e61ca42eb3ae223b560d2
##[error]Process completed with exit code 128.
Examples:
https://github.com/island-is/island.is/runs/886903399
https://github.com/island-is/island.is/runs/886908881
Usually all I need to do is to do an empty commit and force push. Might need a few of those to make through this build step.
I think this relates to actions/checkout#23.
The solution there is to change to actions/checkout@v2
in the workflow build config.
The default TypeScript config from NX does not have any strict flags set, eg it allows implicit any. This makes it easy to forget to add type definitions to expressions and declarations and end up with unsafe untyped code.
It's an easy change in tsconfig.json, however, we already have a lot of code this will break.
To start this migration we should turn off strict in the root tsconfig. For projects that have a significant number of errors with this flag set, we can unset it in the project-specific tsconfig. Later, someone (optimally from the project team) has time to fix these type issues and re-enable strict mode.
The POST callback from innskraning.island.is becomes GET after Github interjects into the process.
Issue pointed out by @gudjong
We plan on using Nginx to serve the content
Extract all cache key computation to a single step and re-use them using outputs.
The file should be generated during CI build time just before it is published for safer deployments
Basically what is inside libs/application/form/src/components/fields/**/*
could be made more generic and moved to island-ui/core
.
Currently island-ui/core
only has wrappers around Formik
components, which are named Field*
.
But we've come to a decision to replace Formik
for react-hook-form
. Therefore we'll need to create similar wrapper components for that as well. Might name them *Controller
, e.g. InputController
.
The deadline for that is as soon as possible to avoid other developers from choosing Formik for new projects. Currently, only gjafakort
uses Formik -> and that project will be removed in the beginning of next year.
Avoid using source as a way to get environment variables from scripts in /ci
. Instead, just get them via stdout.
Created after discussions in #1152
In our project we are using a textarea field that looks like this 👇
What I need is to be able to choose if an input field should be rendered as a textarea or input via a prop when using the input component. I tried implementing this myself but was unable to get working due to typescript errors regarding the merging of refs in the Input component. Can anyone please help?
If we do not fix this it can be quite expensive - https://github.com/island-is/island.is/runs/985245433?check_suite_focus=true
To help people troubleshoot CI issues on their dev machines
After discussion with @darrikonn we decided a label on a PR would be best.
Adding a label to a PR: jq -n '{"labels": ["ci"]}' -cM | gh api --silent /repos/:owner/:repo/issues/1071/labels --input -
They should be /liveness
and /readiness
Unfortunately, GitHub actions don't support anchors: https://github.community/t/support-for-yaml-anchors/16128
Look into some kind of simple generator for build.yml that has support for anchors and does not stop us from using anchors when/if GitHub actions support them at a later time.
Currently it resides in build.yml. Move it to somewhere more obvious.
Realised there is a potential issue with secrets when the same secret is used from init container and the main one. The secret key is duplicated which might cause problems. Should fix that.
Originally posted by @pshomov in #399 (comment)
This might not be what we want, if we push up multiple commits this will only run against 1 up. Can't you use the api to fetch the last completed (successful) build and use that as a base with a fallback to master.
Originally posted by @darrikonn in #31
Currently these errors get dumped on the stdout and the stack traces are pretty hard to read.
Currently, island-ui has many components which build on top of Formik. This was chosen by default, but its worth investigating other form libraries and creating an ADR for it.
Currently we have a few applications which are duplicating assets like favicons.
We should avoid duplicating assets. Instead we can create a shared library that contains these assets.
From there, they can be imported using webpack
, or we can copy them to a public folder in the build step.
See #935
https://github.com/island-is/handbook 404s for me but is linked from the README 😬
Some environment variables should not be required during development, might depend on what project you are developing
It affects seems gjafakort, vidspyrna and loftbrú. For example for Loftbrú when you press “Sjá réttindi” tries to load file login.js which is missing. This is causing problems in monitoring.
#1055 should have been blocked but it was not.
As mentioned in #1081 (review), we don't want to accidentally break codeowners.
Our shared components need props to help with automated testing.
Interactive components should support a prop called testId
, which is forwarded to data-testId
on the primary interactive element in the DOM. This kind of attribute works well with Cypress and testing-library
.
If a component has sub-components, it can use its testId
as a prefix for those components, eg:
const Calendar = ({ testId = 'calendar, ...stuff }) =>
<>
...
<Button testId={`${testId}.nextMonth`} />
</>
After the most recent Dockfile changes related to avoiding generating different layers for the same node modules we needed to add the code assets to the container as root but executed it as a lower privileged user - runner
.
That change brought forward the fact that when running certain types of containers - (GraphQL for example, maybe more), they are attempting to write into the current folder.
This is a security issue and we cannot allow to write into files in the current folder. The correct way would be to write content to the temp area.
We have temporarily allowed the code to run as root but we need to fix this ASAP.
Add documentation to the API Design Guide if a resource api should wrap the resource under a user collection:
/v1/users/:nationalId/documents
or if this user information should be availble from the access token, then document how resource api should read from the access token.
The pod's health checks seems to be failing
For system strings we're using rosetta
and in-repo translation resources. This will not scale very far.
One proposal is to combine Contentful with i18next (or something home built). We should create an ADR for this.
island-is/infrastructure#62
Suggested by @stefanhar
The following is needed:
A prod database
/k8s/judicial-system/AUTH_JWT_SECRET - can be set to any secret string
/k8s/judicial-system/DB_PASSWORD - production db password provided by Andes
/k8s/judicial-system/NOVA_PASSWORD - can be copied from /k8s/gjafakort/NOVA_PASSWORD on prod - we are sharing the sms gateway
/k8s/judicial-system/JUDGE_MOBILE_NUMBER - 8999291
/k8s/judicial-system/DOKOBIT_ACCESS_TOKEN - Dokobit api secret provided by Kolibri - má afrita frá dev til að byrja með
/k8s/judicial-system/USER_SEED - user seeding provided by Kolibri - má afrita frá dev til að byrja með
/k8s/judicial-system/EMAIL_FROM - [email protected]
/k8s/judicial-system/EMAIL_FROM_NAME - ??? island.is ???
/k8s/judicial-system/EMAIL_REPLY_TO - [email protected]
/k8s/judicial-system/EMAIL_REPLY_TO_NAME - ??? tómur strengur ???
An AWS service role with permission to send email via SES
Helm definitions https://github.com/island-is/helm/pull/78
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.